Only spi nodes accepted in /soc/spi@40023000/

I'm running in to the issue mentioned in the tile; "Only spi nodes accepted in /soc/spi@40023000/". I'm using nRF connect and built a driver for the TI ADS1291 analog front end but I'm facing this error and I'm unable to find any documentation. I've compared it as much as possible with the ADXL372 example but the in and outputs seem the same to me.

I added a ti,ads1291.yaml file at dts/bindings/ and added "set(DTS_ROOT dts)" to CMakeLists.txt with the following contents:

# A high level description of the device the binding applies to:
description: |
   This is the TI ADS1291

# Used to match nodes to this binding as discussed above:
compatible: "ti,ads1291"

include: spi-device.yaml

properties:
    int1-gpios:
      type: phandle-array
      required: false
      description: |
        The INT1 signal defaults to active low as produced by the
        sensor.  The property value should ensure the flags properly
        describe the signal that is presented to the driver.
s

I also added the ADS1291 by means of an overlay to the nrf52dk_nrf52832 devicetree:

&spi2 {
	cs-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
	ads1291@0 {
		compatible = "ti,ads1291";
		reg = <0>;
		spi-max-frequency = <2000000>;
		label = "ADS1291";
		int1-gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
	};
};

I enabled my custom driver from prj.conf: 

CONFIG_ADS1291=y

The build system seems to pick up the config correctly:

 *   61  /soc/spi@40023000
 *   62  /soc/spi@40023000/ads1291@0
I've also attached a logic analyser to the GPIO pins don't see any SPI data. I do see SPI data when I flash the ADXL372 example.
I must have missed a config step somewhere, can anyone please help in pointing out what I missed?
Thanks
Parents
  • Hello!

    Can you show me how the spi2 node looks in your devicetree (in the build/zephyr/zephyr.dts file) when you have compiled the ADXL372 and the ADS1291 projects?

    If there is a difference it might help you spot what you have missed.

    On my end it looks like this in the ADXL372 project:

    spi2: arduino_spi: spi@40023000 {
    	#address-cells = < 0x1 >;
    	#size-cells = < 0x0 >;
    	reg = < 0x40023000 0x1000 >;
    	interrupts = < 0x23 0x1 >;
    	status = "okay";
    	label = "SPI_2";
    	compatible = "nordic,nrf-spi";
    	sck-pin = < 0x19 >;
    	mosi-pin = < 0x17 >;
    	miso-pin = < 0x18 >;
    	cs-gpios = < &gpio0 0x16 0x1 >;
    	adxl372@0 {
    		compatible = "adi,adxl372";
    		reg = < 0x0 >;
    		spi-max-frequency = < 0x7a1200 >;
    		label = "ADXL372";
    		int1-gpios = < &gpio0 0xb 0x0 >;
    	};
    };

    Best regards,

    Einar

Reply
  • Hello!

    Can you show me how the spi2 node looks in your devicetree (in the build/zephyr/zephyr.dts file) when you have compiled the ADXL372 and the ADS1291 projects?

    If there is a difference it might help you spot what you have missed.

    On my end it looks like this in the ADXL372 project:

    spi2: arduino_spi: spi@40023000 {
    	#address-cells = < 0x1 >;
    	#size-cells = < 0x0 >;
    	reg = < 0x40023000 0x1000 >;
    	interrupts = < 0x23 0x1 >;
    	status = "okay";
    	label = "SPI_2";
    	compatible = "nordic,nrf-spi";
    	sck-pin = < 0x19 >;
    	mosi-pin = < 0x17 >;
    	miso-pin = < 0x18 >;
    	cs-gpios = < &gpio0 0x16 0x1 >;
    	adxl372@0 {
    		compatible = "adi,adxl372";
    		reg = < 0x0 >;
    		spi-max-frequency = < 0x7a1200 >;
    		label = "ADXL372";
    		int1-gpios = < &gpio0 0xb 0x0 >;
    	};
    };

    Best regards,

    Einar

Children
  • Hi, thanks for looking in to this.

    For my custom project it looks like this:

    		spi2: arduino_spi: spi@40023000 {
    			#address-cells = < 0x1 >;
    			#size-cells = < 0x0 >;
    			reg = < 0x40023000 0x1000 >;
    			interrupts = < 0x23 0x1 >;
    			status = "okay";
    			label = "SPI_2";
    			compatible = "nordic,nrf-spi";
    			sck-pin = < 0x19 >;
    			mosi-pin = < 0x17 >;
    			miso-pin = < 0x18 >;
    			cs-gpios = < &gpio0 0x4 0x1 >;
    			ads1291@0 {
    				compatible = "ti,ads1291";
    				reg = < 0x0 >;
    				spi-max-frequency = < 0x1e8480 >;
    				label = "ADS1291";
    				int1-gpios = < &gpio0 0x1f 0x1 >;
    			};
    		};

    The example looks similar to yours but some of the gpios are different. 

    		spi2: arduino_spi: spi@40023000 {
    			#address-cells = < 0x1 >;
    			#size-cells = < 0x0 >;
    			reg = < 0x40023000 0x1000 >;
    			interrupts = < 0x23 0x1 >;
    			status = "okay";
    			label = "SPI_2";
    			compatible = "nordic,nrf-spi";
    			sck-pin = < 0x19 >;
    			mosi-pin = < 0x17 >;
    			miso-pin = < 0x18 >;
    			cs-gpios = < &gpio0 0x16 0x1 >;
    			adxl372@0 {
    				compatible = "adi,adxl372";
    				reg = < 0x0 >;
    				spi-max-frequency = < 0x7a1200 >;
    				label = "ADXL372";
    				int1-gpios = < &gpio0 0xb 0x0 >;
    			};
    		};

    I don't see any significant differences between my custom one and the example..

  • Hello again,

    This issue seems to be very similar to your problem:

    https://devzone.nordicsemi.com/f/nordic-q-a/81697/only-spi-nodes-accepted-in-soc-peripheral-50000000-spi-b000-soc-peripheral-50000000-spi-b000-ads129xr-0

    maybe looking over his config could help you?

    Also, I assume your code compiles properly, and the error message appears similarly as in this other issue?

    Best regards,

    Einar

  • Hi,

    I'm aware of the ticket. I've tried restarting VSCode and my laptop multiple times but no success. The main difference between their code and mine is they specifiy "on-bus: spi" in their yaml but this is not neccesary since it is included in spi-device.yaml (also tested this doesn't fix my issue). 

    Also, the order of their CMakeList is a bit different which I've tried copying but no success. 

    You're right; my code compiles fine but gives an error in VSCode. Also, I've tried measuring the physical signals but I don't see anything.

  • Hm, that is strange.

    Since your code is compiling but the behavior isn't as expected, the first thing I would do is double check the contents of the prj.conf file, maybe some module is missing there.

    Can you show me the content of the file?

    -Einar

  • Of course:

    CONFIG_SPI=y
    CONFIG_SERIAL=y
    CONFIG_MAIN_STACK_SIZE=2000
    CONFIG_PPI_TRACE=y
    CONFIG_THREAD_RUNTIME_STATS=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    CONFIG_PWM=y
    CONFIG_COUNTER=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_CBPRINTF_FP_SUPPORT=y
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DIS=y
    CONFIG_BT_DIS_MODEL="ABC"
    CONFIG_BT_DIS_MANUF="IDE Group"
    CONFIG_BT_DIS_PNP=n
    CONFIG_BT_BAS=y
    CONFIG_BT_DEBUG_LOG=y
    CONFIG_BT_SMP=y
    CONFIG_BT_DEVICE_NAME="ABC"
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_EMGS=y
    CONFIG_ADS1291=y
    CONFIG_ADS1291_ODR_2000HZ=y

Related