nmhw23: Add spi3 software SPI

This commit is contained in:
Andrejs Cainikovs 2019-05-22 16:30:26 +02:00
parent bd405b0a3b
commit 632ece8195
2 changed files with 36 additions and 6 deletions

View File

@ -12,6 +12,10 @@
model = "NetModule NMHW23";
compatible = "netmodule,imx8-nmhw23", "fsl,imx8qxp";
aliases {
spi3 = &spi3;
};
chosen {
bootargs = "console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200";
stdout-path = &lpuart0;
@ -20,28 +24,41 @@
pmu {
interrupt-affinity = <&A35_0>, <&A35_1>;
};
spi3: soft-spi3 {
compatible = "spi-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi3>;
status = "okay";
gpio-sck = <&gpio0 13 GPIO_ACTIVE_HIGH>;
gpio-mosi = <&gpio0 14 GPIO_ACTIVE_HIGH>;
gpio-miso = <&gpio0 15 GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
num-chipselects = <1>;
};
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
imx8qxp-mek {
pinctrl_hog: hoggrp {
imx8-nmhw23 {
pinctrl_hog: hog_grp {
fsl,pins = <
SC_P_MCLK_OUT0_ADMA_ACM_MCLK_OUT0 0x0600004c
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
>;
};
pinctrl_lpuart0: lpuart0grp {
pinctrl_lpuart0: lpuart0_grp {
fsl,pins = <
SC_P_UART0_RX_ADMA_UART0_RX 0x06000020
SC_P_UART0_TX_ADMA_UART0_TX 0x06000020
SC_P_UART0_RX_ADMA_UART0_RX 0x06000020
SC_P_UART0_TX_ADMA_UART0_TX 0x06000020
>;
};
pinctrl_usdhc1: usdhc1grp {
pinctrl_usdhc1: usdhc1_grp {
fsl,pins = <
SC_P_EMMC0_CLK_CONN_EMMC0_CLK 0x06000041
SC_P_EMMC0_CMD_CONN_EMMC0_CMD 0x00000021
@ -56,6 +73,15 @@
SC_P_EMMC0_STROBE_CONN_EMMC0_STROBE 0x00000041
>;
};
pinctrl_spi3: spi3_grp {
fsl,pins = <
SC_P_SPI3_SCK_LSIO_GPIO0_IO13 0x00000060
SC_P_SPI3_SDO_LSIO_GPIO0_IO14 0x00000020
SC_P_SPI3_SDI_LSIO_GPIO0_IO15 0x00000020
SC_P_SPI3_CS0_LSIO_GPIO0_IO16 0x00000060
>;
};
};
};

View File

@ -74,3 +74,7 @@ CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
CONFIG_SPL_TINY_MEMSET=y
# CONFIG_EFI_LOADER is not set
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_SOFT_SPI=y
CONFIG_CMD_SPI=y