🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Asdlerto Korry via B4 Relay Thu, 12 Nov 2026 17:25
[PATCH net-next v3 0/2] nfc: s3fwrn5: Add optional pvdd-supply
#15330
Author: Asdlerto Korry via B4 Relay
Date: Thu, 12 Nov 2026 17:25
31 lines
11777 bytes
The Samsung S3FWRN5 NFC chip has a PVDD supply pin. On the Samsung
Galaxy M52 5G (sm7325) it is fed by a PMIC regulator that is not
always-on, so the driver has to enable it. These two patches add the
optional supply to the binding and make the driver enable it before the
enable GPIO is driven.

They were part of the series "arm64: dts: qcom: Add Samsung Galaxy M52
5G" (v2). As suggested by Krzysztof, they are split out and resent for
net-next. The DTS patches stay in the Qualcomm series; the DTS node uses
pvdd-supply only after this binding is merged.

Changes since v2 (as part of the DTS series):
 - sent as a separate series with the net-next prefix
 - no code changes, Reviewed-by from Krzysztof kept

---
Asdlerto Korry (2):
      dt-bindings: net: nfc: samsung,s3fwrn5: Add pvdd-supply
      nfc: s3fwrn5: i2c: Enable the pvdd supply

 Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml | 5 +++++
 drivers/nfc/s3fwrn5/i2c.c                                      | 7 +++++++
 2 files changed, 12 insertions(+)
---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
change-id: 20261112-m52xq-nfc-netdev-709568b66d1d

Best regards,
-- 
Asdlerto Korry <korryasdlerto@gmail.com>
[PATCH net-next v3 2/2] nfc: s3fwrn5: i2c: Enable the pvdd supply
#15342
Author: Asdlerto Korry via B4 Relay
Date: Thu, 12 Nov 2026 17:25
41 lines
11585 bytes
From: Asdlerto Korry <korryasdlerto@gmail.com>

Get and enable the optional PVDD supply before the enable GPIO is
driven. Boards that switch this supply from the SoC no longer have to
mark the regulator always-on.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Asdlerto Korry <korryasdlerto@gmail.com>
---
 drivers/nfc/s3fwrn5/i2c.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index 4ba762611711..eaa9a1f75533 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -11,6 +11,7 @@
 #include <linux/gpio/consumer.h>
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/regulator/consumer.h>
 
 #include <net/nfc/nfc.h>
 
@@ -160,6 +161,12 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client)
 	phy->i2c_dev = client;
 	i2c_set_clientdata(client, phy);
 
+	/* The chip has to be powered before EN is driven */
+	ret = devm_regulator_get_enable_optional(&client->dev, "pvdd");
+	if (ret && ret != -ENODEV)
+		return dev_err_probe(&client->dev, ret,
+				     "failed to enable pvdd supply\n");
+
 	phy->common.gpio_en = devm_gpiod_get(&client->dev, "en", GPIOD_OUT_HIGH);
 	if (IS_ERR(phy->common.gpio_en))
 		return PTR_ERR(phy->common.gpio_en);

-- 
2.25.1
Re: [PATCH net-next v3 2/2] nfc: s3fwrn5: i2c: Enable the pvdd supply
#16428
Author: Asdlerto Korry
Date: Sat, 14 Nov 2026 19:03
24 lines
12962 bytes
Hi David,

thanks for looking into this and for the schematics pointer.

I don't have schematics for the Galaxy M52 5G, so I can only go by the
vendor kernel's device tree. Its NFC node describes a single switchable
supply: PVDD, a GPIO-controlled fixed regulator that the vendor driver
turns on before enabling the chip. None of VBAT, AVDD, DVDD, PLLVDD or
TVDD are referenced or controlled there, so on this board they are
presumably fed from always-on rails that the OS never touches.

With only pvdd-supply wired up, the chip probes and reads tags fine on
the M52.

I'd rather not add bindings for supplies I can't verify on real
hardware and that no board would use yet. If a board turns up where
e.g. AVDD/DVDD are switchable, they could be added then as further
optional supplies next to pvdd-supply.

Does that sound OK to you?

Thanks,
Asdlerto
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads