diff mbox series

[2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of SPI1 pins

Message ID 8aec86241fca6bd3af2d67ae799eeb2c91606c36.1598966077.git.esben@geanix.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ARM: davinci: da850: Add SPI1 pinmux definitions | expand

Commit Message

Esben Haabendal Sept. 1, 2020, 1:15 p.m. UTC
Let Linux manage pinmux setup of SPI1 pins instead of relying on
bootloader to do this.

This is especially convenient for boards where bootloader update is not
feasible.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 arch/arm/mach-davinci/board-mityomapl138.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 3382b93d9a2a..44468a804fe8 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -517,6 +517,12 @@  static const short mityomap_rmii_pins[] = {
 	-1
 };
 
+static const short mityomap_spi1_pins[]  = {
+	DA850_SPI1_SIMO, DA850_SPI1_SOMI, DA850_SPI1_CLK,
+	DA850_SPI1_SCS0,
+	-1,
+};
+
 static void __init mityomapl138_config_emac(void)
 {
 	void __iomem *cfg_chip3_base;
@@ -585,6 +591,10 @@  static void __init mityomapl138_init(void)
 
 	mityomapl138_setup_nand();
 
+	ret = davinci_cfg_reg_list(mityomap_spi1_pins);
+	if (ret)
+		pr_warn("SPI1 pinmux setup failed: %d\n", ret);
+
 	ret = spi_register_board_info(mityomapl138_spi_flash_info,
 				      ARRAY_SIZE(mityomapl138_spi_flash_info));
 	if (ret)