mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00

The sandbox pinmux driver is used in the non-test devicetree as well as
the test one. I didn't realize this when I modified the driver for
tests, and so broke the regular use case (which only resulted in
warnings). First, making the pinmux and the UART group available
pre-relocation to avoid ENODEV errors. Then, convert the pin groups and
functions to the new style, adding onewire group as well.
Fixes: 7f0f1806e3
("test: pinmux: Add test for pin muxing")
Closes: https://source.denx.de/u-boot/u-boot/-/issues/2
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 lines
486 B
C
20 lines
486 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2020 Sean Anderson <seanga2@gmail.com>
|
|
*/
|
|
|
|
#ifndef SANDBOX_PINMUX_H
|
|
#define SANDBOX_PINMUX_H
|
|
|
|
#define SANDBOX_PINMUX_UART 0
|
|
#define SANDBOX_PINMUX_I2C 1
|
|
#define SANDBOX_PINMUX_SPI 2
|
|
#define SANDBOX_PINMUX_I2S 3
|
|
#define SANDBOX_PINMUX_GPIO 4
|
|
#define SANDBOX_PINMUX_CS 5
|
|
#define SANDBOX_PINMUX_PWM 6
|
|
#define SANDBOX_PINMUX_ONEWIRE 7
|
|
|
|
#define SANDBOX_PINMUX(pin, func) ((func) << 16 | (pin))
|
|
|
|
#endif /* SANDBOX_PINMUX_H */
|