The question about SPI


We want to directly manipulate PWM and SPI of SPE above linux kernel.
In tegra186-quill-p3310-1000-c03-00-base.dtb, we find there are two places have “c260000”:

spi@c260000 {
		compatible = "nvidia,tegra186-spi";
		reg = <0x0 0xc260000 0x0 0x10000>;
		interrupts = <0x0 0x25 0x4>;
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		iommus = <0x11 0x20>;
		dmas = <0x25 0x10 0x25 0x10>;
		dma-names = "rx", "tx";
		nvidia,clk-parents = "pll_p", "osc";
		spi-max-frequency = <0xb71b00>;
		clocks = <0x10 0xde 0x10 0x10d 0x10 0x264>;
		clock-names = "spi", "pll_p", "osc";
		resets = <0x10 0x29>;
		reset-names = "spi";
		status = "okay";
		linux,phandle = <0x18d>;
		phandle = <0x18d>;

		spi-touch-sharp19x12@0 {
			avdd-supply = <0x3e>;
			dvdd-supply = <0x3f>;
			status = "okay";
			compatible = "sharp,lr388k7_ts";
			reg = <0x0>;
			spi-max-frequency = <0xb71b00>;
			irq-gpio = <0x28 0x2f 0x1>;
			interrupt-parent = <0x28>;
			interrupts = <0x2f 0x1>;
			reset-gpio = <0x28 0x3 0x0>;
			clock-sel-gpio = <0x40 0x1 0x0>;
			x-max = <0x2580>;
			y-max = <0x3c00>;
			z-max = <0xffff>;
			flip-x = <0x1>;
			flip-y = <0x1>;
			touch-num-max = <0xa>;
			platform-id = <0x1>;
aon_spi@c260000 {
		status = "disabled";
		compatible = "nvidia,tegra186-aon-spi";
		bus-number = <0x1>;
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		spi-max-frequency = <0xb71b00>;
		mboxes = <0x41 0x2>;
		linux,phandle = <0x191>;
		phandle = <0x191>;

Refer to this guide:
We try to add the following to spi1(place1) in the dtb and reflash. We find spidev1.0.
But if we add the following to aon_spi(place2) in the dtb and reflash. We can not find spi device.

spi@0 {
      compatible = "spidev";
      reg = <0x0>;
      spi-max-frequency = <0x1312D00>;
      nvidia,cs-setup-clk-count = <0x1e>;
      nvidia,cs-hold-clk-count = <0x1e>;
      nvidia,rx-clk-tap-delay = <0x1f>;
      nvidia,tx-clk-tap-delay = <0x0>;

So, my questions is: What is the difference between spi1 and aon_spi? They have the same address “c260000”.


Did you try modify the status = “disabled”; to okay

Hi ShaneCCC,

After modifying the status = “disabled” to “okay”, We can find spidev4.0.
Could you share some assigning SPI register’s tools(like i2ctools for i2c devices) or some use case about that?


You can get the spi_test from the linux gun sources

When I enabled the aon_spi,I got the aon-spi probe failed as fallow

[    1.013254] tegra-aon-spi aon_spi@c260000: can't get mailbox channel (-517)
[    1.013261] tegra-aon-spi aon_spi@c260000: tegra_aon_spi_driver_probe() FAILED

My dts config like this

aon_spi@c260000 {
        status = "okay";
        compatible = "nvidia,tegra186-aon-spi";
        bus-number = <0x00000001>;
        #address-cells = <0x00000001>;
        #size-cells = <0x00000000>;
        spi-max-frequency = <0x00b71b00>;
        mboxes = <0x0000002c 0x00000002>;
        linux,phandle = <0x000000fd>;
        phandle = <0x000000fd>;

My Board: Jetson TX2-NX
Soft version: L4T R32.5.1

Hi xl19862005,

Please help to open a new topic if it’s still an issue. Thanks

New topic at here