In case anyone wants to use CAN, you need to remove the gpio-binds from the device tree file imx8qm-mek.dts so it looks like this:
&flexcan0
{
status = "okay";
};
&flexcan1
{
status = "okay";
};
&flexcan2
{
status = "okay";
};
Also if you want the Vxworks console to use the Serial1 port then you must change the device tree to look like this:
Add change CONSOLE_TTY to 1:
Unfortunately I still can’t get Ethernet to work. I test with ping.
Can you share the bootargs and routing table?
Here is my bootargs:
bootargs=enet(0,0)host:vxWorks h=192.168.4.153 e=192.168.4.107:ffffff00 g=192.168.4.1 u=target pw=vxTarget f=0x00
And the default routing table:
Also what VxWorks version are you using? I’m using 2021-07. I noticed that Apalis v1.1 switched from ksz9031 phy to ksz9131. Do you know which of the two phy you have on your board? I am wondering if VxWorks version I’m using doesn’t support the newer phy.
Thanks
Also using 21.07. Same PHY. Ethernet just worked. I was also a little surprised about that phy setting in the .dtsi. Perhaps the linux driver uses that phy config as this configuration works for both Linux and VxWorks on my board.
bootargs = “enet(0,0)host:vxWorks h=192.168.10.100 e=192.168.10.2:ffffff00 g=192.168.10.1 u=vxworks pw=vxworks”;
The only other thing I can think of probably doesn’t apply but with our work computers all ethernet adapters ( we use usb adapters for target ethernet) default to “public”. After every reboot I have to reset the adapter (this is in windows 10) to private using a Powershell script. Also, sometimes the usb ethernet adapters hang onto addresses. There is an advanced tab in the configuration where stale ones can be removed.
Thanks for the info. Can you tell me what vxworks command you used to get this ouput?
Also, are you connecting the vxworks board to a router/switch network or is it directly connected to another computer (peer-to-peer) using a cross-over cable?
Thanks again.
I have a USB hub that connects the serial and ethernet to my IMX8 board. For USB ethernet I use a StarTech USB31000S adapter.
vxbDevShow () will list the system devices (essentially what is in the .dts/.dtsi files). If a driver doesn’t exist or doesn’t load right you will see “” in the output for the device.
You can always type the first few characters like “vxb” and then hit ctrl-d. VxWorks will list every function that starts with “vxb”. Some of the show routines require a device address. You can also get this from the vxbDevShow listing. For Example vxbPciTopoShow() requires a 64bit device address. Given:
I can run vxbPciTopoShow(0xFFFF8000002429900, 0, 0, 0) to see the PCI tree.
If you are having trouble with a driver you can find the file in the vxWorks source tree and copy it to your VIP project directory. VxWorks will link against your local copy allowing you to turn on debug info in the driver or add you own trace statements with kprintf(). We have had some issues with PCIe so I have the Freescale PCIe driver added to my vip:
These are great tips. Thanks!
I think my Ethernet in Vxworks is working. I am able to see some ARP messages with wireshark on the host computer side. Ping wasn’t working so I thought the driver was failing.
Thanks
I can ping from host to target (windows–>vx) but not target to host ( vx–>windows). I usually use a target server in Workbench to determine if ethernet is working sufficiently. Sorry, I assumed you were having issues pinging from the host. In fact I didn’t even have ping installed on the target.
I wasn’t aware you could do that with workbench. I’ll use that. Thanks!
I fixed the Ethernet instability issues I was having by adding the skews to the device tree. I’m not sure why we have different experiences with the Ethernet but I figured I would share the details in case anyone else runs into the same issue.
Changed phy to “micrelPhy”, reg to 7, and add the skews shown below:
The following change allows KSZ9131 phy to use the same code as KSZ9031. Edit vxworks/os/net/end/drv/src/mii/vxbMicrelPhy.c to look like the following:
Removed INCLUDE_AR803X_PHY and added INCLUDE_MICREL_PHY to VIP.
Rebuild VSP and VIP projects.
Hope this helps someone in the future.
Sorry to bother you again. Did you get the sd card or emmc to work in vxworks? It fails to boot if I enable them in my vip project. Thanks
Both SD’s work in vxWorks, however, you can only boot from eMMC on the Apalis iMX8. This information would be a nice add to the documentation as I wasted a lot of time trying to boot from SD.
I don’t recall making driver changes and don’t have any related driver files pulled up into my VIP. I did have to change the .dtsi I think.
emmc: emmc@5b010000 /* usdhc0 */
{
compatible = "imx8,sdhc", "fsl,imx8qm-usdhc", "fsl,imx6sl-usdhc";
reg = <0 0x5b010000 0 0x1000>;
interrupts = <264 0 4 0>;
interrupt-parent = <&intc>;
iommus = <&smmu 0x8 0x7c00>;
clocks = <&sdhc0_clk>, <&sdhc0_ipg_clk>;
non-removable;
disable-wp;
/*dma-mode = <0>; 0 for SDMA, 1 for PIO, 3 for ADMA2 */
tuning_start = <20>;
tuning_step = <2>;
pinmux-0 = <&iomux_emmc>;
pinmux-1 = <&iomux_emmc_100mhz>;
pinmux-2 = <&iomux_emmc_200mhz>;
bus-width = <8>;
status = "disabled";
};
usdhc1: usdhc@5b020000 /* 8 bit SD Card */
{
compatible = "imx8,sdhc", "fsl,imx8qm-usdhc", "fsl,imx6sl-usdhc";
reg = <0 0x5b020000 0 0x1000>;
interrupts = <265 0 4 0>;
interrupt-parent = <&intc>;
iommus = <&smmu 0x7 0x7c00>;
clocks = <&sdhc1_clk>, <&sdhc1_ipg_clk>;
disable-wp;
no-1-8-v;
cd-gpios = <&gpio2 9 0 0 0>;
pinmux-0 = <&iomux_usdhc>;
pinmux-1 = <&iomux_usdhc_100mhz>;
pinmux-2 = <&iomux_usdhc_200mhz>;
/* dma-mode = <0>; 0 for SDMA, 1 for PIO, 3 for ADMA2 */
bus-width = <8>;
status = "disabled";
};
usdhc2: usdhc@5b030000 /* 4 bit SD card */
{
compatible = "imx8,sdhc", "fsl,imx8qm-usdhc", "fsl,imx6sl-usdhc";
reg = <0 0x5b030000 0 0x1000>;
interrupts = <266 0 4 0>;
interrupt-parent = <&intc>;
iommus = <&smmu 0x7 0x7c00>;
clocks = <&sdhc2_clk>, <&sdhc2_ipg_clk>;
disable-wp;
no-1-8-v;
cd-gpios = <&gpio4 12 0 0 0>;
pinmux-0 = <&iomux_usdhc>;
pinmux-1 = <&iomux_usdhc_100mhz>;
pinmux-2 = <&iomux_usdhc_200mhz>;
dma-mode = <0>; /* 0 for SDMA, 1 for PIO, 3 for ADMA2 */
bus-width = <4>;
status = "disabled";
};
Thank you, this was the specific change that got it working for me. Thanks again
The only thing I need now is HDMI but I don’t think vxworks has drivers for the QuadMax.
Fortunately, we don’t have any use for video. That sounds challenging in the not so fun way.