Re: [PATCH V7 5/5] arm64: dts: qcom: sc7280: Add pm8008 support for sc7280-idp

From: Stephen Boyd
Date: Tue Mar 08 2022 - 15:50:47 EST


Quoting Satya Priya Kakitapalli (Temp) (2022-03-07 06:49:31)
>
> On 3/1/2022 2:06 AM, Stephen Boyd wrote:
> > Quoting Satya Priya Kakitapalli (Temp) (2022-02-28 06:25:06)
> >> On 2/19/2022 7:31 AM, Stephen Boyd wrote:
> >>> Quoting Satya Priya (2022-02-18 03:01:03)
> >>>> + pins = "gpio4";
> >>>> + function = "normal";
> >>>> + bias-disable;
> >>>> + output-high;
> >>> Is this a reset signal? Should the driver be deasserting the reset when
> >>> it is ready? That could be the same time the gpio is acquired.
> >>
> >> I didn't get your question exactly.. hope this answers your query
> >>
> >> The pm8008 chip needs this gpio to be toggled , in order to come out of
> >> reset and start any transactions..
> >>
> >> Please let me know if you have more queries
> > Yes that answers it for me. Thanks.
> >
> > This is a reset gpio and should be a DT property like
> >
> > reset-gpios = <&pm8350c_gpios 4 GPIO_ACTIVE_HIGH>
> >
> > in the pm8008 node. When the driver probes it should get the gpio and
> > do any toggling to take it out of reset. It shouldn't be done through
> > pinconf settings.
>
>
> Okay, IIUC,  I have to remove the output-high here and add reset-gpios
> in pm8008 DT node. And then add below code in pm8008 mfd driver probe
>
> +               chip->reset_gpio = devm_gpiod_get(chip->dev, "reset",
> GPIOD_OUT_HIGH);
> +               if (IS_ERR(chip->reset_gpio)) {
> +                       dev_err(chip->dev, "failed to acquire reset
> gpio\n");
> +                       return PTR_ERR(chip->reset_gpio);
> +               }
> +               gpiod_set_value(chip->reset_gpio, 1);
>
> This is working for me, Please let me know if I'm  missing something.
>

Yep looks good to me.