Files
meta-pengwyn/recipes-bsp/u-boot/files/0002-pengwyn-spi-mux.patch

39 lines
1.4 KiB
Diff

--- a/board/silica/pengwyn/mux.c
+++ b/board/silica/pengwyn/mux.c
@@ -30,6 +30,26 @@ static struct module_pin_mux i2c0_pin_mux[] = {
{-1},
};
+/* SPI0 pins */
+static struct module_pin_mux spi0_pin_mux[] = {
+ {OFFSET(spi0_sclk), (MODE(0) | RXACTIVE | PULLUDEN)}, /* SPI0_SCLK */
+ {OFFSET(spi0_d0), (MODE(0) | RXACTIVE |
+ PULLUDEN | PULLUP_EN)}, /* SPI0_D0 */
+ {OFFSET(spi0_d1), (MODE(0) | RXACTIVE | PULLUDEN)}, /* SPI0_D1 */
+ {OFFSET(spi0_cs0), (MODE(0) | RXACTIVE |
+ PULLUDEN | PULLUP_EN)}, /* SPI0_CS0 */
+ {-1},
+};
+
+/* SPI1 pins */
+static struct module_pin_mux spi1_pin_mux[] = {
+ {OFFSET(ecap0_in_pwm0_out), (MODE(4) | RXACTIVE | PULLUDEN)}, /* SPI1_SCLK */
+ {OFFSET(mcasp0_fsx), (MODE(3) | RXACTIVE | PULLUDEN | PULLUP_EN)}, /* SPI1_D0 */
+ {OFFSET(mcasp0_axr0), (MODE(3) | RXACTIVE | PULLUDEN)}, /* SPI1_D1 */
+ {OFFSET(mcasp0_ahclkr), (MODE(3) | RXACTIVE | PULLUDEN | PULLUP_EN)}, /* SPI1_CS0 */
+ {-1},
+};
+
/* MMC0 pins */
static struct module_pin_mux mmc0_pin_mux[] = {
{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT3 */
@@ -90,6 +110,8 @@ void enable_uart0_pin_mux(void)
void enable_board_pin_mux()
{
configure_module_pin_mux(i2c0_pin_mux);
+ configure_module_pin_mux(spi0_pin_mux);
+ configure_module_pin_mux(spi1_pin_mux);
configure_module_pin_mux(uart0_pin_mux);
configure_module_pin_mux(mii1_pin_mux);
configure_module_pin_mux(mmc0_pin_mux);