Re: Jetson TK1: Additional SPI chip selects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/07/2016 07:25 AM, Ralf Ramsauer wrote:
Hi,

I'm running a Jetson TK1 on mainline Linux. To enable userspace SPI, I
modified the device-tree by:

 /* Expansion TS_SPI_* */
 spi@7000d400 {
 	status = "okay";
+ 	spidev@0 {
+		compatible = "spidev";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+	};
 };

This works fine. Is it possible to use arbitrary GPIOs as additional
chip-selects?

What would I have to do If I'd like to add PU0 or PU1 (sysfs
gpio160/161) as chip-selects?

According to Documentation/devicetree/bindings/spi/spi-bus.txt, there are standard properties you can use for GPIO chip-select signals, and it looks like the SPI core code handles this itself. However, judging by a quick look at the Tegra SPI driver, it doesn't fully support that since it always attempts to program the HW chip-selects. If you make the HW CS logic in the driver conditional, and add the DT properties mentioned in spi-bus.txt, it should work.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux