mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] NFC: trf7970a: Add option to reduce antenna gain
@ 2025-06-24 12:42 Paul Geurts
  2025-06-24 12:42 ` [PATCH v2 1/2] dt-bindings: net/nfc: ti,trf7970a: Add ti,rx-gain-reduction option Paul Geurts
  2025-06-24 12:42 ` [PATCH v2 2/2] NFC: trf7970a: Create device-tree parameter for RX gain reduction Paul Geurts
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Geurts @ 2025-06-24 12:42 UTC (permalink / raw)
  To: mgreer, krzk, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
	conor+dt, linux-wireless, netdev, devicetree, linux-kernel
  Cc: martijn.de.gouw, Paul Geurts

The TRF7970a device is sensitive to RF disturbances, which can make it
hard to pass some EMC immunity tests. By reducing the RX antenna gain,
the device becomes less sensitive to EMC disturbances, as a trade-off
against antenna performance.

Signed-off-by: Paul Geurts <paul.geurts@prodrive-technologies.com>
---
v1 -> v2:
- Added vendor prefix
- Added units



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: net/nfc: ti,trf7970a: Add ti,rx-gain-reduction option
@ 2025-06-26  8:29 Paul Geurts
  2025-06-26  8:57 ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Geurts @ 2025-06-26  8:29 UTC (permalink / raw)
  To: andrew
  Cc: mgreer, krzk, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
	conor+dt, linux-wireless, netdev, devicetree, linux-kernel,
	martijn.de.gouw

> On Tue, Jun 24, 2025 at 02:42:46PM +0200, Paul Geurts wrote:
> > Add option to reduce the RX antenna gain to be able to reduce the
> > sensitivity.
> > 
> > Signed-off-by: Paul Geurts <paul.geurts@prodrive-technologies.com>
> > ---
> >  Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml b/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
> > index d0332eb76ad2..066a7abc41e0 100644
> > --- a/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
> > +++ b/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
> > @@ -55,6 +55,12 @@ properties:
> >      description: |
> >        Regulator for supply voltage to VIN pin
> >  
> > +  ti,rx-gain-reduction:
> 
> You should include the units, "ti,rx-gain-reduction-db"

Well, Currently it's not really a dB value (see below).

> 
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: |
> > +      Specify a RX gain reduction to reduce antenna sensitivity with 5dB per
> > +      increment, with a maximum of 15dB.
> 
> Given that description i think you can provide a list of values, [0,
> 5, 10, 15] and the tools will validate values in .dts files.
> 
> > +
> >  required:
> >    - compatible
> >    - interrupts
> > @@ -95,5 +101,6 @@ examples:
> >              irq-status-read-quirk;
> >              en2-rf-quirk;
> >              clock-frequency = <27120000>;
> > +            ti,rx-gain-reduction = <3>;
> 
> Err, how does 3 fit into 5dB increments?

I implemented it in a way that the value of ti,rx-gain-reduction is programmed
directly into the RX_GAIN reduction register, and there it means 5 dB/LSB. My
description probably was not clear enough about that. So a value of 3 here actually
means 15dB.
So I could either improve the description here that this is the case, or make the
value in here in actual dB, and do some calculations in the driver. What has your
preference?

> 
> 	Andrew
> 

Thanks!

Paul

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

end of thread, other threads:[~2025-06-26 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-24 12:42 [PATCH v2 0/2] NFC: trf7970a: Add option to reduce antenna gain Paul Geurts
2025-06-24 12:42 ` [PATCH v2 1/2] dt-bindings: net/nfc: ti,trf7970a: Add ti,rx-gain-reduction option Paul Geurts
2025-06-24 15:49   ` Andrew Lunn
2025-06-24 12:42 ` [PATCH v2 2/2] NFC: trf7970a: Create device-tree parameter for RX gain reduction Paul Geurts
2025-06-26  8:29 [PATCH v2 1/2] dt-bindings: net/nfc: ti,trf7970a: Add ti,rx-gain-reduction option Paul Geurts
2025-06-26  8:57 ` Andrew Lunn
2025-06-26 13:19   ` Paul Geurts

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

all inboxes | Powered by JetHome®