I know this is a topic, on which there are several other posts. However none? of them has an accepted answer or even a helpful comment. But in short, how can load a device tree module (without recompiling the kernel)?
So far I could find following methods:
- Loading at runtime, per
cat enI2C4.dtbo>/sys/kernel/config/device-tree/overlays. - Loading at the boot process with specifying the
.dtbofile in/boot/bootenv.txtand/or/boot/uEnv.txt. In both cases the content is (enI2C4.dtbois stored under/boot):
overlays=enI2C4.dtbo
Sadly none of them did work for me:
- The
device-treedirectory does not exist and mkdir returnsOperation not permitted. Most solutions to this problem do seem to compile their own kernel, which I neither think is realy necessary, nor it's something I want to do. - Editing/Creating either of these two files, does not seem to have any effect. Neither can I find my overlay with
find /proc/device-tree/ -type f -exec head {} + | grep I2C, nor doesdmesgreturn anything special.
So what am I missing here? Is there a third option, or something (probably stupid), which I am missing here?
As background and additional Infos:
I'm trying to enable I2C4 on an i.MX 8M plus with:
$ lsb_release -a
Distributor ID: ampliPHY
Description: ampliPHY GNU/Linux BSP-Yocto-NXP-i.MX8MP-PD22.1.0 (hardknott)
Release: BSP-Yocto-NXP-i.MX8MP-PD22.1.0
Codename: hardknott
The .dts file is:
/dts-v1/;
#include "imx8mp.dtsi"
&i2c4 {
clock-frequency = <400000>;
pinctrl-names = "default", "gpio";
status = "okay";
};
And here is the bootpromp (after mounting /boot/) with both the /boot/bootenv.txt and /boot/uEnv.txt files in place.
[ OK ] Mounted /boot.
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Finished Create Volatile Files and Directories.
Starting Network Name Resolution...
Starting Network Time Synchronization...
[ OK ] Started Network Name Resolution.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target Network.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Reached target System Initialization.
[ 6.550051] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
[ 6.557338] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
[ 6.564225] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
[ 6.570968] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
[ 6.577572] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
[ 6.597437] imx-cdnhdmi sound-hdmi: snd_soc_register_card failed (-517)
[ OK ] Started 6.605376] fsl-aud2htx 30cb0000.aud2htx: Unbalanced pm_runtime_enable!
;39mDaily Cleanup of Temporary Di[ 6.613814] fsl-aud2htx 30cb0000.aud2htx: failed to init imx pcm dma: -517
rectories.
[ OK ] Reached target System Time Set.
[ OK ] Reached target System Time Synchronized.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on PC/SC Smart Card Daemon Activation Socket.
Starting sshd.socket.
[ OK ] Started NFS status monitor for NFSv2/3 locking..
[ OK ] Listening on sshd.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Save/Restore Sound Card State...
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started Start fan control, if configured.
[ OK ] Started Linux Firmware Loader Daemon.
Starting User Login Management...
Starting Permit User Sessions...
[ 6.927296] imx-sdma 30bd0000.dma-controller: firmware found.
Starting OpenSS[ 6.934041] imx-sdma 30bd0000.dma-controller: loaded firmware 4.6
H Key Generation...
[ OK ] Finished Save/Restore Sound Card State.
[ OK ] Finished Permit User Sessions.
[ OK ] Finished OpenSSH Key Generation.
[ OK ] Reached target Sound Card.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttymxc0.
[ OK ] Reached target Login Prompts.
[ OK ] Started User Login Management.
[ OK ] Reached target Multi-User System.
[ 7.198435] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[ 7.204785] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
____ _ _ __ __ _____ _____ ____
| _ \ | | | |\ \ / /|_ _|| ____| / ___|
| |_) || |_| | \ V / | | | _| | |
| __/ | _ | | | | | | |___ | |___
|_| |_| |_| |_| |_| |_____| \____|
_ __ __ ____ _ ___ ____ _ _ __ __
/ \ | \/ || _ \ | | |_ _|| _ \ | | | |\ \ / /
/ _ \ | |\/| || |_) || | | | | |_) || |_| | \ V /
/ ___ \ | | | || __/ | |___ | | | __/ | _ | | |
/_/ \_\|_| |_||_| |_____||___||_| |_| |_| |_|