Apalis TK1 Documentation Query

@kwebster83 the changes you make, whether they are in your kernel or in your image itself, do not depend on the way the image is installed. Installing via both methods - Toradex Easy Installer or U-Boot (we call it the legacy method) - installs the kernel, the bootloader and the root filesystem.
If you need to make changes to the kernel, you can simply compile it and replace the old zImage file for the new one you just compiled inside the bootfs tarball inside the Toradex Easy Installer image. Make sure you also deploy the modules to the rootfs tarball.

Or more correctly, you should use OpenEmbedded to generate a custom image including your changes to the kernel as patches. Once you compile the image, it will be deployed both as a legacy package and a Toradex Easy Installer image.

Please note that while later Toradex Easy Installer versions are able to properly initialise the U-Boot environment the legacy procedure does not touch it by default and may require manually doing it the way I described above.

Please post complete serial boot console output as a textual file should you still face any issue.

@marcel.tx @gustavo.tx Ok, so I have downloaded the Apalis TK1 Easy Installer V1.8 and extracted all the files onto a microSD card. However, when halting in u-boot and running run distro_bootcmd, the files are not seen on the microSD card and updating fails.

I’ve tried resetting the environment back to defaults using env default -a; saveenv; reset but this makes no difference.

As per the distro-boot-linux Knowledge Base documentation, the boot.scr file is present on the microSD card.

So as it stands, I don’t know how to progress with this as it seems like there are issues with the provided images as well as the instructions.

My lack of Linux experience isn’t helping my cause.

Fundamentally, the reason for needing to go through this step is that as we are now using V1.2A versions of the TK1, the I2C port we were using (on V1.1A) is now a DDC port (but I need it to be an I2C port again, our platform is a headless one so don’t need display data channel) plus some of the USB signals have moved.

Can I shoe-horn anything into a pre 2.7b3 image (i.e. just one device tree, uImage, etc) which would help me resolve this?

Also, in the Apalis TK1 PCN document (105033-pcn-apalis-tk1-2gb-v1-1a.pdf), it states that pins 84 and 274 have changed from USB_VBUS_EN1 and USB_VBUS_EN0 to GEN2_I2C_SDA and GEN2_I2C_SCL respectively. However, the remarks state that “They feature unidirectional level shifter and can only be used as output” so therefore these pins can never be used for I2C operation as the SDA signal needs to be bidirectional? Please can someone clarify this?

@kwebster83 I just tried the same procedure here and was able to boot into the Toradex Easy Installer using run distro_bootcmd and a microSD card.

Can you please share an error log? Also, can you please try using another microSD card or an USB drive?

Ok, so using a completely hybrid mix of our old scripts from the apalis-tk1_bin folder and the latest Apalis TK1 2.8.6 image, I have managed to get our TK1 up and running. I can access the I2C port via /dev/i2c-3 and can confirm that what I am reading back is absolutely fine.

However, what doesn’t seem to work is the USB as a host - which has previously worked fine (perhaps by accident as maybe the EN signals were misconfigured).

In u-boot, I can do usb start which reports 3 USB EHCI 1.10 devices but the FTDI device I have plugged into the host port doesn’t seem to appear. Likewise, if I do an lsusb when not in u-boot, still nothing is detected and dmesg doesn’t even offer any explanation.

@kwebster83 This happens with any USB port in your board? Are you using the Apalis Evaluation Board or a custom carrier board?

@gustavo.tx Yes, it seems that none of the USB ports are working - there doesn’t appear to be any 5V applied to the USB device port. When using the V1.1A of the TK1 module, this worked OK.

@kwebster83 which device tree are you using? Are you using the Apalis Evaluation Board or a custom carrier board?

Since there’s no 5V, there’s a possibility of the USB enable signal being misconfigured in the device tree. Perhaps its polarity could be reversed so you would have to change it in the device tree.

@gustavo.tx We’re using the device tree from the Toradex 2.8.6 image. We have mapped our hardware to match the Ixora carrier board (because it should just “work”). I’m trying a fresh module on the Ixora carrier board now to see what happens.

Ok, so the Ixora V1.1A carrier board seems to work as expected. The question is, is this a good thing or a bad thing - i.e. is the Ixora hardware matched to V1.2A of the TK1 module or is it matched to the V1.1A module version?

There is nothing to match. Both V1.1A as well as V1.2A should work just fine if you are using them with their proper device trees. If you are mixing and matching stuff (like e.g. U-Boot, U-Boot environment, device trees and/or Linux kernel binaries) from different BSP releases then it most likely won’t ever work.

There is nothing to match. Both V1.1A as well as V1.2A should work just fine if you are using them with their proper device trees

It seems like this is not the case.

One of the USB sockets on the Ixora carrier board does not work with the V1.2 device tree (X7) and without doing any electrical testing, it would appear that because the USBH_EN pin (84) is now an I2C_SDA pin then it seems not to be powering the USB port.

What I have done so far to get things working:

  1. Take the Apalis TK1 LXDE 2.8.6 Image
  2. Use the scripts from within the apalis-tk1_bin folder from a TK1 2.7.3 image but modify them for ext3 file system, zImage (and other bits I can’t remember at the moment)
  3. Include the tegra124-apalis-v1.2-eval.dtb device-tree (it is definitely being used)
  4. Write to microSD card and upload to the TK1
  5. Module boots through to Angstrom and everything works except USB (looks like the EN signals aren’t quite correct).

I fully admit that this is a complete hash and that there will be issues with what I’m doing but I am under significant pressure to get this up and running to meet deadlines. What with having no base-line to work with (images onwards from 2.7b3 just DO NOT work - tried on multiple TK1 modules, all fail to boot) then I’ve had to try everything which my limited Linux knowledge will allow.

The only thing I need to figure out is why the USB host port is not working on our hardware and its probably V1.2 device-tree related. The I2C on the DDC port is working fine so something tells me that parts of the V1.2 device-tree are working.

make -j3 uImage LOADADDR=0x80008000 2>&1 | tee build.log
make tegra124-apalis-eval.dtb

However, having downloaded the Apalis-TK1_LXDE-Image_2.8b6.184-20190401.tar.bz2 image, it the later versions use a zImage binary rather than a uImage. Also, the LOADADDR seems to be incorrect as in my other post from today, the ${loadaddr} looks to be 0x81000000.

Likewise, in the above script only one device tree is compiled and seems to be missing the tegra124-apalis-v1.2-eval.dtb file.

Can someone from Toradex clarify these points, please?

Yes, certainly. Nowadays, just doing the following suffices:

make -j12

This will not only compile the zImage but also any and all device trees (e.g. as outlined in the tables our article) in question.

It seems like this is not the case.

One of the USB sockets on the Ixora carrier board does not work with the V1.2 device tree (X7) and without doing any electrical testing, it would appear that because the USBH_EN pin (84) is now an I2C_SDA pin then it seems not to be powering the USB port.

No, that is actually as designed as none of them Apalis TK1 modules, regardless of their version, ever had any functional USBH3. As a matter of fact, USBH3 is routed to the on-module companion K20 MCU, so one could implement custom USB functionality e.g. in the FreeRTOS running on there.

Please note that while on Ixora V1.0A USBH2 was routed to X7 this got changed for Ixora V1.1A as outlined in its revision history:

https://developer.toradex.com/products/ixora-carrier-board#revision-history

What I have done so far to get things working:

Take the Apalis TK1 LXDE 2.8.6 Image

Use the scripts from within the apalis-tk1_bin folder from a TK1 2.7.3 image but modify them for ext3 file system, zImage (and other bits I can’t remember at the moment)

Nowadays, one should really use ext4 in every and all cases.

Include the tegra124-apalis-v1.2-eval.dtb device-tree (it is definitely being used)

Write to microSD card and upload to the TK1

Rather than the legacy update procedure, we really strongly recommend using the Toradex Easy Installer, which, BTW, does even come pre-installed with any and all V1.2A module.

Module boots through to Angstrom and everything works except USB (looks like the EN signals aren’t quite correct).

I really don;'t think so.

I fully admit that this is a complete hash and that there will be issues with what I’m doing but I am under significant pressure to get this up and running to meet deadlines. What with having no base-line to work with (images onwards from 2.7b3 just DO NOT work - tried on multiple TK1 modules, all fail to boot) then I’ve had to try everything which my limited Linux knowledge will allow.

The only thing I need to figure out is why the USB host port is not working on our hardware and its probably V1.2 device-tree related. The I2C on the DDC port is working fine so something tells me that parts of the V1.2 device-tree are working.

No, sorry, but this is really as per design. Nothing wrong really.