Zybo Z7 board - fix MIO init issue
Hi,
Zybo Z7 board has two push button connected to MIO pins 50 and 51, connecting them to Vcc1V8 when pressed, and pulldown resistors connected to ground. These two pins are initialised with internal pullup resistors enabled, so they are reported as 1 all the time with no change when pressed.
Patch to fix this small issue follows. As this is my first contribution to this project, please help me with what could be necessary to do for this fix to be accepted, in order to fit any custom used here...
Regards,
Milan
@@ -219,8 +219,8 @@
EMIT_MASKWRITE(0xF80007BC, 0x00003F01U, 0x00001201U), EMIT_MASKWRITE(0xF80007C0, 0x00003FFFU, 0x000012E0U), EMIT_MASKWRITE(0xF80007C4, 0x00003FFFU, 0x000012E1U),
- EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00001200U),
- EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00001200U),
+ EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00000200U),
+ EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00000200U),
EMIT_MASKWRITE(0xF80007D0, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF80007D4, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF8000830, 0x003F003FU, 0x002F0037U),
+Luis
čt 9. 1. 2020 v 14:00 odesílatel Milan Obuch <[email protected]> napsal:
Quoted 17 lines
Hi,
Zybo Z7 board has two push button connected to MIO pins 50 and 51, connecting them to Vcc1V8 when pressed, and pulldown resistors connected to ground. These two pins are initialised with internal pullup resistors enabled, so they are reported as 1 all the time with no change when pressed.
Patch to fix this small issue follows. As this is my first contribution to this project, please help me with what could be necessary to do for this fix to be accepted, in order to fit any custom used here...
Regards,
Milan
Review line 226
Quoted 10 lines
(quoted diff) +2
-2@@ -219,8 +219,8 @@ EMIT_MASKWRITE(0xF80007BC, 0x00003F01U, 0x00001201U), EMIT_MASKWRITE(0xF80007C0, 0x00003FFFU, 0x000012E0U), EMIT_MASKWRITE(0xF80007C4, 0x00003FFFU, 0x000012E1U), - EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00001200U), - EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00001200U), + EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00000200U), + EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00000200U), EMIT_MASKWRITE(0xF80007D0, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF80007D4, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF8000830, 0x003F003FU, 0x002F0037U),
Luis: Can you please comment?
I have not a problem with this patch but please send it as regular patch. git format-patch and then git send-email or use u-boot patman tools for sending it.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
Luis Araneda
Tested-byHi Michal,
Quoted 25 lines · Michal Simek
+Luis
čt 9. 1. 2020 v 14:00 odesílatel Milan Obuch <[email protected]> napsal:
Quoted 8 lines
Zybo Z7 board has two push button connected to MIO pins 50 and 51, connecting them to Vcc1V8 when pressed, and pulldown resistors connected to ground. These two pins are initialised with internal pullup resistors enabled, so they are reported as 1 all the time with no change when pressed.
Review line 226
Quoted 10 lines
(quoted diff) +2
-2@@ -219,8 +219,8 @@ EMIT_MASKWRITE(0xF80007BC, 0x00003F01U, 0x00001201U), EMIT_MASKWRITE(0xF80007C0, 0x00003FFFU, 0x000012E0U), EMIT_MASKWRITE(0xF80007C4, 0x00003FFFU, 0x000012E1U), - EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00001200U), - EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00001200U), + EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00000200U), + EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00000200U), EMIT_MASKWRITE(0xF80007D0, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF80007D4, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF8000830, 0x003F003FU, 0x002F0037U),Luis: Can you please comment?
Quoted 3 lines
I have not a problem with this patch but please send it as regular patch. git format-patch and then git send-email or use u-boot patman tools for sending it.
I successfully tested the patch on a Zybo Z7-20 board. The push buttons are now handled correctly.
Tested with the command "gpio status -a"
When the push buttons are not pressed:
Quoted 2 lines
gpio at
e000a00050: input: 0 [ ]
gpio ate000a00051: input: 0 [ ]
When the push buttons are pressed:
Quoted 2 lines
gpio at
e000a00050: input: 1 [ ]
gpio ate000a00051: input: 1 [ ]
Once the commit is in shape to be merged, feel free to add my Tested-by tag.
Please ping me if the author does not want to send a proper git patch so I can send it instead.
I don't want this work to be lost.
Regards,
Luis Araneda.