linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petlozu Pravareshwar <petlozup@nvidia.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"dmitry.osipenko@collabora.com" <dmitry.osipenko@collabora.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"Kartik ." <kkartik@nvidia.com>,
	"cai.huoqing@linux.dev" <cai.huoqing@linux.dev>,
	Sandipan Patra <spatra@nvidia.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] soc/tegra: pmc: Add IO Pad table for tegra234
Date: Mon, 8 Aug 2022 20:10:09 +0000	[thread overview]
Message-ID: <DM6PR12MB3164E33542018A69895585CAB5639@DM6PR12MB3164.namprd12.prod.outlook.com> (raw)
In-Reply-To: <6fd64502-6061-f14f-b8c4-b19ab6e26dd5@codethink.co.uk>

> 
> On 05/08/2022 11:41, Petlozu Pravareshwar wrote:
> > Add IO PAD table for tegra234 to allow configuring dpd mode and
> > switching the pins to 1.8V or 3.3V as needed.
> >
> > In tegra234, DPD registers are reorganized such that there is a
> > DPD_REQ register and a DPD_STATUS register per pad group.
> > This change accordingly updates the PMC driver.
> >
> > Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
> > ---
> >   drivers/soc/tegra/pmc.c | 116
> ++++++++++++++++++++++++++++++++++++++--
> >   1 file changed, 112 insertions(+), 4 deletions(-)
> 
> 
> snip
> 
> >   /**
> > @@ -1546,6 +1560,14 @@ static int
> tegra_io_pad_get_dpd_register_bit(struct tegra_pmc *pmc,
> >       if (pad->dpd == UINT_MAX)
> >               return -ENOTSUPP;
> >
> > +     if (pmc->soc->has_reorg_hw_dpd_reg_impl) {
> > +             *mask = BIT(pad->dpd);
> > +             *status = pmc->soc->regs->reorg_dpd_status[pad->reg_index];
> > +             *request =
> > + pmc->soc->regs->reorg_dpd_req[pad->reg_index];
> > +
> > +             goto done;
> > +     }
> > +
> >       *mask = BIT(pad->dpd % 32);
> >
> >       if (pad->dpd < 32) {
> > @@ -1556,6 +1578,7 @@ static int
> tegra_io_pad_get_dpd_register_bit(struct tegra_pmc *pmc,
> >               *request = pmc->soc->regs->dpd2_req;
> >       }
> >
> > +done:
> >       return 0;
> >   }
> >
> > @@ -3132,6 +3155,7 @@ static const struct tegra_pmc_soc
> tegra20_pmc_soc = {
> >       .num_pmc_clks = 0,
> >       .has_blink_output = true,
> >       .has_usb_sleepwalk = true,
> > +     .has_reorg_hw_dpd_reg_impl = false,
> >   };
> 
> I don't think you need to set false values in these blocks, the default should
> be false.
Agree. Will update the patch accordingly.

Thanks.

      reply	other threads:[~2022-08-08 20:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 10:41 [PATCH] soc/tegra: pmc: Add IO Pad table for tegra234 Petlozu Pravareshwar
2022-08-08 10:50 ` Ben Dooks
2022-08-08 20:10   ` Petlozu Pravareshwar [this message]

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=DM6PR12MB3164E33542018A69895585CAB5639@DM6PR12MB3164.namprd12.prod.outlook.com \
    --to=petlozup@nvidia.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=cai.huoqing@linux.dev \
    --cc=dmitry.osipenko@collabora.com \
    --cc=jonathanh@nvidia.com \
    --cc=kkartik@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=spatra@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /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).