u-boot/include/dt-bindings/pinctrl/sandbox-pinmux.h
Sean Anderson 274e0c7299 sandbox: Fix pinmux warnings with non-test devicetrees
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>
2024-08-27 11:17:39 -06:00

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 */