LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Arnd Bergmann <arnd@arndb.de>, Linus Walleij <linus.walleij@linaro.org>
Cc: Piyush Mehta <piyush.mehta@xilinx.com>,
	Zou Wei <zou_wei@huawei.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	Michal Simek <michal.simek@xilinx.com>, <wendy.liang@xilinx.com>,
	Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Rajan Vaja <rajan.vaja@xilinx.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, git <git@xilinx.com>,
	"Srinivas Goud" <sgoud@xilinx.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 1/3] firmware: zynqmp: Add MMIO read and write support for PS_MODE pin
Date: Wed, 11 Aug 2021 16:04:28 +0200	[thread overview]
Message-ID: <6f067aa8-27e2-3579-54e5-419f940f628d@xilinx.com> (raw)
In-Reply-To: <CAK8P3a3ZdZSdiX6_AeSW4qSFhUp+wKrUe6S5z5bKDtcU068sjQ@mail.gmail.com>

Hi Arnd,

On 8/11/21 3:46 PM, Arnd Bergmann wrote:
> On Wed, Aug 11, 2021 at 3:08 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>>
>> On Thu, Aug 5, 2021 at 7:42 PM Piyush Mehta <piyush.mehta@xilinx.com> wrote:
>>
>>> Add Xilinx ZynqMP firmware MMIO APIs support to set and get PS_MODE
>>> pins value and status. These APIs create an interface path between
>>> mode pin controller driver and low-level API to access GPIO pins.
>>>
>>> Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
>>> ---
>>> Changes in v2:
>>> - Added Xilinx ZynqMP firmware MMIO API support to set and get pin
>>>   value and status.
>>
>> I doubt this is "GPIO".
>> General Purpose? I think not. It seems to be about boot mode.
> 
> Agreed.

here is register description.

https://www.xilinx.com/html_docs/registers/ug1087/crl_apb___boot_pin_ctrl.html#

> 
>> If you need a userspace ABI, then add sysfs files to this firmware
>> driver instead of bridging it to the GPIO subsystem.
> 
> I don't really want custom user interfaces in firmware drivers either.
> 
> What is the high-level description of the 'PS_MODE' here? Is
> this perhaps something we already have a user interface for?

The reason why this can't be mapped as memory mapped device is that it
is in IP which has be secure. That's why routing is done via firmware
driver.

Based on
https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf

page 46

PS_MODE Input/Output Dedicated 4-bit boot mode pins sampled on POR
deassertion

It means ROM just capture boot mode at start that's why they have
special meaning and after it is free to use for whatever purpose you
want which seems to pretty much as generic purpose I/O.

I wrote more comments in reply to Linus already.

Thanks,
Michal

  reply	other threads:[~2021-08-11 14:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 17:42 [PATCH V2 0/3] gpio: modepin: Add driver support for modepin GPIO controller Piyush Mehta
2021-08-05 17:42 ` [PATCH V2 1/3] firmware: zynqmp: Add MMIO read and write support for PS_MODE pin Piyush Mehta
2021-08-06  5:49   ` Michal Simek
2021-08-11 13:08   ` Linus Walleij
2021-08-11 13:46     ` Arnd Bergmann
2021-08-11 14:04       ` Michal Simek [this message]
2021-08-11 15:14   ` Linus Walleij
2021-08-05 17:42 ` [PATCH V2 2/3] dt-bindings: gpio: zynqmp: Add binding documentation for modepin Piyush Mehta
2021-08-13 19:01   ` Rob Herring
2021-08-16  6:27     ` Michal Simek
2021-08-05 17:42 ` [PATCH V2 3/3] gpio: modepin: Add driver support for modepin GPIO controller Piyush Mehta
2021-08-11 12:59   ` Linus Walleij
2021-08-11 13:29     ` Michal Simek
2021-08-11 14:45       ` Linus Walleij
2021-08-11 15:12   ` Linus Walleij

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=6f067aa8-27e2-3579-54e5-419f940f628d@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=arnd@arndb.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iwamatsu@nigauri.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=piyush.mehta@xilinx.com \
    --cc=rajan.vaja@xilinx.com \
    --cc=robh+dt@kernel.org \
    --cc=sgoud@xilinx.com \
    --cc=wendy.liang@xilinx.com \
    --cc=zou_wei@huawei.com \
    --subject='Re: [PATCH V2 1/3] firmware: zynqmp: Add MMIO read and write support for PS_MODE pin' \
    /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

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).