devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: POPESCU Catalin <catalin.popescu@leica-geosystems.com>,
	Sherry Sun <sherry.sun@nxp.com>,
	Amitkumar Karwar <amitkumar.karwar@nxp.com>,
	Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>,
	"marcel@holtmann.org" <marcel@holtmann.org>,
	"luiz.dentz@gmail.com" <luiz.dentz@gmail.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	GEO-CHHER-bsp-development
	<bsp-development.geo@leica-geosystems.com>
Subject: Re: [PATCH 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset
Date: Tue, 22 Oct 2024 10:13:04 +0200	[thread overview]
Message-ID: <20241022081304.d2tpnn4eyf3adxg2@pengutronix.de> (raw)
In-Reply-To: <a11cf72d-3878-4af1-89c5-c66d55794ea6@kernel.org>

On 24-10-22, Krzysztof Kozlowski wrote:
> On 22/10/2024 09:30, Krzysztof Kozlowski wrote:
> > On 22/10/2024 09:12, Marco Felsch wrote:
> >> On 24-10-22, Krzysztof Kozlowski wrote:
> >>> On 21/10/2024 12:25, Marco Felsch wrote:
> >>>> On 24-10-21, Krzysztof Kozlowski wrote:
> >>>>> On 21/10/2024 08:41, Marco Felsch wrote:
> >>>>>> On 24-10-07, Krzysztof Kozlowski wrote:
> >>
> >> ...
> >>
> >>>>>>> Based on earlier message:
> >>>>>>>
> >>>>>>> "For NXP WIFI/BT chip, WIFI and BT share the one PDn pin, which means
> >>>>>>> that both wifi and BT controller will be powered on and off at the same
> >>>>>>> time."
> >>>>>>>
> >>>>>>> but maybe that's not needed. No clue, I don't know the hardware. But be
> >>>>>>> carefully what you write in the bindings, because then it will be ABI.
> >>>>>>
> >>>>>> We noticed the new power-sequencing infrastructure which is part of 6.11
> >>>>>> too but I don't think that this patch is wrong. The DT ABI won't break
> >>>>>> if we switch to the power-sequencing later on since the "reset-gpios"
> >>>>>> are not marked as required. So it is up to the driver to handle it
> >>>>>> either via a separate power-sequence driver or via "power-supply" and
> >>>>>> "reset-gpios" directly.
> >>>>>
> >>>>> That's not the point. We expect correct hardware description. If you say
> >>>>> now it has "reset-gpios" but later say "actually no, because it has
> >>>>> PMU", I respond: no. Describe the hardware, not current Linux.
> >>>>
> >>>> I know that DT abstracts the HW. That said I don't see the problem with
> >>>> this patch. The HW is abstracted just fine:
> >>>>
> >>>> shared PDn          -> reset-gpios
> >>>> shared power-supply -> vcc-supply
> >>>>
> >>>> Right now the DT ABI for the BT part is incomplete since it assume a
> >>>> running WLAN part or some hog-gpios to pull the device out-of-reset
> >>>> which is addressed by this patchset.
> >>>>
> >>>> Making use of the new power-sequencing fw is a Linux detail and I don't
> >>>> see why the DT can't be extended later on. We always extend the DT if
> >>>> something is missing or if we found a better way to handle devices.
> >>>
> >>> Sure, although I am not really confident that you understand the
> >>> implications - you will not be able to switch to proper power-sequencing
> >>> with above bindings, because it will not be just possible without
> >>> breaking the ABI or changing hardware description (which you say it is
> >>> "fine", so complete/done). I am fine with it, just mind the implications.
> >>
> >> Sorry can you please share your concerns? I don't get the point yet why
> >> we do break the DT ABI if we are going from
> > 
> > Not necessarily breaking ABI, but changing the description.
> >>
> >> bt {
> >> 	reset-gpios = <&gpio 4 0>;
> >> 	vcc-supply = <&supply>;
> >> };
> >>
> >> to
> >>
> >> bt {
> >> 	vcc-supply = <&pmu_supply>;
> > 
> > ...because you just removed reset-gpios which is a property of this device.

An optional property. That beeing said, dropping the *-gpios was the
solution for the Qualcomm DTS as well:

bd37ce2eeb84 ("arm64: dts: qcom: qrb5165-rb5: add the Wifi node")

> >> };
> >>
> >> or:
> >>
> >> bt {
> >> 	pmu = <&pmu>;
> 
> Ah, and I forgot here: this also might not be correct, because if you
> have PMU, then the PMU consumes VCC, not the Bluetooth. Therefore both
> of above two solutions might be inaccurate description if you decide to
> go with PMU.
> 
> >> };
> >>
> >> Of course the driver need to support all 2/3 cases due to backward
> >> compatibility but from DT pov I don't see any breakage since we already
> >> need to define the power handling properties (gpio & supply) as
> >> optional.
> > 
> > Either existing binding is complete or not. Not half-done.

As I remember DT ABI must be backward compatible. I understand this as
followed: In our current use-case the dt-bindings don't describe any
required hw resource so we need to mark them as optional to be backward
compatible.

Regarding your above comment: "complete or not. Not half-done". Do you
see the current dt-bindings for this particular device as complete or
not? In other words can we mark the reset-gpios and vcc-supply
properties as required albeit this would break the DT ABI since all
current users don't specify it?

> >> That beeing said I don't see the need for a PMU driver for this WLAN/BT
> >> combi chip which is way simpler than the Qualcomm one from Bartosz. Also
> >> there is physically no PMU device which powers the chip unlike the
> >> Qualcomm one. I'm not sure if you would accept virtual PMU devices.
> > 
> > Virtual PMU, of course not. I would like to have complete hardware
> > description, not something which matches your current driver model.

Okay so PMU is no option and we don't have to consider this idea any
longer. So reset-gpios and vcc-supply it is :) and I don't expect this
to change.

Regards,
  Marco

  reply	other threads:[~2024-10-22  8:13 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 11:35 [PATCH 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
2024-10-04 11:35 ` [PATCH 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
2024-10-06  9:04   ` Sherry Sun
2024-10-07 12:45     ` POPESCU Catalin
2024-11-20  4:48       ` Neeraj Sanjay Kale
2024-10-04 15:24 ` [PATCH 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Conor Dooley
2024-10-06  8:49 ` Sherry Sun
2024-10-06 11:33   ` Krzysztof Kozlowski
2024-10-07 12:58     ` POPESCU Catalin
2024-10-07 14:54       ` Krzysztof Kozlowski
2024-10-21  6:41         ` Marco Felsch
2024-10-21  7:50           ` Krzysztof Kozlowski
2024-10-21 10:25             ` Marco Felsch
2024-10-22  5:11               ` Krzysztof Kozlowski
2024-10-22  7:12                 ` Marco Felsch
2024-10-22  7:30                   ` Krzysztof Kozlowski
2024-10-22  7:32                     ` Krzysztof Kozlowski
2024-10-22  8:13                       ` Marco Felsch [this message]
2024-10-22  8:23                         ` Krzysztof Kozlowski
2024-10-22  5:13               ` Sherry Sun
2024-10-22  7:23                 ` Marco Felsch
2024-10-22  8:09                   ` Sherry Sun
2024-10-22  8:21                     ` POPESCU Catalin
2024-10-22  8:22                     ` Marco Felsch
2024-10-22 14:24                       ` Sherry Sun
2024-10-22 15:49                         ` POPESCU Catalin
2024-10-23 14:16                           ` Sherry Sun
2024-10-23 14:38                             ` POPESCU Catalin
2024-10-28  4:27                               ` Sherry Sun
2024-10-28  9:00                                 ` Marco Felsch
2024-10-28  9:59                                   ` Sherry Sun
2024-10-28 11:51                                     ` Marco Felsch
2024-10-28 13:16                                       ` Sherry Sun
2024-10-28 15:00                                         ` Marco Felsch
2024-11-18 22:17                                           ` Marco Felsch
2024-11-19 10:09                                             ` Sherry Sun
2024-11-19 12:51                                               ` Marco Felsch
2024-11-20  3:14                                                 ` ttyRe: " Sherry Sun
2024-11-20  4:44                                                   ` Neeraj Sanjay Kale

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=20241022081304.d2tpnn4eyf3adxg2@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=amitkumar.karwar@nxp.com \
    --cc=bsp-development.geo@leica-geosystems.com \
    --cc=catalin.popescu@leica-geosystems.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=neeraj.sanjaykale@nxp.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sherry.sun@nxp.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 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).