diff options
| author | Patrick Delaunay <[email protected]> | 2020-01-13 11:35:15 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2020-04-16 23:06:54 -0400 |
| commit | e5301bac5d2dc3cde6ef48333c56e52b8dd45e4b (patch) | |
| tree | 8d3e4ff561c7ff93cdbf7636dd122f707d479b8b /arch | |
| parent | ff52665d03e220ada14e3e02f8d485b48d8c8eaa (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 <[email protected]>
Signed-off-by: Patrick Delaunay <[email protected]>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/sandbox/dts/test.dts | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 0b1c29f8943..df9f1835c9e 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -299,28 +299,32 @@ }; }; - gpio_a: base-gpios { - compatible = "sandbox,gpio"; - gpio-controller; - #gpio-cells = <1>; - gpio-bank-name = "a"; - sandbox,gpio-count = <20>; - }; + pinctrl-gpio { + compatible = "sandbox,pinctrl-gpio"; - gpio_b: extra-gpios { - compatible = "sandbox,gpio"; - gpio-controller; - #gpio-cells = <5>; - gpio-bank-name = "b"; - sandbox,gpio-count = <10>; - }; + gpio_a: base-gpios { + compatible = "sandbox,gpio"; + gpio-controller; + #gpio-cells = <1>; + gpio-bank-name = "a"; + sandbox,gpio-count = <20>; + }; - gpio_c: extra2-gpios { - compatible = "sandbox,gpio"; - gpio-controller; - #gpio-cells = <2>; - gpio-bank-name = "c"; - sandbox,gpio-count = <10>; + gpio_b: extra-gpios { + compatible = "sandbox,gpio"; + gpio-controller; + #gpio-cells = <5>; + gpio-bank-name = "b"; + sandbox,gpio-count = <10>; + }; + + gpio_c: pinmux-gpios { + compatible = "sandbox,gpio"; + gpio-controller; + #gpio-cells = <2>; + gpio-bank-name = "c"; + sandbox,gpio-count = <10>; + }; }; i2c@0 { |
