Re: [PATCH net-next 1/2] dt-bindings: net: nfc: samsung,s3fwrn5: add S3NRN4V and clk-req-gpios

Conor Dooley <[email protected]> Sun, 5 Jul 2026 15:47:57 +0100
Newsgroups dev.linux.lists.oe-linux-nfc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <20260705-panic-reviving-993142677f47@spud>
On Fri, Jul 03, 2026 at 10:26:00PM +0200, Jorijn van der Graaf wrote:
> The S3NRN4V is an S3FWRN5-family NFC + eSE controller found e.g. on the
> Fairphone 6 (SM7635). Add a compatible for it and document the optional
> clk-req-gpios property: when wired, the controller drives this line to
> request its reference clock (needed to generate the poll carrier), and the
> driver gates the clock on it instead of leaving it always-on.
> 
> The line is modelled as a GPIO rather than an interrupt because the driver
> reads its level to (re)synchronise the clock state, not just react to its
> edges. It is only meaningful on the S3NRN4V, so it is restricted to that
> compatible.
> 
> Assisted-by: Claude:claude-opus-4-8
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Jorijn van der Graaf <[email protected]>
> ---
>  .../bindings/net/nfc/samsung,s3fwrn5.yaml     | 23 ++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> index 12baee457..3ebcd0933 100644
> --- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> +++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> @@ -14,12 +14,20 @@ properties:
>      enum:
>        - samsung,s3fwrn5-i2c
>        - samsung,s3fwrn82
> +      - samsung,s3nrn4v-i2c

Why does the compatible contain the bus? The s3frn5 device probably only
has it because it's an old text binding, your new device shouldn't have
that.

pw-bot: changes-requested

Thanks,
Conor.

>  
>    en-gpios:
>      maxItems: 1
>      description:
>        Output GPIO pin used for enabling/disabling the chip
>  
> +  clk-req-gpios:
> +    maxItems: 1
> +    description:
> +      Input GPIO pin connected to the controller's clock-request output. When
> +      present, the reference clock is enabled in response to this signal
> +      instead of being left always-on.
> +
>    interrupts:
>      maxItems: 1
>  
> @@ -58,12 +66,25 @@ allOf:
>        properties:
>          compatible:
>            contains:
> -            const: samsung,s3fwrn5-i2c
> +            enum:
> +              - samsung,s3fwrn5-i2c
> +              - samsung,s3nrn4v-i2c
>      then:
>        required:
>          - interrupts
>          - reg
>  
> +  # The clock-request handshake only exists on the S3NRN4V.
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              const: samsung,s3nrn4v-i2c
> +    then:
> +      properties:
> +        clk-req-gpios: false
> +
>  examples:
>    - |
>      #include <dt-bindings/gpio/gpio.h>
> -- 
> 2.55.0
>
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCakpunAAKCRB4tDGHoIJi
0gVgAP4tvuqBhaZ228L0ROWRbnr758cpA1W497SNJSZp97YOfgD/Trxth7/GTRpQ
B9ciLo62hZ3odzTxSB0TJN6vCPwdSg4=
=SnpT
-----END PGP SIGNATURE-----