@kevin.tx: What I meant was that the differences between mainline and downstream arch/arm/boot/dts/imx6qdl-colibri.dtsi
as well as between mainline and downstream arch/arm/boot/dts/imx6qdl.dtsi
are huge.
As I already wrote, I based my custom DTS on a copy of imx6dl-colibri-eval-v3.dts
which I then customized. I could update my DTS to the downstream based kernel by comparing my old DTS with the new imx6dl-colibri-eval-v3.dts
and incorporating the changes.
But in mainline-based kernel a lot of entries have been removed from imx6dl-colibri-eval-v3.dts
and I cannot see where they are defined now.
I did some more comparsion between my “downstream” DTS and mainline imx6dl-colibri-eval-v3.dts
and found out that my major problem is pin muxing.
E.g. in my custom DTS on downstream kernel I have these lines in iomuxc
:
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <
&pinctrl_weim_gpio_1 &pinctrl_weim_gpio_2
&pinctrl_weim_gpio_3 &pinctrl_weim_gpio_4
&pinctrl_weim_gpio_5 &pinctrl_weim_gpio_6
&pinctrl_csi_gpio_1
&pinctrl_gpio_1
&pinctrl_gpio_2
&pinctrl_usbh_oc_1
>;
...
But if I add these section to my mainline DTS the kernel does not start booting. I am booting via TFTP/NFS, this is the output in minicom (the “screenshot”, I have no screen attached):
U-Boot 2016.11-2.8.4+gfae215c23c (Sep 16 2020 - 08:36:53 +0000)
CPU: Freescale i.MX6DL rev1.3 at 792 MHz
Reset cause: POR
I2C: ready
DRAM: 512 MiB
PMIC: device id: 0x10, revision id: 0x21, programmed
MMC: FSL_SDHC: 0, FSL_SDHC: 1
auto-detected panel vga-rgb
Display: vga-rgb (640x480)
In: serial
Out: serial
Err: serial
Model: Toradex Colibri iMX6 DualLite 512MB V1.1A, Serial# 05189691
Net: using PHY at 0
FEC [PRIME]
Hit any key to stop autoboot: 0
Colibri iMX6 # run netboot
Booting via TFTP/NFS...
Using FEC device
TFTP from server 192.168.17.26; our IP address is 192.168.17.50
Filename 'colibri_imx6/imx6dl-colibri-myboard.dtb'.
Load address: 0x12100000
Loading: ################################################## 51 KiB
4.2 MiB/s
done
Bytes transferred = 52233 (cc09 hex)
Using FEC device
TFTP from server 192.168.17.26; our IP address is 192.168.17.50
Filename 'colibri_imx6/zImage'.
Load address: 0x11000000
Loading: ################################################## 6.3 MiB
3.8 MiB/s
done
Bytes transferred = 6560784 (641c10 hex)
## Flattened Device Tree blob at 12100000
Booting using the fdt blob at 0x12100000
Loading Device Tree to 1fff0000, end 1ffffc08 ... OK
Starting kernel ...
I use a custom command netboot
which is similar to nfsboot
. Only difference is that it uses hard coded variables instead of retrieving them via DHCP.
If I comment out the above mentioned lines in iomuxc, the kernel starts booting, but I get this warning:
[ 0.058142] imx6dl-pinctrl 20e0000.iomuxc: no fsl,pins and pins property in node /soc/aips-bus@2000000/iomuxc@20e0000/csi
[ 0.058179] imx6dl-pinctrl 20e0000.iomuxc: no fsl,pins and pins property in node /soc/aips-bus@2000000/iomuxc@20e0000/gpio
[ 0.058208] imx6dl-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
And later some custom kernel modules fail to load because of invalid pin configuration:
[ 1.848833] input: gpio-keys as /devices/soc0/gpio-keys/input/input0
[ 1.856079] imx6dl-pinctrl 20e0000.iomuxc: invalid function gpio in map table
[ 1.863239] gpio-keys: probe of mymodule failed with error -22
Further below systemd complains:
[ 6.466796] mymodule2: module is from the staging directory, the quality is unknown, you have been warned.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
And finally systemd enters emergency mode with:
[ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[ TIME ] Timed out waiting for device dev-mmcblk0p3.device.
[DEPEND] Dependency failed for /data.
[DEPEND] Dependency failed for Local File Systems.
This is the output of ‘systemctl status systemd-modules-load.service’ (custom module names edited):
[[0;1;31m●[[0m systemd-modules-load.service - Load Kernel Modules
Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; ven
dor preset: enabled)
Active: [[0;1;31mfailed[[0m (Result: exit-code) since Thu 1970-01-01 00:00:06
UTC; 15min ago
Docs: man:systemd-modules-load.service(8)
man:modules-load.d(5)
Process: 158 ExecStart=/lib/systemd/systemd-modules-load [[0;1;31m(code=exited
, status=1/FAILURE)[[0m
Main PID: 158 (code=exited, status=1/FAILURE)
Jan 01 00:00:06 pe8007-00142d4e42cf systemd-modules-load[158]: [[0;1;31m[[0;1;39
m[[0;1;31mFailed to find module 'galcore'[[0m
Jan 01 00:00:06 pe8007-00142d4e42cf systemd-modules-load[158]: Inserted module '
libcomposite'
Jan 01 00:00:06 pe8007-00142d4e42cf systemd-modules-load[158]: Inserted module '
mymodule3'
Jan 01 00:00:06 pe8007-00142d4e42cf systemd-modules-load[158]: Inserted module '
mymodule4'
Jan 01 00:00:06 pe8007-00142d4e42cf systemd-modules-load[158]: Inserted module '
mymodule5'
Jan 01 00:00:06 pe8007-00142d4e42cf systemd-modules-load[158]: Inserted module '
mymodule6'
imx6dl-colibri-myboard.dts
(renamed) is including:
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"
If I use imx6dl-colibri-eval-v3.dtb
instead of the custom DTS the kernel starts, but of course my modules fail to load.
For now I will use my downstream based kernel, but I would be grateful for help with the migration to mainline.