mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Geurts <paul.geurts@prodrive-technologies.com>
To: <andrew@lunn.ch>
Cc: <mgreer@animalcreek.com>, <krzk@kernel.org>,
	<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<robh@kernel.org>, <conor+dt@kernel.org>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<martijn.de.gouw@prodrive-technologies.com>
Subject: Re: [PATCH v2 1/2] dt-bindings: net/nfc: ti,trf7970a: Add ti,rx-gain-reduction option
Date: Thu, 26 Jun 2025 10:29:53 +0200	[thread overview]
Message-ID: <20250626082953.3963992-1-paul.geurts@prodrive-technologies.com> (raw)
In-Reply-To: cf871c23-963a-4d50-a13b-97e84ee0ddb7@lunn.ch

> 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

             reply	other threads:[~2025-06-26  8:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-26  8:29 Paul Geurts [this message]
2025-06-26  8:57 ` Andrew Lunn
2025-06-26 13:19   ` Paul Geurts
  -- strict thread matches above, loose matches on Subject: below --
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250626082953.3963992-1-paul.geurts@prodrive-technologies.com \
    --to=paul.geurts@prodrive-technologies.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martijn.de.gouw@prodrive-technologies.com \
    --cc=mgreer@animalcreek.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®