summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-01-13 11:35:15 +0100
committerTom Rini <trini@konsulko.com>2020-04-16 23:06:54 -0400
commite5301bac5d2dc3cde6ef48333c56e52b8dd45e4b (patch)
tree8d3e4ff561c7ff93cdbf7636dd122f707d479b8b /test
parentff52665d03e220ada14e3e02f8d485b48d8c8eaa (diff)
test: pinmux: add pincontrol-gpio for pin configuration
Add a simple pincontrol associated to the sandbox gpio driver, that allows to check pin configuration with the command pinmux. The pinmux test is also updated to test behavior with 2 pincontrols. Example to check LED pin configuration: => pinmux list | Device | Driver | Parent | pinctrl-gpio | sandbox_pinctrl_gpio | root_driver | pinctrl | sandbox_pinctrl | root_driver => pinmux dev pinctrl-gpio => pinmux status a0 : gpio input . a1 : gpio input . a2 : gpio input . a3 : gpio input . a4 : gpio input . a5 : gpio output . a6 : gpio output . ... Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_pinmux.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/py/tests/test_pinmux.py b/test/py/tests/test_pinmux.py
index 5ca0b4b630..4e6df992a4 100644
--- a/test/py/tests/test_pinmux.py
+++ b/test/py/tests/test_pinmux.py
@@ -22,6 +22,12 @@ def test_pinmux_usage_2(u_boot_console):
def test_pinmux_status_all(u_boot_console):
"""Test that 'pinmux status -a' displays pin's muxing."""
output = u_boot_console.run_command('pinmux status -a')
+
+ assert ('pinctrl-gpio:' in output)
+ assert ('a5 : gpio output .' in output)
+ assert ('a6 : gpio output .' in output)
+
+ assert ('pinctrl:' in output)
assert ('SCL : I2C SCL.' in output)
assert ('SDA : I2C SDA.' in output)
assert ('TX : Uart TX.' in output)
@@ -63,6 +69,10 @@ def test_pinmux_status(u_boot_console):
"""Test that 'pinmux status' displays selected pincontroller's pin
muxing descriptions."""
output = u_boot_console.run_command('pinmux status')
+
+ assert (not 'pinctrl-gpio:' in output)
+ assert (not 'pinctrl:' in output)
+
assert ('SCL : I2C SCL.' in output)
assert ('SDA : I2C SDA.' in output)
assert ('TX : Uart TX.' in output)