Hi All,
In linux-imx 4.9.11, we have allocated 3 gpios for chip selects on espi4, however only cs0 is toggling. Below is the dts configuration. I have also configured these gpios via sysfs and cannot toggle them there either.
In spi.c spi_set_cs I have added a printk statement and the correct gpio value is seen there also (165, 170).
Is there a known issue with the gpios as chip selects for espi4 in this linux version?
This dts configuration work with linux-imx 3.14.28.
pinctrl_ecspi4_cs: ecspi4_cs_grp {
fsl,pins = <
MX6SX_PAD_SD2_DATA2__GPIO6_IO_10 0x80000000 /* cs0, F10 */
MX6SX_PAD_SD1_DATA3__GPIO6_IO_5 0x80000000 /* cs1, A14 */
MX6SX_PAD_SD2_DATA1__GPIO6_IO_9 0x80000000 /* cs2, F13 */
>;
}; //ecspi
&ecspi4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi4 &pinctrl_ecspi4_cs>;
cs-gpios = <&gpio6 10 GPIO_ACTIVE_LOW>, <&gpio6 5 GPIO_ACTIVE_LOW>, <&gpio6 9 GPIO_ACTIVE_LOW>;
status = "okay";
mram@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mr25h40", "jedec,spi-nor";
reg = <0 0x00000000 0x00080000>;
spi-max-frequency = <40000000>;
partition@0 {
label = "mram";
reg = <0x00000000 0x00080000>;
};
};
fram@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cy15b104", "jedec,spi-nor";
spi-max-frequency = <30000000>;
reg = <1 0x00000000 0x00080000>;
partition@0 {
label = "fram";
reg = <0x00000000 0x00080000>;
};
};
#if (0)
ethernet-swith8765@2 {
compatible = "ksz8795";
reg = <2>;
spi-max-frequency = <50000000>;
reset-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
status = "okay";
};
#endif
};
Alric
These gpio's GPIO6_IO_10,GPIO6_IO_5, GPIO6_IO_9 are not defined in u-boot.
We are using mx6sxsabresd in u-boot, I don't see a corresponding dts for it.
Interesting, I can control gpio 169 and 170 from user space but not 165
Alric
Hi Alric
I am afraid multiple gpios as chip selects on espi is not supported
in nxp driver, for developing such functionality one can apply to
NXP Professional Services to develop it
Best regards
igor
Hi Alric
for pinctrl_ecspi4 example one can look on
imx6sx-14x14-arm2.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
also may be useful to check how GPIO6_IO_10,GPIO6_IO_5, GPIO6_IO_9 are configured in uboot.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------