drivers: pinctrl_emsdp: add dummy mux for unmuxed peripheral
ARC EMSDP board has some peripherals are internal connected, such as DW spi1 and DFSS i2c0. They are unmuxed and have fix connection to spi-flash or sensor. For these peripheral, add dummy mux type to avoid pinctrl ENOENT error. Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
This commit is contained in:
parent
bb81b42861
commit
1a6b6e7b84
4 changed files with 13 additions and 0 deletions
|
@ -130,4 +130,9 @@
|
|||
arduino_CFG6_i2c: arduino_CFG6_i2c {
|
||||
pinmux = <ARDUINO_PIN_AD5 ARDUINO_I2C>;
|
||||
};
|
||||
|
||||
/* INNER_CONNECT, DUMMY MUX */
|
||||
unmuxed_pin: unmuxed_pin {
|
||||
pinmux = <INNER_CONNECT NOT_PINMUX>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
spi@f1000000 {
|
||||
interrupts = <84 1>;
|
||||
pinctrl-0 = <&unmuxed_pin>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
spi@80010000 {
|
||||
|
|
|
@ -103,6 +103,10 @@ static int pinctrl_emsdp_set(uint32_t pin, uint32_t type)
|
|||
const uint32_t mux_regs = (EMSDP_CREG_BASE + EMSDP_CREG_PMOD_MUX_OFFSET);
|
||||
uint32_t reg;
|
||||
|
||||
if (pin == INNER_CONNECT) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pin <= PMOD_C) {
|
||||
reg = sys_read32(mux_regs + PMOD_MUX_CTRL);
|
||||
} else {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#define ARDUINO_PIN_AD3 20
|
||||
#define ARDUINO_PIN_AD4 21
|
||||
#define ARDUINO_PIN_AD5 22
|
||||
#define INNER_CONNECT 23
|
||||
|
||||
#define PMOD_GPIO 0
|
||||
#define PMOD_UARTA 1
|
||||
|
@ -52,6 +53,7 @@
|
|||
#define ARDUINO_I2C 11
|
||||
#define ARDUINO_PWM 12
|
||||
#define ARDUINO_ADC 13
|
||||
#define NOT_PINMUX 14
|
||||
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_EMSDP_PINCTRL_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue