Not understanding how to enable peripherals in devicetree
jason.bens@...
Hi,
I’m a complete newcomer to zephyr and devicetree, and I’m running into some trouble trying to enable the I2S peripheral on the nRF5340dk board. I’ve enabled both the I2S driver (Modules->hal_nordic->nrfx_drivers) and the I2S bus drivers (Device Drivers) in menuconfig. I’ve also added “CONFIG_I2S=y” to my top-level prj.conf. Despite this, when I check zephyr.dts in my build directory, the i2s0 device is disabled.
Zephyr.dts excerpt: i2s0: i2s@28000 { compatible = "nordic,nrf-i2s"; #address-cells = < 0x1 >; #size-cells = < 0x0 >; reg = < 0x28000 0x1000 >; interrupts = < 0x28 0x1 >; status = "disabled"; label = "I2S_0"; };
I’ve checked the i2s litex sample and read through the docs, but I’m not finding a solution. Am I missing a step somewhere to enable this device? Do I need a devicetree overlay to explicitly enable i2s? If it’s relevant, I’ve been using the Nordic edition of SEGGER Embedded studio to build the project, as per Nordic’s nRF Connect toolchain documentation.
Thanks,
|
|
Armand C. <rnx.lab@...>
Hi Jason,
You have to enable the peripheral in the board devicetree overlay (see below). &i2s0 { status = "okay"; }; Armand |
|
Jason Bens <jason.bens@...>
Thanks Armand,
I think I‘ve got that working, now, and referenced properly in the CMakeList. A devicetree binding somewhere requires a couple pin definitions, but I can handle that.
I did come across a bit more documentation at \zephyr\boards\arm\nrf5340dk_nrf5340\doc\index.rst , which lists the supported features for this SoC. I2S is not on that list. I’m not sure if that documentation is coming from the Zephyr community or Nordic, but should I interpret that to mean that any I2S driver functionality is accidental at best?
From: users@... <users@...>
On Behalf Of Armand C.
Sent: June 29, 2021 2:22 PM To: users@... Subject: Re: [Zephyr-users] Not understanding how to enable peripherals in devicetree
External Email: Hi Jason, |
|