linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface
       [not found] <CGME20201123075526epcms2p59410a8ba942f8942f53a593d9df764d0@epcms2p5>
@ 2020-11-23  7:55 ` Bongsu Jeon
  2020-11-23  8:01   ` krzk
  0 siblings, 1 reply; 6+ messages in thread
From: Bongsu Jeon @ 2020-11-23  7:55 UTC (permalink / raw)
  To: krzk, kuba; +Cc: linux-nfc, netdev, devicetree, linux-kernel

Since S3FWRN82 NFC Chip, The UART interface can be used.
S3FWRN82 supports I2C and UART interface.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
---
 .../bindings/net/nfc/samsung,s3fwrn5.yaml     | 28 +++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
index cb0b8a560282..37b3e5ae5681 100644
--- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
+++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
@@ -13,6 +13,7 @@ maintainers:
 properties:
   compatible:
     const: samsung,s3fwrn5-i2c
+    const: samsung,s3fwrn82-uart
 
   en-gpios:
     maxItems: 1
@@ -47,10 +48,19 @@ additionalProperties: false
 required:
   - compatible
   - en-gpios
-  - interrupts
-  - reg
   - wake-gpios
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,s3fwrn5-i2c
+    then:
+      required:
+        - interrupts
+        - reg
+
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
@@ -71,3 +81,17 @@ examples:
             wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
         };
     };
+  # UART example on Raspberry Pi
+  - |
+    &uart0 {
+        status = "okay";
+
+        s3fwrn82_uart {
+            compatible = "samsung,s3fwrn82-uart";
+
+            en-gpios = <&gpio 20 0>;
+            wake-gpios = <&gpio 16 0>;
+
+            status = "okay";
+        };
+    };
-- 
2.17.1


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

* Re: [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface
  2020-11-23  7:55 ` [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface Bongsu Jeon
@ 2020-11-23  8:01   ` krzk
  2020-11-24 11:39     ` Bongsu Jeon
  0 siblings, 1 reply; 6+ messages in thread
From: krzk @ 2020-11-23  8:01 UTC (permalink / raw)
  To: Bongsu Jeon; +Cc: kuba, linux-nfc, netdev, devicetree, linux-kernel

On Mon, Nov 23, 2020 at 04:55:26PM +0900, Bongsu Jeon wrote:
> Since S3FWRN82 NFC Chip, The UART interface can be used.
> S3FWRN82 supports I2C and UART interface.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> ---
>  .../bindings/net/nfc/samsung,s3fwrn5.yaml     | 28 +++++++++++++++++--
>  1 file changed, 26 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> index cb0b8a560282..37b3e5ae5681 100644
> --- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> +++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> @@ -13,6 +13,7 @@ maintainers:
>  properties:
>    compatible:
>      const: samsung,s3fwrn5-i2c
> +    const: samsung,s3fwrn82-uart

This does not work, you need to use enum. Did you run at least
dt_bindings_check?

The compatible should be just "samsung,s3fwrn82". I think it was a
mistake in the first s3fwrn5 submission to add a interface to
compatible.

>  
>    en-gpios:
>      maxItems: 1
> @@ -47,10 +48,19 @@ additionalProperties: false
>  required:
>    - compatible
>    - en-gpios
> -  - interrupts
> -  - reg
>    - wake-gpios
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: samsung,s3fwrn5-i2c
> +    then:
> +      required:
> +        - interrupts
> +        - reg
> +
>  examples:
>    - |
>      #include <dt-bindings/gpio/gpio.h>
> @@ -71,3 +81,17 @@ examples:
>              wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
>          };
>      };
> +  # UART example on Raspberry Pi
> +  - |
> +    &uart0 {
> +        status = "okay";
> +
> +        s3fwrn82_uart {

Just "bluetooth" to follow Devicetree specification.

Best regards,
Krzysztof

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

* Re: [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface
  2020-11-23  8:01   ` krzk
@ 2020-11-24 11:39     ` Bongsu Jeon
  2020-11-24 11:41       ` krzk
  0 siblings, 1 reply; 6+ messages in thread
From: Bongsu Jeon @ 2020-11-24 11:39 UTC (permalink / raw)
  To: krzk; +Cc: Bongsu Jeon, kuba, linux-nfc, netdev, devicetree, linux-kernel

On Mon, Nov 23, 2020 at 5:02 PM krzk@kernel.org <krzk@kernel.org> wrote:
>
> On Mon, Nov 23, 2020 at 04:55:26PM +0900, Bongsu Jeon wrote:
> > Since S3FWRN82 NFC Chip, The UART interface can be used.
> > S3FWRN82 supports I2C and UART interface.
> >
> > Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> > ---
> >  .../bindings/net/nfc/samsung,s3fwrn5.yaml     | 28 +++++++++++++++++--
> >  1 file changed, 26 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> > index cb0b8a560282..37b3e5ae5681 100644
> > --- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> > +++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
> > @@ -13,6 +13,7 @@ maintainers:
> >  properties:
> >    compatible:
> >      const: samsung,s3fwrn5-i2c
> > +    const: samsung,s3fwrn82-uart
>
> This does not work, you need to use enum. Did you run at least
> dt_bindings_check?
>
Sorry. I didn't. I fixed it as below and ran dt_bindings_check.
    compatible:
       oneOf:
           - enum:
               - samsung,s3fwrn5-i2c
               - samsung,s3fwrn82


> The compatible should be just "samsung,s3fwrn82". I think it was a
> mistake in the first s3fwrn5 submission to add a interface to
> compatible.
>
Ok. I will change the name.

> >
> >    en-gpios:
> >      maxItems: 1
> > @@ -47,10 +48,19 @@ additionalProperties: false
> >  required:
> >    - compatible
> >    - en-gpios
> > -  - interrupts
> > -  - reg
> >    - wake-gpios
> >
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: samsung,s3fwrn5-i2c
> > +    then:
> > +      required:
> > +        - interrupts
> > +        - reg
> > +
> >  examples:
> >    - |
> >      #include <dt-bindings/gpio/gpio.h>
> > @@ -71,3 +81,17 @@ examples:
> >              wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
> >          };
> >      };
> > +  # UART example on Raspberry Pi
> > +  - |
> > +    &uart0 {
> > +        status = "okay";
> > +
> > +        s3fwrn82_uart {
>
> Just "bluetooth" to follow Devicetree specification.
Sorry. I don't understand this comment.
Could you explain it?
Does it mean i need to refer to the net/broadcom-bluetooth.txt?

>
> Best regards,
> Krzysztof

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

* Re: [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface
  2020-11-24 11:39     ` Bongsu Jeon
@ 2020-11-24 11:41       ` krzk
  2020-11-25  3:08         ` Bongsu Jeon
  0 siblings, 1 reply; 6+ messages in thread
From: krzk @ 2020-11-24 11:41 UTC (permalink / raw)
  To: Bongsu Jeon
  Cc: Bongsu Jeon, kuba, linux-nfc, netdev, devicetree, linux-kernel

On Tue, Nov 24, 2020 at 08:39:40PM +0900, Bongsu Jeon wrote:
> On Mon, Nov 23, 2020 at 5:02 PM krzk@kernel.org <krzk@kernel.org> wrote:
> >
> > On Mon, Nov 23, 2020 at 04:55:26PM +0900, Bongsu Jeon wrote:
 > >  examples:
> > >    - |
> > >      #include <dt-bindings/gpio/gpio.h>
> > > @@ -71,3 +81,17 @@ examples:
> > >              wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
> > >          };
> > >      };
> > > +  # UART example on Raspberry Pi
> > > +  - |
> > > +    &uart0 {
> > > +        status = "okay";
> > > +
> > > +        s3fwrn82_uart {
> >
> > Just "bluetooth" to follow Devicetree specification.
> Sorry. I don't understand this comment.
> Could you explain it?
> Does it mean i need to refer to the net/broadcom-bluetooth.txt?

The node name should be "bluetooth", not "s3fwrn82_uart", because of
Devicetree naming convention - node names should represent generic class
of a device.

Best regards,
Krzysztof


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

* Re: [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface
  2020-11-24 11:41       ` krzk
@ 2020-11-25  3:08         ` Bongsu Jeon
  2020-11-25  7:37           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Bongsu Jeon @ 2020-11-25  3:08 UTC (permalink / raw)
  To: krzk; +Cc: Bongsu Jeon, kuba, linux-nfc, netdev, devicetree, linux-kernel

On 11/24/20, krzk@kernel.org <krzk@kernel.org> wrote:
> On Tue, Nov 24, 2020 at 08:39:40PM +0900, Bongsu Jeon wrote:
>> On Mon, Nov 23, 2020 at 5:02 PM krzk@kernel.org <krzk@kernel.org> wrote:
>> >
>> > On Mon, Nov 23, 2020 at 04:55:26PM +0900, Bongsu Jeon wrote:
>  > >  examples:
>> > >    - |
>> > >      #include <dt-bindings/gpio/gpio.h>
>> > > @@ -71,3 +81,17 @@ examples:
>> > >              wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
>> > >          };
>> > >      };
>> > > +  # UART example on Raspberry Pi
>> > > +  - |
>> > > +    &uart0 {
>> > > +        status = "okay";
>> > > +
>> > > +        s3fwrn82_uart {
>> >
>> > Just "bluetooth" to follow Devicetree specification.
>> Sorry. I don't understand this comment.
>> Could you explain it?
>> Does it mean i need to refer to the net/broadcom-bluetooth.txt?
>
> The node name should be "bluetooth", not "s3fwrn82_uart", because of
> Devicetree naming convention - node names should represent generic class
> of a device.
>
Actually, RN82 is the nfc device.
So, is it okay to use the name as nfc instead of Bluetooth?

> Best regards,
> Krzysztof
>
>

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

* Re: [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface
  2020-11-25  3:08         ` Bongsu Jeon
@ 2020-11-25  7:37           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-25  7:37 UTC (permalink / raw)
  To: Bongsu Jeon
  Cc: Bongsu Jeon, kuba, linux-nfc, netdev, devicetree, linux-kernel

On Wed, 25 Nov 2020 at 04:08, Bongsu Jeon <bongsu.jeon2@gmail.com> wrote:
>
> On 11/24/20, krzk@kernel.org <krzk@kernel.org> wrote:
> > On Tue, Nov 24, 2020 at 08:39:40PM +0900, Bongsu Jeon wrote:
> >> On Mon, Nov 23, 2020 at 5:02 PM krzk@kernel.org <krzk@kernel.org> wrote:
> >> >
> >> > On Mon, Nov 23, 2020 at 04:55:26PM +0900, Bongsu Jeon wrote:
> >  > >  examples:
> >> > >    - |
> >> > >      #include <dt-bindings/gpio/gpio.h>
> >> > > @@ -71,3 +81,17 @@ examples:
> >> > >              wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
> >> > >          };
> >> > >      };
> >> > > +  # UART example on Raspberry Pi
> >> > > +  - |
> >> > > +    &uart0 {
> >> > > +        status = "okay";
> >> > > +
> >> > > +        s3fwrn82_uart {
> >> >
> >> > Just "bluetooth" to follow Devicetree specification.
> >> Sorry. I don't understand this comment.
> >> Could you explain it?
> >> Does it mean i need to refer to the net/broadcom-bluetooth.txt?
> >
> > The node name should be "bluetooth", not "s3fwrn82_uart", because of
> > Devicetree naming convention - node names should represent generic class
> > of a device.
> >
> Actually, RN82 is the nfc device.
> So, is it okay to use the name as nfc instead of Bluetooth?

Oops, of course, nfc, I don't know why the Bluetooth stuck in my mind.

Best regards,
Krzysztof

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

end of thread, other threads:[~2020-11-25  7:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201123075526epcms2p59410a8ba942f8942f53a593d9df764d0@epcms2p5>
2020-11-23  7:55 ` [PATCH net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Support a UART interface Bongsu Jeon
2020-11-23  8:01   ` krzk
2020-11-24 11:39     ` Bongsu Jeon
2020-11-24 11:41       ` krzk
2020-11-25  3:08         ` Bongsu Jeon
2020-11-25  7:37           ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).