hi, Niklas
See below inline:
Thanks for your answer.
That was showing that I was going in the right direction.
Whats it the difference between the .dtsi and .dts files?
In the imxqdl-sabresd.dtsi file, there is an instanciation of the ecspi1:
&ecspi1 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio4 9 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1_2>;
status = "okay";
flash: m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "st,m25p32";
spi-max-frequency = <20000000>;
reg = <0>;
};
};
Is this where I should setup the chip select, and not in the pinctrl_ecspi1_1 and not in the imx6qdl.dtsi file?
How does this <&gpio4 9 0>; work? (9? 0?)
If I want to add a CS, how would that look like?
[Anson] Please read the binding doc in Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt, <&gpio4 9 0> means gpio4_9, it is KEY_ROW1 in our SabreSD board wotked as CSPI1_CS0. If you want to add a CS, you should know which pin, and this pin can be muxed to gpio?_?, then add one line as below, you can refer to other platfroms in dts folder.
arch/arm/boot/dts/imx53-evk.dts:
cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
In the pinctrl setup, I noticed for the ENET_REF_CLK, it had a longer value:
MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8
The IOMUXC_SW_PAD_CTL_PAD_ENET_REF_CLK doesn't have anytthing for bit 17-31 in the manual (Reserved). I assume this higher part of the value goes to a different register?
[Anson] No, you should read the DOC Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt, the bit 30 meas this pin should set to input mode, SION in IOMUXC.
Best regards,
Niklas