Setting up a new board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting up a new board

1,326 Views
robyf
Contributor IV

Hi All,

We are going to design a new board starting from a iMX6SLEVK board, so I need some help to setup correctly everything from the beginning since it's my first time with Yocto and other freescale tools.

Actually I've created a new meta package dedicated to our stuff which seems to build correctly some packages I would added to our image.

What I don't know how to do, is how can I remap some pin mux we have routed from the EPDC signal to our daughter board. I guess I'll need to do a new DTS file but I don't know out to specify the new pin pad settings from it.

Below you can find the pin pad mux I would like to set:

GroupAUDMUX:

IOMUXC_SW_MUX_CTL_PAD_EPDC_PWR_CTRL3(ALT1) -> audmux.AUD5_TXC

IOMUXC_SW_MUX_CTL_PAD_EPDC_PWR_CTRL1(ALT1) -> audmux.AUD5_TXFS

IOMUXC_SW_MUX_CTL_PAD_EPDC_VCOM1(ALT1) -> audmux.AUD5_RXD

IOMUXC_SW_MUX_CTL_PAD_EPDC_PWR_CTRL2(ALT1) -> audmux.AUD5_TXD

GroupSPI

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA03(ALT1) -> ecspi4.SCLK

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA02(ALT1) -> ecspi4.SS0

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA01(ALT1) -> ecspi4.MISO

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA00(ALT1) -> ecspi4.MOSI

GroupControl:

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA06(ALT5) -> GPIO1_IO13

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA07(ALT5) -> GPIO1_IO14

Finally, since I'm using the EPDC(J12) connector I guess I'll need to disable the remaining EPDC functionality.

Does anyone can suggest how to do it?

Thanks in advance,

Roberto Fichera.

Labels (3)
Tags (3)
0 Kudos
4 Replies

672 Views
igorpadykov
NXP Employee
NXP Employee

Hi Roberto

For DTS description one can look at link and book below

http://elinux.org/Device_Tree

Below example of changing one pin:

"GroupSPI

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA03(ALT1) -> ecspi4.SCLK"

First look at dts example below

https://gitorious.org/dr-poky-fsl/linux-imx-dr/source/0cd0a63521c5e43403748562fac9af047ecac0c5:arch/...

epdc {

pinctrl_epdc_0: epdcgrp-0 {

fsl,pins = <

MX6SL_PAD_EPDC_D0__EPDC_DATA00 0x80000000

MX6SL_PAD_EPDC_D1__EPDC_DATA01 0x80000000

MX6SL_PAD_EPDC_D2__EPDC_DATA02 0x80000000

MX6SL_PAD_EPDC_D3__EPDC_DATA03 0x80000000  <---------- change to MX6SL_PAD_EPDC_D3__ECSPI4_SCLK

Pin mux declarations one can find in imx6sl-pinfunc.h

http://lxr.free-electrons.com/source/arch/arm/boot/dts/imx6sl-pinfunc.h

209  #define MX6SL_PAD_EPDC_D3__EPDC_DATA03            

210  #define MX6SL_PAD_EPDC_D3__ECSPI4_SCLK

For disabling remaining EPDC functionality one can

add to epdc node "status = "disabled"

epdc: epdc@020f4000 {

...

status = "disabled";

One can check example on p.12 "Device Tree for Dummies - The Linux Foundation"

http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

672 Views
robyf
Contributor IV

Hi chipexpert,

thanks a lot to clarify me with an example the DTS pin muxing! This was really helpful! I've also already had a look to all links you wrote while googling around.

I'll look around the all the imx6's dts file to see which one is the best to start from. In case feel free to suggest one :smileywink:!

0 Kudos

672 Views
robyf
Contributor IV

Hi,

After a bit of delay I was able to get back to this and indeed worked. Now I've the problem

to setup the ecsp4 in order to be available for my spi driver controlling a daughter card.

Current ecspi1 declaration for the IMX6SLEVK with dts file looks like

&ecspi1 {

    fsl,spi-num-chipselects = <1>;

    cs-gpios = <&gpio4 11 0>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_ecspi1_1>;

    status = "okay";

   flash stuff

    ....

    ....

};

so I can cut&paste it removing the flash stuff, changing the pinctrl-0 to my own setup but I don't know how to set spi-num-chipselects and cs-gpio properties.

&ecspi4 {

    fsl,spi-num-chipselects = <4?????>;

    cs-gpios = <&gpio? ?? 0>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_ecspi4_1>;

    status = "okay";

};

can you please give me an hint?

Best regards,

Roberto Fichera.

0 Kudos

672 Views
robyf
Contributor IV

Maybe I've understood the things. spi-num-chipselects is an array of GPIO pins to be used as CS# signal, so I may case is only one,

but I don't know which GPIO I'll have to use. Actually is physically wired as

IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA02(ALT1) -> ecspi4.SS0

&ecspi4 {

    fsl,spi-num-chipselects = <1>;

    cs-gpios = <&gpio? ?? 0>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_ecspi4_1>;

    status = "okay";

};

0 Kudos