@@ -333,62 +333,64 @@ MCU GPIO
333333 running on MCU core is responsible for configuring MCU GPIOs as a wakeup
334334 source. However, if the application design doesn't rely on the MCU firmware
335335 then Linux can be used to configure the MCU GPIOs as a wakeup source. Refer
336- to the mcu_gpio_key node in
336+ to the `` mcu_gpio_key `` node in
337337 `k3-am62x-sk-lpm-wkup-sources.dtso <https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-lpm-wkup-sources.dtso?h=11.01.05 >`__
338338 to use as a template to configure the desired MCU GPIO as a wakeup capable
339339 GPIO.
340340
341341 A brief guide to configuring an MCU GPIO as wakeup:
342342
343- First, add gpio-keys as a compatible string, refer to
344- `gpio_keys kernel documentation <https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt >`__
345- for details.
343+ 1. Add " gpio-keys" as a compatible string, refer to
344+ `gpio_keys kernel documentation <https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt >`__
345+ for details.
346346
347- .. code-block :: dts
347+ .. code-block :: dts
348348
349- compatible = "gpio-keys";
349+ compatible = "gpio-keys";
350350
351351
352- Set the desired pinctrl,
352+ 2. Set the desired pinctrl.
353353
354- .. code-block :: dts
354+ .. code-block :: dts
355355
356- pinctrl-names = "default";
357- pinctrl-0 = <&wake_mcugpio1_pins_default>;
356+ pinctrl-names = "default";
357+ pinctrl-0 = <&wake_mcugpio1_pins_default>;
358358
359- Setup the interrupt parent and interrupt as MCU_GPIO0,
359+ 3. Setup the interrupt parent as MCU_GPIO0, then setup the interrupt.
360360
361- .. code-block :: dts
361+ .. code-block :: dts
362362
363- interrupt-parent = <&mcu_gpio0>;
364- interrupts = <4 IRQ_TYPE_EDGE_RISING>;
363+ interrupt-parent = <&mcu_gpio0>;
364+ interrupts = <4 IRQ_TYPE_EDGE_RISING>;
365365
366- Now, under the switch node, add the following :
366+ 4. Create following child node as a `` switch `` node :
367367
368- .. code-block :: dts
368+ .. code-block :: dts
369369
370- switch {
370+ switch {
371371 label = "MCUGPIO";
372372 linux,code = <143>;
373373 gpios = <&mcu_gpio0 4 GPIO_ACTIVE_LOW>;
374374 wakeup-source;
375- };
375+ };
376376
377- #. label: Descriptive name of the switch node. If the MCU GPIO node is setup
378- correctly, the label will appear under /proc/interrupts:
377+ * label: Descriptive name of the switch node. If the MCU GPIO node is setup
378+ correctly, the label will appear under :file: `/proc/interrupts `.
379+ * linux,code: Keycode to emit.
380+ * gpios: The GPIO required to be used as the gpio-key.
381+ * wakeup-source:
382+ `wakeup-source <https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt >`__
383+ property describes devices which have wakeup capability.
379384
380- .. code-block :: console
385+ 5. To confirm that gpio_keys can wakeup the system from Deep Sleep or MCU
386+ Only mode, check :file: `/proc/interrupts ` for the label:
381387
382- root@<machine>:~# cat /proc/interrupts | grep "MCUGPIO"
383- 273: 0 0 0 0 GPIO 4 Edge -davinci_gpio MCUGPIO
388+ .. code-block :: console
384389
385- #. linux,code: Keycode to emit.
386- #. gpios: the gpio required to be used as the gpio-key.
387- #. wakeup-source:
388- `wakeup-source <https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt >`__
389- property describes devices which have wakeup capability.
390+ root@<machine>:~# cat /proc/interrupts | grep "MCUGPIO"
391+ 273: 0 0 0 0 GPIO 4 Edge -davinci_gpio MCUGPIO
390392
391- This indicates that gpio_keys can wake-up the system from Deep Sleep or MCU Only mode.
393+ This indicates that gpio_keys can wake-up the system from Deep Sleep or MCU Only mode.
392394
393395 The MCU GPIOs can be used to wakeup the system from Deep Sleep because MCU
394396 GPIOs are in a power domain that stays ON even when the SoC is in Deep Sleep.
0 commit comments