Apalis TK1 with custom kernel

While booting a custom Linux kernel v4.9.41 I get multiple problems and I have no clue where to start looking. Below I pasted all the kernel messages that contain failed. I would appreciate if somebody could point me into a certain direction. Thanks in advance!

[ 0.000000] Tegra clk 127: register failed with -17
[ 0.564542] +V1.05_AVDD_HDMI_PLL: Failed to request enable GPIO63: -517
[ 0.564580] reg-fixed-voltage regulator-1v05-avdd-hdmi-pll: Failed to register regulator: -517
[ 0.567056] VCC_USBO1: Failed to request enable GPIO157: -517
[ 0.567088] reg-fixed-voltage regulator-usbo1-vbus: Failed to register regulator: -517
[ 0.567250] VCC_USBH(2A|2C|2D|3|4): Failed to request enable GPIO158: -517
[ 0.567280] reg-fixed-voltage regulator-usbh-vbus: Failed to register regulator: -517
[ 0.567438] VCC_SDMMC1: Failed to request enable GPIO85: -517
[ 0.567466] reg-fixed-voltage regulator-wlan-vbus: Failed to register regulator: -517
[ 0.630095] tegra-xusb-padctl 7009f000.padctl: failed to setup XUSB ports: -517
[ 0.643001] tegra-pcie 1003000.pcie-controller: Failed to get supply ‘avddio-pex’: -517
[ 1.474445] VDDIO_SDMMC3: failed to get the current voltage(-517)
[ 1.480551] as3722-regulator as3722-regulator: regulator 13 register failed -517
[ 2.021376] jc42: probe of 2-0048 failed with error -121
[ 2.027003] jc42: probe of 2-0049 failed with error -121
[ 2.032627] jc42: probe of 2-004a failed with error -121
[ 2.127545] sdhci-tegra: probe of 700b0000.sdhci failed with error -22
[ 2.244404] sgtl5000 1-000a: Failed to get supply ‘VDDA’: -517
[ 2.393920] tegra-pcie 1003000.pcie-controller: Failed to get supply ‘avddio-pex’: -517

The Apalis requires a custom device tree, and much of what you are seeing lines up with an invalid device tree (I can’t guarantee it, but most of what you see strongly suggests device tree). The device tree in turn depends on the carrier board, e.g., Ixora or the Apalis evaluation board can be purchased directly from Toradex, plus there are some third party carrier board suppliers, and each would require a different device tree.

Did you flash with Toradex’s software, or with the NVIDIA TK1 software? If the latter, did you apply the Toradex board support package prior to the flash?

Thanks for answering. I have a custom carrier board that has a Apalis TK1 SOM on it. In Yocto I have the toradex-mainline-4.9.bb and I include the tegra124-apalis-v1.2.dtsi in the device tree.

You may need to ask Toradex for more information since Yocto and their board support package differ significantly from the NVIDIA developer kit settings (no doubt much of the NVIDIA device tree would prevent a lot of drivers from finding the hardware on a non-NVIDIA board). Typically Toradex supplies instructions and build/flash support, along with device trees and other boot related files. Once that runs you would basically take the existing configuration of the running kernel and create a new kernel with that as its base configuration, but perhaps with some other feature added per your requirements.

In earlier releases (and I believe this includes all TK1 releases) the device tree binary is just a “.dtb” file in “/boot”, and the extlinux.conf (assuming U-Boot) points at that tree. Should the kernel have drivers capable of using that tree, then it should all “just work”. When building a kernel it is possible to also build a new tree, but unless your additions change hardware layout versus the tree you already have you won’t need to edit this. Some new hardware may give specific instructions for device tree edits, but normally this is for something required to boot and not for all hardware (e.g., if you added an ethernet port, and the port is not required to boot, then likely no device tree edit is required…but if the port is used for network booting, then odds go up dramatically that the tree needs edit).

Do keep in mind that if you build the full kernel, and not just modules, then you need to make sure the “CONFIG_LOCALVERSION” is a match to the previous kernel…without that the kernel won’t be able to find the driver modules unless you’ve also installed all of the modules from that kernel. “uname -r” is used by the kernel to find modules here:

/lib/modules/$(uname -r)/

(be sure to verify modules in that location)