I’m trying to add a custom overlay to an existing device tree.
I’ve followed the tutorial to the letter, but now after configuring the kernel up with make nconf
, I’d like to compile the device tree using the changes from the overlay. Now there’s one slight problem and that is, that I don’t see an option for adding an overlay, or at least I don’t know how to compile it/use it in a kernel.
Should I append the overlay to the .dts
file, that’ll be compiled into the .dtb
or should I compile it on it’s own and copy it somewhere the compilation process will take note of it?
This is my current overlay file:
/dts-v1/;
/plugin/;
#include <imx6dl-pinfunc.h>
/ {
compatible = "toradex,colibri_imx6dl", "fsl,imx6dl";
// EIM_A21
fragment@0 {
target = <&pwm2>;
__overlay__ { status = "disabled"; };
};
// SD4_CLK
// SD4_CMD
fragment@1 {
target = <&uart3>;
__overlay__ { status = "disabled"; };
};
// SD1_DAT1
// SD1_DAT2
fragment@2 {
target = <&usdhc1>;
__overlay__ { status = "disabled"; };
};
// Enable backlight pwm
fragment@3 {
target = <&pwm1>;
__overlay__ { status = "enabled"; };
};
fragment@4 {
target = <&iomuxc>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_test>;
pinctrl_test: gpiomuxgrp {
fsl,pins = <
MX6QDL_PAD_EIM_A21__GPIO2_IO17 0x1b0b0
MX6QDL_PAD_SD4_CLK__GPIO7_IO10 0x1b0b0
MX6QDL_PAD_SD4_CMD__GPIO7_IO09 0x1b0b0
MX6QDL_PAD_SD1_DAT2__GPIO1_IO19 0x1b0b0
MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x1b0b0
MX6QDL_PAD_NANDF_D7__GPIO2_IO07 0x1b0b0
MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0x1b0b0
MX6QDL_PAD_SD1_CLK__GPIO1_IO20 0x1b0b0
MX6QDL_PAD_EIM_D25__GPIO3_IO25 0x1b0b0
>;
};
};
};
};