Page 1 of 1

Enable 2nd SPI Device and Interrupt

Posted: Wed Nov 07, 2018 6:23 am
by pjani24
I am using lubuntu with S5P4418 development board. I am successfully using SPI 0.0 as a Master and working.

Problem 1 - I want to use SPI 0.2 as a Slave but device is disabled from Kernal. How to enable it ?

Problem 2 - I want to use Interrupt but Kernal files are used as zImage and unable to change it. How to add Interrupt ?

npi-config utility is not working.


Regards.

Re: Enable 2nd SPI Device and Interrupt

Posted: Wed Nov 07, 2018 9:25 pm
by greg2k
Hi,

if you want to enable SPI0.2 please add following config in arch/arm/boot/dts/s5p4418-nanopi2-common.dtsi.
Example:

&spi_2 {
status = "okay";
cs-gpios = <&gpio_c 10 0>;

spidev0: spidev@0 {
status = "okay";
compatible = "linux,spidev";
pl022,hierarchy = <0>;
pl022,com-mode = <0>;
pl022,interface = <0>;
pl022,rx-level-trig = <1>;
pl022,tx-level-trig = <1>;
reg = <0>;
spi-max-frequency = <10000000>;
};
};

Next recompile kernel and use new bzImage and dtb file.

Re: Enable 2nd SPI Device and Interrupt

Posted: Wed Aug 07, 2019 5:19 pm
by Shubakar Gowda
greg2k wrote:
Hi,

if you want to enable SPI0.2 please add following config in arch/arm/boot/dts/s5p4418-nanopi2-common.dtsi.
Example:

&spi_2 {
status = "okay";
cs-gpios = <&gpio_c 10 0>;

spidev0: spidev@0 {
status = "okay";
compatible = "linux,spidev";
pl022,hierarchy = <0>;
pl022,com-mode = <0>;
pl022,interface = <0>;
pl022,rx-level-trig = <1>;
pl022,tx-level-trig = <1>;
reg = <0>;
spi-max-frequency = <10000000>;
};
};

Next recompile kernel and use new bzImage and dtb file.




Hii,

I want to access a DAC chip over Spi could you please suggest me how can I achieve that .