All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>, Kalle Valo <kvalo@kernel.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
	"Tony Lindgren" <tony@atomide.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Felipe Balbi" <balbi@kernel.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] p54spi: convert to devicetree
Date: Tue, 14 Mar 2023 21:18:55 +0100	[thread overview]
Message-ID: <e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com> (raw)
In-Reply-To: <20230314163201.955689-1-arnd@kernel.org>

Hi,

On 3/14/23 17:30, Arnd Bergmann wrote:
> The Prism54 SPI driver hardcodes GPIO numbers and expects users to
> pass them as module parameters, apparently a relic from its life as a
> staging driver. This works because there is only one user, the Nokia
> N8x0 tablet.
> 
> Convert this to the gpio descriptor interface and move the gpio
> line information into devicetree to improve this and simplify the
> code at the same time.

Yes, this is definitely the right idea/way. From what I remember, Kalle
Valo was partially involved in p54spi/stlc45xx. The details are very fuzzy.
So,  I could be totally wrong. From what I remember Kalle was working
for Nokia (or as a contractor for Nokia?) at the time.

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I've seen the device-tree comments. That said, this is/was overdue.
You can definitely have this for a v2 :).
Acked-by: Christian Lamparter <chunkeey@gmail.com>

Thanks you!
Christian

> ---
> As I don't have an N8x0, this is completely untested.
> 
> I listed the driver authors (Johannes and Christian) as the maintainers
> of the binding document, but I don't know if they actually have this
> hardware. It might be better to list someone who is actually using it.
> 
> Among the various chip identifications, I wasn't sure which one to
> use for the compatible string and the name of the binding document.
> I picked st,stlc4560 as that was cited as the version in the N800
> on multiple websites.
> ---
>   .../bindings/net/wireless/st,stlc45xx.yaml    | 64 +++++++++++++++++
>   MAINTAINERS                                   |  1 +
>   arch/arm/boot/dts/omap2.dtsi                  |  4 ++
>   arch/arm/boot/dts/omap2420-n8x0-common.dtsi   | 12 ++++
>   arch/arm/mach-omap2/board-n8x0.c              | 18 -----
>   drivers/net/wireless/intersil/p54/p54spi.c    | 69 +++++++------------
>   drivers/net/wireless/intersil/p54/p54spi.h    |  3 +
>   7 files changed, 109 insertions(+), 62 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml b/Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
> new file mode 100644
> index 000000000000..45bc4fab409a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/wireless/st,stlc45xx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ST/Intersil/Conexant stlc45xx/p54spi/cx3110x SPI wireless device
> +
> +maintainers:
> +  - Johannes Berg <johannes@sipsolutions.net>
> +  - Christian Lamparter <chunkeey@web.de>
Can you please change that to: Christian Lamparter <chunkeey@gmail.com> ?
(the @web.de/googlemail.com address still work too, but they are now just
forwarding)

> +description: |
> +  The SPI variant of the Intersil Prism54 wireless device was sold
> +  under a variety of names, including ST Microelectronics STLC5460
> +  and Conexant CX3110x.
> +
> +allOf:
> +  - $ref: ieee80211.yaml#
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - st,stlc4550
> +      - st,stlc4560
> +      - isil,p54spi
> +      - cnxt,3110x
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  power-gpios:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +   gpio {
> +     gpio-controller;
> +     #gpio-cells = <1>;
> +     #interupt-cells = <1>;
> +   };
> +   spi {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      wifi@0 {
> +        reg = <0>;
> +        compatible = "st,stlc4560";
> +        spi-max-frequency = <48000000>;
> +        interrupts-extended = <&gpio 23>;
> +        power-gpios = <&gpio 1>;
> +     };
> +   };


WARNING: multiple messages have this Message-ID (diff)
From: Christian Lamparter <chunkeey@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>, Kalle Valo <kvalo@kernel.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
	"Tony Lindgren" <tony@atomide.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Felipe Balbi" <balbi@kernel.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] p54spi: convert to devicetree
Date: Tue, 14 Mar 2023 21:18:55 +0100	[thread overview]
Message-ID: <e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com> (raw)
In-Reply-To: <20230314163201.955689-1-arnd@kernel.org>

Hi,

On 3/14/23 17:30, Arnd Bergmann wrote:
> The Prism54 SPI driver hardcodes GPIO numbers and expects users to
> pass them as module parameters, apparently a relic from its life as a
> staging driver. This works because there is only one user, the Nokia
> N8x0 tablet.
> 
> Convert this to the gpio descriptor interface and move the gpio
> line information into devicetree to improve this and simplify the
> code at the same time.

Yes, this is definitely the right idea/way. From what I remember, Kalle
Valo was partially involved in p54spi/stlc45xx. The details are very fuzzy.
So,  I could be totally wrong. From what I remember Kalle was working
for Nokia (or as a contractor for Nokia?) at the time.

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I've seen the device-tree comments. That said, this is/was overdue.
You can definitely have this for a v2 :).
Acked-by: Christian Lamparter <chunkeey@gmail.com>

Thanks you!
Christian

> ---
> As I don't have an N8x0, this is completely untested.
> 
> I listed the driver authors (Johannes and Christian) as the maintainers
> of the binding document, but I don't know if they actually have this
> hardware. It might be better to list someone who is actually using it.
> 
> Among the various chip identifications, I wasn't sure which one to
> use for the compatible string and the name of the binding document.
> I picked st,stlc4560 as that was cited as the version in the N800
> on multiple websites.
> ---
>   .../bindings/net/wireless/st,stlc45xx.yaml    | 64 +++++++++++++++++
>   MAINTAINERS                                   |  1 +
>   arch/arm/boot/dts/omap2.dtsi                  |  4 ++
>   arch/arm/boot/dts/omap2420-n8x0-common.dtsi   | 12 ++++
>   arch/arm/mach-omap2/board-n8x0.c              | 18 -----
>   drivers/net/wireless/intersil/p54/p54spi.c    | 69 +++++++------------
>   drivers/net/wireless/intersil/p54/p54spi.h    |  3 +
>   7 files changed, 109 insertions(+), 62 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml b/Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
> new file mode 100644
> index 000000000000..45bc4fab409a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/wireless/st,stlc45xx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ST/Intersil/Conexant stlc45xx/p54spi/cx3110x SPI wireless device
> +
> +maintainers:
> +  - Johannes Berg <johannes@sipsolutions.net>
> +  - Christian Lamparter <chunkeey@web.de>
Can you please change that to: Christian Lamparter <chunkeey@gmail.com> ?
(the @web.de/googlemail.com address still work too, but they are now just
forwarding)

> +description: |
> +  The SPI variant of the Intersil Prism54 wireless device was sold
> +  under a variety of names, including ST Microelectronics STLC5460
> +  and Conexant CX3110x.
> +
> +allOf:
> +  - $ref: ieee80211.yaml#
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - st,stlc4550
> +      - st,stlc4560
> +      - isil,p54spi
> +      - cnxt,3110x
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  power-gpios:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +   gpio {
> +     gpio-controller;
> +     #gpio-cells = <1>;
> +     #interupt-cells = <1>;
> +   };
> +   spi {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      wifi@0 {
> +        reg = <0>;
> +        compatible = "st,stlc4560";
> +        spi-max-frequency = <48000000>;
> +        interrupts-extended = <&gpio 23>;
> +        power-gpios = <&gpio 1>;
> +     };
> +   };


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-03-14 20:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 16:30 [PATCH] p54spi: convert to devicetree Arnd Bergmann
2023-03-14 16:30 ` Arnd Bergmann
2023-03-14 16:44 ` Johannes Berg
2023-03-14 16:44   ` Johannes Berg
2023-03-14 19:57 ` Krzysztof Kozlowski
2023-03-14 19:57   ` Krzysztof Kozlowski
2023-03-14 21:40   ` Arnd Bergmann
2023-03-14 21:40     ` Arnd Bergmann
2023-03-15  6:32     ` Krzysztof Kozlowski
2023-03-15  6:32       ` Krzysztof Kozlowski
2023-03-15  6:50       ` Arnd Bergmann
2023-03-15  6:50         ` Arnd Bergmann
2023-03-15  7:11         ` Krzysztof Kozlowski
2023-03-15  7:11           ` Krzysztof Kozlowski
2023-03-14 20:18 ` Christian Lamparter [this message]
2023-03-14 20:18   ` Christian Lamparter
2023-03-15  5:32   ` Kalle Valo
2023-03-15  5:32     ` Kalle Valo
2023-03-17 21:16 ` Rob Herring
2023-03-17 21:16   ` Rob Herring

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=e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com \
    --to=chunkeey@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=balbi@kernel.org \
    --cc=bcousson@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.