Devicetree
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1
@ 2026-10-18 16:12 Sander Vanheule
  2026-10-18 16:12 ` [PATCH net-next 1/2] dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport Sander Vanheule
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sander Vanheule @ 2026-10-18 16:12 UTC (permalink / raw)
  To: Jonas Jelonek, Oleksij Rempel, Kory Maincent, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: netdev, devicetree, linux-kernel, Sander Vanheule

While for the Gen2 protocol both a plain I2C transport and an SMBus
transport were provided, Gen1 only got SMBus. The Unifi Switch Lite 16
PoE uses the Gen1 protocol to manage a single BCM59121, but does to
using plain I2C.

These patches simply add a new compatible for the plain I2C transport
and the associated match data. This is sufficient to let the existing
code talk to the management MCU.

Sander Vanheule (2):
  dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport
  net: pse-pd: realtek-pse-mcu: add gen1 I2C transport

 .../bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml         | 7 +++++++
 drivers/net/pse-pd/realtek-pse-mcu-core.c                 | 8 +++++++-
 drivers/net/pse-pd/realtek-pse-mcu-i2c.c                  | 1 +
 drivers/net/pse-pd/realtek-pse-mcu.h                      | 1 +
 4 files changed, 16 insertions(+), 1 deletion(-)

-- 
2.56.0


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

* [PATCH net-next 1/2] dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport
  2026-10-18 16:12 [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Sander Vanheule
@ 2026-10-18 16:12 ` Sander Vanheule
  2026-10-18 16:12 ` [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: " Sander Vanheule
  2026-10-19  9:16 ` [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Kory Maincent
  2 siblings, 0 replies; 6+ messages in thread
From: Sander Vanheule @ 2026-10-18 16:12 UTC (permalink / raw)
  To: Jonas Jelonek, Oleksij Rempel, Kory Maincent, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: netdev, devicetree, linux-kernel, Sander Vanheule

Like the gen2 protocol, the gen1 protocol can also be used over both a
raw I2C transport and an SMBUs transport. Add a compatible for the
former and the compatible for the Ubiquiti Unifi Switch Lite 16 PoE
device that uses it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 .../bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml          | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml b/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml
index 3bb32349c28c..526f8525bb4d 100644
--- a/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml
+++ b/Documentation/devicetree/bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml
@@ -54,6 +54,12 @@ properties:
               - zyxel,gs1920-24hp-v2-pse
           - const: realtek,pse-mcu-gen1-smbus
 
+      # I2C, raw framing
+      - items:
+          - enum:
+              - ubnt,usw-lite-16-poe-pse
+          - const: realtek,pse-mcu-gen1-i2c
+
       # UART
       - items:
           - enum:
@@ -100,6 +106,7 @@ allOf:
           contains:
             enum:
               - realtek,pse-mcu-gen1-smbus
+              - realtek,pse-mcu-gen1-i2c
               - realtek,pse-mcu-gen2-smbus
               - realtek,pse-mcu-gen2-i2c
     then:
-- 
2.56.0


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

* [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: add gen1 I2C transport
  2026-10-18 16:12 [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Sander Vanheule
  2026-10-18 16:12 ` [PATCH net-next 1/2] dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport Sander Vanheule
@ 2026-10-18 16:12 ` Sander Vanheule
  2026-10-19  5:51   ` Oleksij Rempel
  2026-10-19  6:56   ` Jonas Jelonek
  2026-10-19  9:16 ` [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Kory Maincent
  2 siblings, 2 replies; 6+ messages in thread
From: Sander Vanheule @ 2026-10-18 16:12 UTC (permalink / raw)
  To: Jonas Jelonek, Oleksij Rempel, Kory Maincent, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: netdev, devicetree, linux-kernel, Sander Vanheule

Provide the required data for the gen1 raw I2C binding, which like for
gen2 is simply the gen1 protocol data with the native_i2c flag set.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 drivers/net/pse-pd/realtek-pse-mcu-core.c | 8 +++++++-
 drivers/net/pse-pd/realtek-pse-mcu-i2c.c  | 1 +
 drivers/net/pse-pd/realtek-pse-mcu.h      | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/pse-pd/realtek-pse-mcu-core.c b/drivers/net/pse-pd/realtek-pse-mcu-core.c
index e64f13ea6e4e..c70b09ca2012 100644
--- a/drivers/net/pse-pd/realtek-pse-mcu-core.c
+++ b/drivers/net/pse-pd/realtek-pse-mcu-core.c
@@ -986,7 +986,13 @@ const struct rtpse_mcu_match_data rtpse_mcu_gen2_data = {
 };
 EXPORT_SYMBOL_GPL(rtpse_mcu_gen2_data);
 
-/* Same dialect as gen2, but the MCU expects raw-I2C framing. */
+/* Same dialects as above, but the MCU expects raw-I2C framing. */
+const struct rtpse_mcu_match_data rtpse_mcu_gen1_i2c_data = {
+	.dialect = &rtpse_mcu_dialect_gen1,
+	.native_i2c = true,
+};
+EXPORT_SYMBOL_GPL(rtpse_mcu_gen1_i2c_data);
+
 const struct rtpse_mcu_match_data rtpse_mcu_gen2_i2c_data = {
 	.dialect = &rtpse_mcu_dialect_gen2,
 	.native_i2c = true,
diff --git a/drivers/net/pse-pd/realtek-pse-mcu-i2c.c b/drivers/net/pse-pd/realtek-pse-mcu-i2c.c
index b6769ac1d470..bbded772eddf 100644
--- a/drivers/net/pse-pd/realtek-pse-mcu-i2c.c
+++ b/drivers/net/pse-pd/realtek-pse-mcu-i2c.c
@@ -128,6 +128,7 @@ static int rtpse_mcu_i2c_probe(struct i2c_client *client)
 
 static const struct of_device_id rtpse_mcu_i2c_of_match[] = {
 	{ .compatible = "realtek,pse-mcu-gen1-smbus", .data = &rtpse_mcu_gen1_data },
+	{ .compatible = "realtek,pse-mcu-gen1-i2c", .data = &rtpse_mcu_gen1_i2c_data },
 	{ .compatible = "realtek,pse-mcu-gen2-smbus", .data = &rtpse_mcu_gen2_data },
 	{ .compatible = "realtek,pse-mcu-gen2-i2c", .data = &rtpse_mcu_gen2_i2c_data },
 	{ /* sentinel */ }
diff --git a/drivers/net/pse-pd/realtek-pse-mcu.h b/drivers/net/pse-pd/realtek-pse-mcu.h
index d75e91669b8f..5e31dd0993dd 100644
--- a/drivers/net/pse-pd/realtek-pse-mcu.h
+++ b/drivers/net/pse-pd/realtek-pse-mcu.h
@@ -88,6 +88,7 @@ struct rtpse_mcu_ctrl {
 int rtpse_mcu_register(struct rtpse_mcu_ctrl *pse);
 
 extern const struct rtpse_mcu_match_data rtpse_mcu_gen1_data;
+extern const struct rtpse_mcu_match_data rtpse_mcu_gen1_i2c_data;
 extern const struct rtpse_mcu_match_data rtpse_mcu_gen2_data;
 extern const struct rtpse_mcu_match_data rtpse_mcu_gen2_i2c_data;
 
-- 
2.56.0


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

* Re: [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: add gen1 I2C transport
  2026-10-18 16:12 ` [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: " Sander Vanheule
@ 2026-10-19  5:51   ` Oleksij Rempel
  2026-10-19  6:56   ` Jonas Jelonek
  1 sibling, 0 replies; 6+ messages in thread
From: Oleksij Rempel @ 2026-10-19  5:51 UTC (permalink / raw)
  To: Sander Vanheule
  Cc: Jonas Jelonek, Kory Maincent, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev, devicetree,
	linux-kernel

On Sun, Oct 18, 2026 at 06:12:48PM +0200, Sander Vanheule wrote:
> Provide the required data for the gen1 raw I2C binding, which like for
> gen2 is simply the gen1 protocol data with the native_i2c flag set.
> 
> Signed-off-by: Sander Vanheule <sander@svanheule.net>

Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>

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 |

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

* Re: [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: add gen1 I2C transport
  2026-10-18 16:12 ` [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: " Sander Vanheule
  2026-10-19  5:51   ` Oleksij Rempel
@ 2026-10-19  6:56   ` Jonas Jelonek
  1 sibling, 0 replies; 6+ messages in thread
From: Jonas Jelonek @ 2026-10-19  6:56 UTC (permalink / raw)
  To: Sander Vanheule, Oleksij Rempel, Kory Maincent, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: netdev, devicetree, linux-kernel


On 18.10.26 18:12, Sander Vanheule wrote:
> Provide the required data for the gen1 raw I2C binding, which like for
> gen2 is simply the gen1 protocol data with the native_i2c flag set.
>
> Signed-off-by: Sander Vanheule <sander@svanheule.net>
>

Acked-by: Jonas Jelonek <jonas@jonasjelonek.de>

Best,
Jonas

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

* Re: [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1
  2026-10-18 16:12 [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Sander Vanheule
  2026-10-18 16:12 ` [PATCH net-next 1/2] dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport Sander Vanheule
  2026-10-18 16:12 ` [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: " Sander Vanheule
@ 2026-10-19  9:16 ` Kory Maincent
  2 siblings, 0 replies; 6+ messages in thread
From: Kory Maincent @ 2026-10-19  9:16 UTC (permalink / raw)
  To: Sander Vanheule, Jonas Jelonek, Oleksij Rempel, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: netdev, devicetree, linux-kernel


On 10/18/26 18:12, Sander Vanheule wrote:
> While for the Gen2 protocol both a plain I2C transport and an SMBus
> transport were provided, Gen1 only got SMBus. The Unifi Switch Lite 16
> PoE uses the Gen1 protocol to manage a single BCM59121, but does to
> using plain I2C.
> 
> These patches simply add a new compatible for the plain I2C transport
> and the associated match data. This is sufficient to let the existing
> code talk to the management MCU.

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>

Thank you!

> Sander Vanheule (2):
>    dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport
>    net: pse-pd: realtek-pse-mcu: add gen1 I2C transport
> 
>   .../bindings/net/pse-pd/realtek,pse-mcu-gen1.yaml         | 7 +++++++
>   drivers/net/pse-pd/realtek-pse-mcu-core.c                 | 8 +++++++-
>   drivers/net/pse-pd/realtek-pse-mcu-i2c.c                  | 1 +
>   drivers/net/pse-pd/realtek-pse-mcu.h                      | 1 +
>   4 files changed, 16 insertions(+), 1 deletion(-)
> 

-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


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

end of thread, other threads:[~2026-10-19  9:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 16:12 [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Sander Vanheule
2026-10-18 16:12 ` [PATCH net-next 1/2] dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transport Sander Vanheule
2026-10-18 16:12 ` [PATCH net-next 2/2] net: pse-pd: realtek-pse-mcu: " Sander Vanheule
2026-10-19  5:51   ` Oleksij Rempel
2026-10-19  6:56   ` Jonas Jelonek
2026-10-19  9:16 ` [PATCH net-next 0/2] net: pse-pd: Plain I2C transport for Realtek Gen1 Kory Maincent

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