Other Parts Discussed in Thread: AM4372
We have ATWILC3000 wifi/bt module connected with AM4378 via SPI2 lines. Device probe is failed with following dts and below kernel config enabled.
Please let us know what is the TI SPI driver to be loaded and anything to be changed in DTS/kconfig.
DTS:
spi2_pins: spi2_pins {
pinctrl-single,pins = <
AM4372_IOPAD(0xa60, PIN_OUTPUT | MUX_MODE0) /* (N20) spi2_sclk.spi2_sclk */
AM4372_IOPAD(0xa64, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (P22) spi2_d0.spi2_d0 */
AM4372_IOPAD(0xa68, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (P20) spi2_d1.spi2_d1 */
AM4372_IOPAD(0xa6c, PIN_OUTPUT | MUX_MODE0) /* (T23) spi2_cs0.spi2_cs0 */
>;
};
&spi2 {
pinctrl-names = "default";
pinctrl-0 = <&spi2_pins>;
status = "okay";
ti,pindir-d0-out-d1-in = <1>;
/* WiFi has both SPI and SDIO interfaces. We use the SPI. */
atwilc3000@0 {
compatible = "microchip,wilc3000";
reg = <0>;
spi-max-frequency = <48000000>;
interrupt-parent = <&gpio2>;
reset-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
irq-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
chip_en-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
};
};
Kernel config:
CONFIG_REGMAP_SPI=y
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_OMAP24XX=y
CONFIG_SPI_SPIDEV=y
CONFIG_WILC_SPI=m
Console log:
#modprobe wilc-spi
[ 1631.296144] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1631.316739] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1631.332444] wilc_spi: module is from the staging directory, the quality is unknown, you have been warned.
[ 1631.355312] wilc_bus_probe
[ 1631.358146] WILC_SPI spi2.0: spiModalias: wilc3000, spiMax-Speed: 1000000
[ 1631.365060] Registering wifi device
[ 1631.368570] Max scan ids= 10,Max scan IE len= 1000,Signal Type= 1,Interface Modes= 844
[ 1631.378260] Initializing Locks ...
[ 1631.387046] wifi_pm : 0
[ 1631.389517] wifi_pm : 1
[ 1631.414916] wilc_bus_probe exit
[ 1631.418187] WILC_SPI spi2.0: WILC SPI probe success
[ 1631.473119] WILC_SPI spi2.0 wlan0: INFO [wilc_mac_open]MAC OPEN[8f05c343] wlan0
[ 1631.480478] WILC POWER UP
[ 1631.483156] WILC_SPI spi2.0 wlan0: INFO [wilc_init_host_int]Host[8f05c343][567b9312]
[ 1631.491007] WILC_SPI spi2.0 wlan0: INFO [wilc_mac_open]*** re-init ***
[ 1631.497584] WILC_SPI spi2.0 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
[ 1631.505163] WILC_SPI spi2.0: Failed cmd response, cmd (c4), resp (00)
[ 1631.511635] WILC_SPI spi2.0: Failed internal read cmd...
[ 1631.518245] WILC_SPI spi2.0: Failed cmd response, cmd (cf), resp (00)
[ 1631.524731] WILC_SPI spi2.0: Failed cmd reset