[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aAo5leoKBdCUvImP@pengutronix.de>
Date: Thu, 24 Apr 2025 15:16:05 +0200
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Artur Rojek <artur@...clusive.pl>
Cc: Johannes Berg <johannes@...solutions.net>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-wireless@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Jakub Klama <jakub@...clusive.pl>,
Wojciech Kloska <wojciech@...clusive.pl>,
Ulf Axelsson <ulf.axelsson@...dicsemi.no>
Subject: Re: [RFC PATCH 1/2] net: wireless: Add Nordic nRF70 series Wi-Fi
driver
On Fri, Apr 18, 2025 at 02:46:34PM +0200, Artur Rojek wrote:
> Hi Sascha,
>
> thanks for the review, reply inline.
>
>
> > > +
> > > + ret = gpiod_direction_output(priv->buck_en, 0);
> > > + if (ret) {
> > > + dev_err(dev, "Unable to set buck_en direction\n");
> > > + return -EIO;
> > > + }
> >
> > Should this "bucken" GPIO rather be a regulator?
> >
> > Is this really mandatory? It sounds like it could be hardwired to some
> > fixed voltage.
>
> Take this with a grain of salt, as I am not a hardware designer.
> Nordic's Product Specification document [1] stipulates that BUCKEN line
> controls the PWR IP core. In order to start the IC, a power up sequence
> is required: first the various power supply lines, then BUCKEN, then
> IOVDD signal. Similar with a power down sequence.
> To me, this reads that BUCKEN cannot be simply wired to some fixed
> voltage and needs some sort of state control. Additionally, it is
> the (only?) way for the software to reset the IC and put it into a known
> state during probe, or after a hang.
> At least for the second case, the driver needs some sort of power
> control, whether it's directly the BUCKEN line, or some other circuit
> that in turn flicks the BUCKEN. I could rename it to 'vpwr-supply' if
> that makes things more transparent. I would risk saying that it makes
> it mandatory.
>
> PS. The annoying part about the regulator API is that it reference
> counts its usage, and as such regulator_disable() cannot be called
> without a prior call to regulator_enable(). So to power-cycle the IC via
> the BUCKEN line, I will need to do the following sequence:
> regulator_enable() -> regulator_disable() -> regulator_enable()
> But I can live with that ;)
Ok, With this explanation I think it's best to use it as GPIO like you
did. It just sounded like the regulator API would fit here, hence the
question.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists