boards: riscv: rv32m1_vega: Add onboard SPI flash
Enable the MX25R32 SPI NOR Flash on the VEGAboard and provide board config file for the spi_flash sample. Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
This commit is contained in:
parent
ee2dd7322f
commit
8a6fd43439
|
@ -68,4 +68,11 @@ config I2C_3
|
|||
|
||||
endif # I2C
|
||||
|
||||
if SPI
|
||||
|
||||
config SPI_1
|
||||
default y
|
||||
|
||||
endif # SPI
|
||||
|
||||
endif # BOARD_RV32M1_VEGA
|
||||
|
|
|
@ -62,6 +62,14 @@ static int rv32m1_vega_pinmux_init(struct device *dev)
|
|||
pinmux_pin_set(porte, 22, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
pinmux_pin_set(porte, 27, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
|
||||
#if CONFIG_SPI_1
|
||||
/* LPSPI1 SCK, SIN, SOUT, CS */
|
||||
pinmux_pin_set(portb, 20, PORT_PCR_MUX(kPORT_MuxAlt2));
|
||||
pinmux_pin_set(portb, 21, PORT_PCR_MUX(kPORT_MuxAlt2));
|
||||
pinmux_pin_set(portb, 24, PORT_PCR_MUX(kPORT_MuxAlt2));
|
||||
pinmux_pin_set(portb, 22, PORT_PCR_MUX(kPORT_MuxAlt2));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,3 +108,17 @@ arduino_i2c: &i2c0 {
|
|||
int2-gpios = <&gpioe 22 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
cs-gpios = <&gpiob 22 0>;
|
||||
mx25r32: mx25r3235f@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <80000000>;
|
||||
label = "MX25R32";
|
||||
jedec-id = [c2 28 16];
|
||||
size = <33554432>;
|
||||
has-be32k;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,3 +9,4 @@ supported:
|
|||
- arduino_gpio
|
||||
- arduino_i2c
|
||||
- i2c
|
||||
- spi
|
||||
|
|
7
samples/drivers/spi_flash/boards/rv32m1_vega_ri5cy.conf
Normal file
7
samples/drivers/spi_flash/boards/rv32m1_vega_ri5cy.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (c) 2019 Karsten Koenig <karsten.koenig.030@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
CONFIG_SPI_NOR=y
|
Loading…
Reference in a new issue