2019-08-29 12:10 PM
I would like to access a SPI Device (Ethercat Shield) over the Arduino Headers (SPI4). What do i have to do to get the /dev/spidev... device file in Linux ?
Sorry, but i'm still confused what is enabled, what do i have to enable in DTS files and when i have to rebuild the kernel (that works 🙂 )
Thanks Daniel
Solved! Go to Solution.
2019-08-30 01:05 AM
You can use this DT fragment to enable spidev on spi4
&spi4 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi4_pins_a>;
pinctrl-1 = <&spi4_sleep_pins_a>;
status = "okay";
cs-gpios = <&gpioe 11 0>;
spidev@0{
compatible = "spidev";
reg = <0>;
spi-max-frequency = <4000000>;
#address-cells = <1>;
#size-cells = <0>;
};
};
2019-08-30 01:05 AM
You can use this DT fragment to enable spidev on spi4
&spi4 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi4_pins_a>;
pinctrl-1 = <&spi4_sleep_pins_a>;
status = "okay";
cs-gpios = <&gpioe 11 0>;
spidev@0{
compatible = "spidev";
reg = <0>;
spi-max-frequency = <4000000>;
#address-cells = <1>;
#size-cells = <0>;
};
};
2019-08-30 12:22 PM
Thanks a lot