Problem with custom carrier board with ls1028 (mpxls1028cr7 SoM and ATWINC1500 WiFi)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with custom carrier board with ls1028 (mpxls1028cr7 SoM and ATWINC1500 WiFi)

1,692 Views
ikopetschke
Contributor II

Hello,
Please advise me on the device tree for carrier board with LS1028a and WiFi module ATWINC1500, which is fixed on the board and should communicate via SPI. The wiring diagram is below (not my work).
My problem is that I don't know how to build a device tree, all the information I found was about implementations on Atmel SoC.

Device tree

Fragments from fsl-ls1028a.dtsi:

 

dspi2: spi@2120000 {
                        compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x0 0x2120000 0x0 0x10000>;
                        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "dspi";
                        clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
                                            QORIQ_CLK_PLL_DIV(2)>;
                        dmas = <&edma0 0 54>, <&edma0 0 2>;
                        dma-names = "tx", "rx";
                        spi-num-chipselects = <3>;
                        little-endian;
                        status = "disabled";
                };

 

 

 

 gpio1: gpio@2300000 {
                        compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
                        reg = <0x0 0x2300000 0x0 0x10000>;
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
                        #interrupt-cells = <2>;
                        little-endian;
                };

                gpio2: gpio@2310000 {
                        compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
                        reg = <0x0 0x2310000 0x0 0x10000>;
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
                        #interrupt-cells = <2>;
                        little-endian;
                };

                gpio3: gpio@2320000 {
                        compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
                        reg = <0x0 0x2320000 0x0 0x10000>;
                        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
                        #interrupt-cells = <2>;
                        little-endian;
                };
i2c0: i2c@2000000 {
                        compatible = "fsl,vf610-i2c";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x0 0x2000000 0x0 0x10000>;
                        interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
                                            QORIQ_CLK_PLL_DIV(4)>;
                        status = "disabled";
                };

                i2c1: i2c@2010000 {
                        compatible = "fsl,vf610-i2c";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x0 0x2010000 0x0 0x10000>;
                        interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
                                            QORIQ_CLK_PLL_DIV(4)>;
                        status = "disabled";
                };
... continue with i2c2, i2c3 etc ...

 

 

Fragment from my dts:

 

&gpio1 {
    status = "okay";
    little-endian;
};

&gpio2 {
    status = "okay";
    little-endian;
};

&gpio3 {
    status = "okay";
};

&i2c7 {
status = "okay";
};
....
&dspi2 {
    status = "okay";
    wilc_spi:wilc_spi@0 {
        compatible = "microchip,wilc1000","microchip,wilc3000";
        spi-max-frequency = <40000000>;
        reg = <0>;
        interrupt-parent = <&gpio2>;
        interrupts =   IRQ_TYPE_LEVEL_HIGH>;
        reset-gpios =  <&gpio2 18 GPIO_ACTIVE_LOW>; 
        enable-gpios =  <&gpio2 17 GPIO_ACTIVE_HIGH>;
        status = "okay";
    };
};

 

 WIFI moduleWIFI moduleobrazek.pngobrazek.png

 

On boot, the driver module is loaded into the kernel. When starting wpa_supplicant or ifconfig wlan0 up, the firmware is loaded, but after about 10 seconds it ends with a Time out error.

Could someone please advise me where I am going wrong ? Or if anyone has a device tree for the same or at least similar QoorQ or Layerscape and WINC1000/WILC1500 ?

0 Kudos
Reply
4 Replies

1,630 Views
ikopetschke
Contributor II

Hello @SebastianG ,

thank you very much !

The situation has changed a bit, I'm sending updated info about WiFi module wiring and modified device tree. Currently the driver crashes on firmware startup (timeout). I believe I have a bug in the device tree (irq), possibly in RCW:

Here is the connection update on the board:

WIFI_IRQ - now connected at pin B17 (SDA6)
WIFI_nRST - now connected at pin B18 (SCL6)


&dspi2 {
status = "okay";
gpios = <&gpio3 0 0>;
cs-gpios = <&gpio3 0 0>;

wilc_spi:wilc_spi@0 {
status = "okay";
compatible = "microchip,wilc1000","microchip,wilc3000";
spi-max-frequency = <25000000>;
reg = <0>;
reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
enable-gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
irq-gpios = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>;
chip_en-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
};
};

My RCW:

#include <../ls1028asi/ls1028a.rcwi>

SYS_PLL_RAT=4
MEM_PLL_RAT=16
CGA_PLL1_RAT=15
CGA_PLL2_RAT=12 /* 14 GPU700 */
/*CGA_PLL2_SPD=1*/
HWA_CGA_M1_CLK_SEL=7
HWA_CGA_M2_CLK_SEL=1
HWA_CGA_M3_CLK_SEL=2
HWA_CGA_M4_CLK_SEL=3
DDR_REFCLK_SEL=2
DRAM_LAT=1
BOOT_LOC=21
SB_EN=0
FLASH_CFG1=2 /*=3*/

SYSCLK_FREQ=600
IIC2_PMUX=6 /* SDHC */
IIC3_PMUX=2 /* CAN1 */
IIC4_PMUX=2 /* CAN2 */
IIC5_PMUX=1 /* GPIO */

XSPI1_A_DATA74_PMUX=1 /* GPIO */
XSPI1_A_DATA30_PMUX=0
XSPI1_A_BASE_PMUX=0
CLK_OUT_PMUX=1 /* GPIO */
EC1_SAI4_5_PMUX=5
EC1_SAI3_6_PMUX=5
ASLEEP_PMUX=1 /* GPIO */
USB_DRVVBUS_PMUX=0
USB_PWRFAULT_PMUX=0
USB3_CLK_FSEL=39
ENETC_RCW=3

SRDS_PRTCL_S1_L0=8
SRDS_PRTCL_S1_L1=5
SRDS_PRTCL_S1_L2=11
SRDS_PRTCL_S1_L3=14
SRDS_DIV_PEX_S1=0

SRDS_S1_REFCLK_SRC_SEL=3

/* IGOR */
EC1_SAI4_5_PMUX=5
EC1_SAI3_6_PMUX=5
GTX_CLK125_PMUX=2
SDHC1_BASE_PMUX=2
SDHC2_BASE_PMUX=2
SPI3_PMUX=0


/* Errata for PCIe controller */
#include <../ls1028asi/a008851.rcw>
#include <../ls1028asi/a010477.rcw>

/* Errata for SATA controller */
#include <../ls1028asi/a010554.rcw>

/* Increase FSPI clock frequency */
#include <../ls1028asi/fspi_speed.rcw>

 

0 Kudos
Reply

1,630 Views
ikopetschke
Contributor II

kern :debug : [ 7.086658] bus: 'spi': add driver wilc1000_spi
kern :debug : [ 7.086680] bus: 'spi': __driver_probe_device: matched device spi0.0 with driver wilc1000_spi
kern :debug : [ 7.086689] bus: 'spi': really_probe: probing driver wilc1000_spi with device spi0.0
kern :info : [ 7.086729] wilc1000_spi spi0.0: spiModalias: wilc1000, spiMax-Speed: 25000000
kern :debug : [ 7.123515] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/soc/spi@2120000/wilc_spi@0[0]' - status (0)
kern :debug : [ 7.123539] of_get_named_gpiod_flags: parsed 'chip_en-gpios' property of node '/soc/spi@2120000/wilc_spi@0[0]' - status (0)
kern :debug : [ 7.128635] device: 'wilc_bt': device_add
kern :debug : [ 7.128672] PM: Adding info for No Bus:wilc_bt
kern :info : [ 7.128734] wilc1000_spi spi0.0: WILC SPI probe success
kern :debug : [ 7.145580] driver: 'wilc1000_spi': driver_bound: bound to device 'spi0.0'
kern :debug : [ 7.145692] bus: 'spi': really_probe: bound device spi0.0 to driver wilc1000_spi
kern :info : [ 27.239931] wilc1000_spi spi0.0 wlan0: INFO [wilc_mac_open]MAC OPEN[0000000068c19552] wlan0
kern :info : [ 27.239950] wilc1000_spi spi0.0 wlan0: INFO [wilc_init_host_int]Host[0000000068c19552][00000000578d8ec9]
kern :info : [ 27.239959] wilc1000_spi spi0.0 wlan0: INFO [wilc_mac_open]*** re-init ***
kern :info : [ 27.239964] wilc1000_spi spi0.0 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
kern :info : [ 27.240435] wilc1000_spi spi0.0 wlan0: INFO [wilc_wlan_initialize]WILC Initialization done
kern :info : [ 27.240441] wilc1000_spi spi0.0 wlan0: INFO [wlan_initialize_threads]Initializing Threads ...
kern :info : [ 27.240445] wilc1000_spi spi0.0 wlan0: INFO [wlan_initialize_threads]Creating kthread for transmission
kern :info : [ 27.243689] wilc1000_spi spi0.0 wlan0: INFO [wlan_initialize_threads]Creating kthread for Debugging
kern :info : [ 27.247507] wilc1000_spi spi0.0 wlan0: INFO [wilc_wlan_get_firmware]Detect chip WILC1000
kern :info : [ 27.247516] wilc1000_spi spi0.0 wlan0: INFO [wilc_wlan_get_firmware]loading firmware mchp/wilc1000_wifi_firmware.bin
kern :info : [ 27.259032] wilc1000_spi spi0.0 wlan0: INFO [wilc_firmware_download]Downloading Firmware ...
kern :info : [ 27.366342] wilc1000_spi spi0.0 wlan0: INFO [wilc_firmware_download]Download Succeeded
kern :info : [ 27.366376] wilc1000_spi spi0.0 wlan0: INFO [wilc_start_firmware]Starting Firmware ...
kern :info : [ 27.366763] wilc1000_spi spi0.0 wlan0: INFO [wilc_start_firmware]Waiting for FW to get ready ...
kern :info : [ 27.883334] wilc1000_spi spi0.0 wlan0: INFO [wilc_start_firmware]Firmware start timed out
kern :err : [ 27.883344] wilc1000_spi spi0.0 wlan0: ERR [wilc_wlan_initialize:783] Failed to start firmware
kern :info : [ 27.883351] wilc1000_spi spi0.0 wlan0: INFO [wlan_deinitialize_threads]Deinitializing Threads
kern :info : [ 27.883356] wilc1000_spi spi0.0 wlan0: INFO [wlan_deinitialize_threads]Deinit debug Thread
kern :info : [ 28.267366] wilc1000_spi spi0.0 wlan0: INFO [wlan_deinitialize_threads]Deinitializing Threads
kern :err : [ 28.267431] wilc1000_spi spi0.0 wlan0: WLAN initialization FAILED
kern :err : [ 28.267437] wilc1000_spi spi0.0 wlan0: ERR [wilc_mac_open:867] Failed to initialize wil

0 Kudos
Reply

1,641 Views
SebastianG
NXP TechSupport
NXP TechSupport

Hello @ikopetschke,

I would like to inform you that I'm working on your question, I will let you know as soon as I have an update.

Thank you so much for your patience

Regards,

Sebastian

0 Kudos
Reply

1,626 Views
ikopetschke
Contributor II
Sorry, my actual update is above
0 Kudos
Reply