Changing imx6q-wandboard.dts for enabling ECSPI1 on Yocto

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

Changing imx6q-wandboard.dts for enabling ECSPI1 on Yocto

Postby nambiar » Fri Apr 07, 2017 9:14 am

Hi All,
I am using wandboard quad along with Yocto for building the image. I want to enable the spi-dev in image. I understand that the device tree file has to be changed , so I have added the following in the imx6qdl-wandboard.dts.
Code: Select all
&ecspi1 {
fsl,spi-num-chipselects = <2>;
cs-gpios = <&gpio2 30 0>, <&gpio4 10 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1_1>;
status = "okay";

spidev@0x00 {
compatible = "spidev";
spi-max-frequency = <16000000>;
reg = <0>;
};

spidev@0x01 {
compatible = "spidev";
spi-max-frequency = <16000000>;
reg = <1>;
};
};

I checked the GPIO numbers with the schematic of RevC1 and they are correct , Also I added this too.

Code: Select all
ecspi1{
pinctrl_ecspi1_1: ecspi1grp-1 {
fsl,pins = <
MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1
MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1
MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1
MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x000f0b0
MX6QDL_PAD_KEY_COL2__GPIO4_IO10 0x000f0b0
>;
};
};

How can I only produce the device tree binary without having to chane anything or how should I add my dts changes for it to reflect in the kernel . Thanks for reading the mail.

Regards
Sainath
nambiar
 
Posts: 9
Joined: Tue Apr 04, 2017 12:21 pm

Re: Changing imx6q-wandboard.dts for enabling ECSPI1 on Yoct

Postby Must_ba » Fri Apr 07, 2017 4:06 pm

Hi ;

go to the /fsl-community-bsp/
then do
Code: Select all
. ./setup-environment build

Code: Select all
 bitbake -c devshell kernel/virtual


write this command and it will open the new window then

Code: Select all
make imx6X-wandboard.dtb


this will generate the new kernel then go to the file which holds generated new .dtb file , then copy that with root permission ( sudo -i) to the your boot part of your sdcard.

You can copy the oldest one to another file or on your desktop for to save , otherwise I dont know how to generate without changing the old one .

I hope it is the answer of your question .

BR

Must_ba
Must_ba
 
Posts: 23
Joined: Thu Jan 19, 2017 11:07 pm

Re: Changing imx6q-wandboard.dts for enabling ECSPI1 on Yoct

Postby nambiar » Wed Apr 12, 2017 9:31 am

Thanks @Must_ba, Only correction is
Code: Select all
bitbake virtual/kernel -c devshell
I am able to list spi device in /dev as well as run the looparound test .

Regards
Sainath
nambiar
 
Posts: 9
Joined: Tue Apr 04, 2017 12:21 pm


Return to Hardware and peripherals

Who is online

Users browsing this forum: Bing [Bot] and 17 guests

cron