This patch adds support for the zynqmp modepin GPIO controller and
documented for the same. GPIO modepin driver set and get the value and
status of the PS_MODE pin, based on device-tree pin configuration.
These four-bits boot-mode pins are dedicated configurable as input/output.
After the stabilization of the system,these mode pins are sampled.
To access GPIO pins, added Xilinx ZynqMP firmware MDIO API support to
set and get PS_MODE pins value and status. These APIs are interface
APIs, between the mode pin controller driver and low-level API.
---
Changes in v2:
- Added Xilinx ZynqMP firmware MMIO API support to set and get pin
value and status.
- DT Documentation- Addressed review comments: Update commit message
- Modepin driver- Addressed review comments:
- Update APIs
- Removed unwanted variables
- Handle return path for probe function
Review Comments:
https://lore.kernel.org/linux-arm-kernel/20210624205055.GA1961487@robh.at.kernel.org/T/#u
Changes in v3:
- Update example in dt-bindings documentation
- Update probe function return value
- Remove unnecessary print and header file
Review Comments:
https://lore.kernel.org/linux-arm-kernel/20210805174219.3000667-1-piyush.mehta@xilinx.com/#t
---
Piyush Mehta (3):
firmware: zynqmp: Add MMIO read and write support for PS_MODE pin
dt-bindings: gpio: zynqmp: Add binding documentation for modepin
gpio: modepin: Add driver support for modepin GPIO controller
.../bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml | 43 ++++++
drivers/firmware/xilinx/zynqmp.c | 46 +++++++
drivers/gpio/Kconfig | 12 ++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-zynqmp-modepin.c | 153 +++++++++++++++++++++
include/linux/firmware/xlnx-zynqmp.h | 14 ++
6 files changed, 269 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml
create mode 100644 drivers/gpio/gpio-zynqmp-modepin.c
--
2.7.4
@@ -0,0 +1,43 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:ZynqMP Mode Pin GPIO controller++description:+PS_MODE is 4-bits boot mode pins sampled on POR deassertion. Mode Pin+GPIO controller with configurable from numbers of pins (from 0 to 3 per+PS_MODE). Every pin can be configured as input/output.++maintainers:+-Piyush Mehta <piyush.mehta@xilinx.com>++properties:+compatible:+const:xlnx,zynqmp-gpio-modepin++gpio-controller:true++"#gpio-cells":+const:2++required:+-compatible+-gpio-controller+-"#gpio-cells"++additionalProperties:false++examples:+-|+zynqmp-firmware {+gpio {+compatible = "xlnx,zynqmp-gpio-modepin";+gpio-controller;+#gpio-cells = <2>;+};+};++...
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 <redacted>
Acked-by: Michal Simek <redacted>
Acked-by: Linus Walleij <redacted>
---
Changes in v2:
- Added Xilinx ZynqMP firmware MMIO API support to set and get pin
value and status.
---
drivers/firmware/xilinx/zynqmp.c | 46 ++++++++++++++++++++++++++++++++++++
include/linux/firmware/xlnx-zynqmp.h | 14 +++++++++++
2 files changed, 60 insertions(+)
@@ -28,6 +28,13 @@/* Max HashMap Order for PM API feature check (1<<7 = 128) */#define PM_API_FEATURE_CHECK_MAX_ORDER 7+/* CRL registers and bitfields */+#define CRL_APB_BASE 0xFF5E0000U+/* BOOT_PIN_CTRL- Used to control the mode pins after boot */+#define CRL_APB_BOOT_PIN_CTRL (CRL_APB_BASE + (0x250U))+/* BOOT_PIN_CTRL_MASK- out_val[11:8], out_en[3:0] */+#define CRL_APB_BOOTPIN_CTRL_MASK 0xF0FU+staticboolfeature_check_enabled;staticDEFINE_HASHTABLE(pm_api_features_map,PM_API_FEATURE_CHECK_MAX_ORDER);
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
Changes in v2:
- Modepin driver- Addressed review comments:
- Update APIs
- Removed unwanted variables
- Handle return path for probe function
Review Comments:
https://lore.kernel.org/linux-arm-kernel/20210615080553.2021061-2-piyush.mehta@xilinx.com/T/#m276c8a5c52f8dc1ed1cd91a2d660f78d498e4ae5
Changes in v3:
- Addressed Linus and Arnd review comments:
- Update probe function return value
- Remove unnecessary print and header file
- Update error message for set value method
Review Comments:
https://lore.kernel.org/linux-arm-kernel/20210805174219.3000667-4-piyush.mehta@xilinx.com/T/#m70acd39653033e32458633e21a2e6d21afdd16e6
---
drivers/gpio/Kconfig | 12 +++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-zynqmp-modepin.c | 153 +++++++++++++++++++++++++++++++++++++
3 files changed, 166 insertions(+)
create mode 100644 drivers/gpio/gpio-zynqmp-modepin.c
From: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: 2021-08-18 08:52:10
On 18.08.21 10:10, Piyush Mehta wrote:
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
+/**
+ * modepin_gpio_dir_in - Set the direction of the specified GPIO pin as input
+ * @chip: gpio_chip instance to be worked on
+ * @pin: gpio pin number within the device
+ *
+ * Return: 0 always
+ */
+static int modepin_gpio_dir_in(struct gpio_chip *chip, unsigned int pin)
+{
+ return 0;
+}
You say the gpio controller can configure pins as inputs or outputs.
Yet, .direction_input is doing nothing. So it's not clear to me,
how this sequence could work:
- set gpio output high (writes bootmode)
- set gpio to input (no-op, pin will remain high, not high impedance)
I didn't check the previous discussions, but if this indeed works as intended,
the how should be written here into the driver. That is a more useful comment
than kernel doc for a stub function.
--
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 |
@@ -0,0 +1,43 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:ZynqMP Mode Pin GPIO controller++description:+PS_MODE is 4-bits boot mode pins sampled on POR deassertion. Mode Pin+GPIO controller with configurable from numbers of pins (from 0 to 3 per+PS_MODE). Every pin can be configured as input/output.
So, at Linux runtime, someone decides to boot the system into e.g. a USB
recovery mode and then toggles the appropriate GPIOs and does a system
reset?
If so, are you aware of the reboot mode[1] infrastructure?
A reboot-mode-gpio driver on top of this GPIO controller would allow you
to describe the supported reboot modes in the device tree and instead of
exporting GPIOs to userspace, users can then just do
systemctl restart recovery
to toggle the appropriate bits.
Also to be sure: PS_MODE are actual GPIO pins that you could toggle
board level components with, right? i.e. it's not just a register that
overrides the values read from the boot mode pins? (In the latter case
a syscon-reboot-mode without GPIO controller would be the correct
abstraction).
[1]: drivers/power/reset/reboot-mode.c
Cheers,
Ahmad
--
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 |
@@ -0,0 +1,43 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:ZynqMP Mode Pin GPIO controller++description:+PS_MODE is 4-bits boot mode pins sampled on POR deassertion. Mode Pin+GPIO controller with configurable from numbers of pins (from 0 to 3 per+PS_MODE). Every pin can be configured as input/output.
So, at Linux runtime, someone decides to boot the system into e.g. a USB
recovery mode and then toggles the appropriate GPIOs and does a system
reset?
If so, are you aware of the reboot mode[1] infrastructure?
A reboot-mode-gpio driver on top of this GPIO controller would allow you
to describe the supported reboot modes in the device tree and instead of
exporting GPIOs to userspace, users can then just do
systemctl restart recovery
to toggle the appropriate bits.
Also to be sure: PS_MODE are actual GPIO pins that you could toggle
board level components with, right? i.e. it's not just a register that
overrides the values read from the boot mode pins? (In the latter case
a syscon-reboot-mode without GPIO controller would be the correct
abstraction).
[1]: drivers/power/reset/reboot-mode.c
Thanks for these links. I wasn't aware about it.
But this device/IP is not working like this. Changing gpios to certain
state won't ensure that on reboot/reset (done in whatever way) won't
stay on values you chose.
modepin gpio driver is at BOOT_PIN_CTRL 0xFF5E0250
(To be fair if you add additional external chip it could work like this
but I have never seen it).
But when you bring this up. Xilinx ZynqMP is providing a way how to
setup alternative boot mode which is done via
BOOT_MODE_USER 0xFF5E0200
Bit 8 and 15-12.
Then you can setup any bootmode.
ZynqMP supports couple of modes listed here
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-zynqmp/include/mach/hardware.h#L73
but again routing to this register needs to be done via firmware
interface but it should be done via separate driver.
Is there an option to setup whatever modes you like?
I mean to simply cover all modes like this?
mode-jtag = <0>;
mode-sd = <3>;
mode-sd1 = <5>;
etc
And then users/customers can say what normal/recovery/test modes are.
Thanks,
Michal
@@ -0,0 +1,43 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:ZynqMP Mode Pin GPIO controller++description:+PS_MODE is 4-bits boot mode pins sampled on POR deassertion. Mode Pin+GPIO controller with configurable from numbers of pins (from 0 to 3 per+PS_MODE). Every pin can be configured as input/output.
So, at Linux runtime, someone decides to boot the system into e.g. a USB
recovery mode and then toggles the appropriate GPIOs and does a system
reset?
If so, are you aware of the reboot mode[1] infrastructure?
A reboot-mode-gpio driver on top of this GPIO controller would allow you
to describe the supported reboot modes in the device tree and instead of
exporting GPIOs to userspace, users can then just do
systemctl restart recovery
to toggle the appropriate bits.
Also to be sure: PS_MODE are actual GPIO pins that you could toggle
board level components with, right? i.e. it's not just a register that
overrides the values read from the boot mode pins? (In the latter case
a syscon-reboot-mode without GPIO controller would be the correct
abstraction).
[1]: drivers/power/reset/reboot-mode.c
Thanks for these links. I wasn't aware about it.
But this device/IP is not working like this. Changing gpios to certain
state won't ensure that on reboot/reset (done in whatever way) won't
stay on values you chose.
Ah, the "PS_MODE is 4-bits boot mode pins sampled on POR deassertion" part
misled me. These pins are sampled on startup, but can afterwards be reused
via talking to firmware. Thanks for clearing this up.
modepin gpio driver is at BOOT_PIN_CTRL 0xFF5E0250
(To be fair if you add additional external chip it could work like this
but I have never seen it).
Ye, that would've been strange, that's why I asked. :)
But when you bring this up. Xilinx ZynqMP is providing a way how to
setup alternative boot mode which is done via
BOOT_MODE_USER 0xFF5E0200
Bit 8 and 15-12.
Then you can setup any bootmode.
ZynqMP supports couple of modes listed here
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-zynqmp/include/mach/hardware.h#L73
but again routing to this register needs to be done via firmware
interface but it should be done via separate driver.
Yes.
Is there an option to setup whatever modes you like?
I mean to simply cover all modes like this?
mode-jtag = <0>;
mode-sd = <3>;
mode-sd1 = <5>;
Yes, you can define the supported modes in the SoC dtsi
and boards inherit that and can extend it as necessary.
And then users/customers can say what normal/recovery/test modes are.
Yes, that would be nice. But after your clarification, I see that it's
unrelated to this patch series. Binding is fine. Question on driver
is still applicable.
Cheers,
Ahmad
@@ -0,0 +1,43 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:ZynqMP Mode Pin GPIO controller++description:+PS_MODE is 4-bits boot mode pins sampled on POR deassertion. Mode Pin+GPIO controller with configurable from numbers of pins (from 0 to 3 per+PS_MODE). Every pin can be configured as input/output.
So, at Linux runtime, someone decides to boot the system into e.g. a USB
recovery mode and then toggles the appropriate GPIOs and does a system
reset?
If so, are you aware of the reboot mode[1] infrastructure?
A reboot-mode-gpio driver on top of this GPIO controller would allow you
to describe the supported reboot modes in the device tree and instead of
exporting GPIOs to userspace, users can then just do
systemctl restart recovery
to toggle the appropriate bits.
Also to be sure: PS_MODE are actual GPIO pins that you could toggle
board level components with, right? i.e. it's not just a register that
overrides the values read from the boot mode pins? (In the latter case
a syscon-reboot-mode without GPIO controller would be the correct
abstraction).
[1]: drivers/power/reset/reboot-mode.c
Thanks for these links. I wasn't aware about it.
But this device/IP is not working like this. Changing gpios to certain
state won't ensure that on reboot/reset (done in whatever way) won't
stay on values you chose.
Ah, the "PS_MODE is 4-bits boot mode pins sampled on POR deassertion" part
misled me. These pins are sampled on startup, but can afterwards be reused
via talking to firmware. Thanks for clearing this up.
yes
quoted
modepin gpio driver is at BOOT_PIN_CTRL 0xFF5E0250
(To be fair if you add additional external chip it could work like this
but I have never seen it).
Ye, that would've been strange, that's why I asked. :)
No issue at all.
quoted
But when you bring this up. Xilinx ZynqMP is providing a way how to
setup alternative boot mode which is done via
BOOT_MODE_USER 0xFF5E0200
Bit 8 and 15-12.
Then you can setup any bootmode.
ZynqMP supports couple of modes listed here
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-zynqmp/include/mach/hardware.h#L73
but again routing to this register needs to be done via firmware
interface but it should be done via separate driver.
Yes.
quoted
Is there an option to setup whatever modes you like?
I mean to simply cover all modes like this?
mode-jtag = <0>;
mode-sd = <3>;
mode-sd1 = <5>;
Yes, you can define the supported modes in the SoC dtsi
and boards inherit that and can extend it as necessary.
ok.
quoted
And then users/customers can say what normal/recovery/test modes are.
Yes, that would be nice. But after your clarification, I see that it's
unrelated to this patch series. Binding is fine. Question on driver
is still applicable.
I remember any discussion about it between Piyush and Linus and I will
let Piyush to handle it.
Thanks,
Michal
Hi Ahmad,
-----Original Message-----
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Sent: Wednesday, August 18, 2021 2:22 PM
To: Piyush Mehta <redacted>; arnd@arndb.de; zou_wei@huawei.com; gregkh@linuxfoundation.org; linus.walleij@linaro.org; Michal Simek <redacted>; Jiaying Liang <redacted>; iwamatsu@nigauri.org; bgolaszewski@baylibre.com; robh+dt@kernel.org; Rajan Vaja <redacted>
Cc: linux-gpio@vger.kernel.org; devicetree@vger.kernel.org; git <redacted>; Srinivas Goud <redacted>; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH V3 3/3] gpio: modepin: Add driver support for modepin GPIO controller
On 18.08.21 10:10, Piyush Mehta wrote:
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE
pin, based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register,
which have lower four-bits [0:3] are configurable as input/output,
next four-bits can be used for reading the data as input[4:7], and
next setting the output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
+/**
+ * modepin_gpio_dir_in - Set the direction of the specified GPIO pin as input
+ * @chip: gpio_chip instance to be worked on
+ * @pin: gpio pin number within the device
+ *
+ * Return: 0 always
+ */
+static int modepin_gpio_dir_in(struct gpio_chip *chip, unsigned int
+pin) {
+ return 0;
+}
You say the gpio controller can configure pins as inputs or outputs.
These pins are controller via firmware driver. We are updating BOOT_PIN_CTRL 0xFF5E0250 register.
[0:3] = When 0, the pins will be inputs from the board to the PS. When 1, the PS will drive these pins
[4:7] = Value captured from the mode pins
[8:11] = Value driven onto the mode pins, when control register bit set out = 1
The lower four-bits [0:3] we can set either input and output, based on configuration we read pin as for input [4:7]
and write on pin [8:11].
Example:
If we want to configure pin 1 as output, then we will configure as [0:3]=[0100], for access pin will trigger upper bit [8:11]=[0100].
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
Xilinx is using this pin for usb phy resets.
Yet, .direction_input is doing nothing. So, it's not clear to me, how this sequence could work:
- set gpio output high (writes bootmode)
- set gpio to input (no-op, pin will remain high, not high impedance)
I didn't check the previous discussions, but if this indeed works as intended, the how should be written here into the driver. That is a more useful comment than kernel doc for a stub function.
--
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 |
Regards,
Piyush Mehta
From: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: 2021-08-18 13:05:40
Hello Piyush,
On 18.08.21 12:09, Piyush Mehta wrote:
Hi Ahmad,
-----Original Message-----
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Sent: Wednesday, August 18, 2021 2:22 PM
To: Piyush Mehta <redacted>; arnd@arndb.de; zou_wei@huawei.com; gregkh@linuxfoundation.org; linus.walleij@linaro.org; Michal Simek <redacted>; Jiaying Liang <redacted>; iwamatsu@nigauri.org; bgolaszewski@baylibre.com; robh+dt@kernel.org; Rajan Vaja <redacted>
Cc: linux-gpio@vger.kernel.org; devicetree@vger.kernel.org; git <redacted>; Srinivas Goud <redacted>; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH V3 3/3] gpio: modepin: Add driver support for modepin GPIO controller
On 18.08.21 10:10, Piyush Mehta wrote:
quoted
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE
pin, based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register,
which have lower four-bits [0:3] are configurable as input/output,
next four-bits can be used for reading the data as input[4:7], and
next setting the output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
quoted
+/**
+ * modepin_gpio_dir_in - Set the direction of the specified GPIO pin as input
+ * @chip: gpio_chip instance to be worked on
+ * @pin: gpio pin number within the device
+ *
+ * Return: 0 always
+ */
+static int modepin_gpio_dir_in(struct gpio_chip *chip, unsigned int
+pin) {
+ return 0;
+}
You say the gpio controller can configure pins as inputs or outputs.
These pins are controller via firmware driver. We are updating BOOT_PIN_CTRL 0xFF5E0250 register.
[0:3] = When 0, the pins will be inputs from the board to the PS. When 1, the PS will drive these pins
Ok. So if you want to configure the pin as input, you should call zynqmp_pm_bootmode_write
to write a zero into that bit.
But there's only one zynqmp_pm_bootmode_write in the GPIO driver and it's in modepin_gpio_set_value,
which does output, not input. If I understand you right, there should be a modepin_gpio_set_value in
modepin_gpio_dir_in as well?
Yet, .direction_input is doing nothing. So, it's not clear to me, how this sequence could work:
- set gpio output high (writes bootmode)
- set gpio to input (no-op, pin will remain high, not high impedance)
This is a valid sequence for a GPIO consumer and I don't see how this GPIO driver could
honor it. Could you clarify?
Cheers,
Ahmad
I didn't check the previous discussions, but if this indeed works as intended, the how should be written here into the driver. That is a more useful comment than kernel doc for a stub function.
On Wed, Aug 18, 2021 at 10:11 AM Piyush Mehta [off-list ref] wrote:
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
From: Michal Simek <hidden> Date: 2021-08-23 08:14:27
Hi Bart,
On 8/23/21 10:02 AM, Bartosz Golaszewski wrote:
On Wed, Aug 18, 2021 at 10:11 AM Piyush Mehta [off-list ref] wrote:
quoted
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
Which tree should this go through?
I would prefer to go this via gpio tree.
Thanks,
Michal
On Mon, Aug 23, 2021 at 10:14 AM Michal Simek [off-list ref] wrote:
Hi Bart,
On 8/23/21 10:02 AM, Bartosz Golaszewski wrote:
quoted
On Wed, Aug 18, 2021 at 10:11 AM Piyush Mehta [off-list ref] wrote:
quoted
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
Which tree should this go through?
I would prefer to go this via gpio tree.
Thanks,
Michal
Sure, just make sure to get an Ack from Rob Herring on the DT bindings.
Bart
On Wed, Sep 22, 2021 at 12:18 PM Bartosz Golaszewski
[off-list ref] wrote:
On Mon, Aug 23, 2021 at 10:14 AM Michal Simek [off-list ref] wrote:
quoted
Hi Bart,
On 8/23/21 10:02 AM, Bartosz Golaszewski wrote:
quoted
On Wed, Aug 18, 2021 at 10:11 AM Piyush Mehta [off-list ref] wrote:
quoted
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
Which tree should this go through?
I would prefer to go this via gpio tree.
Thanks,
Michal
Sure, just make sure to get an Ack from Rob Herring on the DT bindings.
Bart
From: Michal Simek <hidden> Date: 2021-09-22 10:23:36
On 9/22/21 12:21 PM, Bartosz Golaszewski wrote:
On Wed, Sep 22, 2021 at 12:18 PM Bartosz Golaszewski
[off-list ref] wrote:
quoted
On Mon, Aug 23, 2021 at 10:14 AM Michal Simek [off-list ref] wrote:
quoted
Hi Bart,
On 8/23/21 10:02 AM, Bartosz Golaszewski wrote:
quoted
On Wed, Aug 18, 2021 at 10:11 AM Piyush Mehta [off-list ref] wrote:
quoted
This patch adds driver support for the zynqmp modepin GPIO controller.
GPIO modepin driver set and get the value and status of the PS_MODE pin,
based on device-tree pin configuration. These four mode pins are
configurable as input/output. The mode pin has a control register, which
have lower four-bits [0:3] are configurable as input/output, next four-bits
can be used for reading the data as input[4:7], and next setting the
output pin state output[8:11].
Signed-off-by: Piyush Mehta <redacted>
Acked-by: Michal Simek <redacted>
Reviewed-by: Linus Walleij <redacted>
---
Which tree should this go through?
I would prefer to go this via gpio tree.
Thanks,
Michal
Sure, just make sure to get an Ack from Rob Herring on the DT bindings.
Bart