AnsweredAssumed Answered

Some questions regarding device tree and ecspi

Question asked by Heinrich Geiger on Nov 2, 2018
Latest reply on Nov 5, 2018 by igorpadykov

Hello colleagues,

 

I am developing a driver for TI SRC4193 (asynchronous sample-rate converter) and have some questions regarding the device tree.

 

The SRC4193 is connected to ECSPI2, here the configuration:

&ecspi2 {
fsl,spi-num-chipselects = <2>;
cs-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>
, <&gpio5 9 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";

src4193@0 {
compatible="ti,src4193";
spi-max-frequency = <10000000>;
};
};

Pinmux looks like this:

 

&iomuxc {

...
pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT16__ECSPI2_MOSI 0x100b1
MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO 0x100b1
MX6QDL_PAD_DISP0_DAT19__ECSPI2_SCLK 0x100b1
MX6QDL_PAD_DISP0_DAT18__ECSPI2_SS0 0x000b1 /* CS0 */
MX6QDL_PAD_DISP0_DAT15__ECSPI2_SS1 0x000b1 /* CS1 */
>;
};
....
};

ECSPI2 has two CS lines.

 

My questions:

1. How can I explicitly assign a CS line (in this case CS1) to the SRC4193?

2. When do the settings in PINMUX become active? When booting? When loading the driver for SRC4192?

 

My hardware and sorftware:

Linux: Kernel 4.9.88 with boundary devices RootFS

Soc: i.MX6Dual on Embest MarsBoard

 

Many thanks and regards,

Heinrich

Outcomes