This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3357: Linux Device tree, only first 4 SPI1 childs works.

Part Number: AM3357
Other Parts Discussed in Thread: DAC104S085, SYSBIOS

Hello.

I'm trying to develop devicetree for custom AM3357 based board.

I've encountered strange problem, any device driver declared as 5th child of SPI1, is not able to communicate over SPI. 

I can see that CS is driven as usually, but no CLOCK, no MOSI activity at all.

I have checked that if I change order of cs-gpios and modify reg accordingly, this driver works great, and another, which is on 5th CS stops working and behaves as described.

I have attached part of my DTS, however this problem looks to be more general.

From my point of view, expected result is that I can declare as many child drivers as needed.

&am33xx_pinmux {
	pinctrl-names = "default";
	spi1_pins: pinmux_spi1_pins {
		
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x90c, PIN_INPUT | MUX_MODE2) /* (H17) gmii1_crs.spi1_d0 */
			AM33XX_IOPAD(0x910, PIN_INPUT | MUX_MODE2) /* (J15) gmii1_rxer.spi1_d1 */
			AM33XX_IOPAD(0x964, PIN_INPUT | MUX_MODE4) /* (C18) eCAP0_in_PWM0_out.spi1_sclk */

			AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE7) /* (D18) uart1_ctsn.gpio0[12] */
			AM33XX_IOPAD(0x97c, PIN_INPUT | MUX_MODE7) /* (D19) uart1_rtsn.gpio0[13] */
			AM33XX_IOPAD(0x8f4, PIN_INPUT | MUX_MODE7) /* (H18) mmc0_dat2.gpio2[27] */
			AM33XX_IOPAD(0x8f8, PIN_INPUT | MUX_MODE7) /* (H17) mmc0_dat1.gpio2[28] */
			AM33XX_IOPAD(0x8fc, PIN_INPUT | MUX_MODE7) /* (G18) mmc0_dat0.gpio2[29] */
		>;
	};
};

&spi1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&spi1_pins>;
	cs-gpios =  <&gpio0 12 GPIO_ACTIVE_LOW>,
				<&gpio0 13 GPIO_ACTIVE_LOW>,
				<&gpio2 27 GPIO_ACTIVE_LOW>,
				<&gpio2 29 GPIO_ACTIVE_LOW>,
				<&gpio2 28 GPIO_ACTIVE_LOW>;
	spi-max-frequency = <60000000>;
	slot1: gpio@0 {
		compatible = "microchip,mcp23s17";
		#gpio-cells = <2>;
		gpio-controller;
		reg = <0>;
		microchip,spi-present-mask = <0x01>;
		spi-max-frequency = <10000000>;
		#interrupt-cells = <2>;
	};
	slot2: adc@1 {
		compatible = "ti,ads7957";
		reg = <1>;
		#io-channel-cells = <1>;
		spi-max-frequency = <1000000>;
		vref-supply = <&vref_3v3>;
	};
	slot3: dac@2 {
		compatible = "ti,dac104s085";
		reg = <2>;
		spi-max-frequency = <10000000>;
		spi-cpol;
		vref-supply = <&vref_3v3>;
	};
	slot6: adc@3 {
		compatible = "ad7923";
		reg = <3>;
		spi-max-frequency = <1000000>;
		refin-supply = <&vref_3v3>;
		#address-cells = <1>;
		#size-cells = <0>;
		spi-cpha;
	};
	slot5: dac@4 {
		compatible = "ti,dac104s085";
		reg = <4>;
		spi-max-frequency = <10000000>;
		spi-cpol;
		vref-supply = <&vref_3v3>;
	};
};

  • Hello Grzegorz,

    What version of Linux are you running? Are you getting any error or warning outputs in the boot log?

    Regards,

    Nick

  • Hello Nick.

    Thank you for your support.

    Sorry to forgot mention about kernel version. This is kernel that comes from processor-sdk. 

    Linux version 4.19.94-rt39cmpc30_v8-ga242ccf3f1

    git://git.ti.com/processor-sdk/processor-sdk-linux.git
    BRANCH = "processor-sdk-linux-rt-4.19.y" SRCREV = "a242ccf3f13f03d41d521411ce2cc09775c873a2"

    Please find attached dmesg output.

    Greg.

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94-rt39cmpc30_v8-ga242ccf3f1 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 PREEMPT RT Tue Nov 10 20:26:26 UTC 2020
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: Trumpf CMPC30
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] cma: Reserved 48 MiB at 0x8c000000
    [    0.000000] On node 0 totalpages: 65536
    [    0.000000]   Normal zone: 576 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 65536 pages, LIFO batch:15
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] random: get_random_bytes called from start_kernel+0xa8/0x448 with crng_init=0
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/sda2 rootfstype=ext4 rootwait uio_pdrv_genirq.of_id=generic-uio
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 200476K/262144K available (6144K kernel code, 253K rwdata, 1688K rodata, 1024K init, 231K bss, 12516K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 254 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 232 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu: 	RCU priority boosting: priority 1 delay 500 ms.
    [    0.000000] 	No expedited grace period (rcu_normal_after_boot).
    [    0.000000] 	Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000040] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000049] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000280] timer_probe: no matching timers found
    [    0.000534] Console: colour dummy device 80x30
    [    0.000727] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000730] This ensures that you still see kernel messages. Please
    [    0.000733] update your kernel commandline.
    [    0.000784] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.058731] pid_max: default: 32768 minimum: 301
    [    0.059024] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.059039] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.060342] CPU: Testing write buffer coherency: ok
    [    0.060424] CPU0: Spectre v2: using BPIALL workaround
    [    0.061745] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.062152] rcu: Hierarchical SRCU implementation.
    [    0.065177] devtmpfs: initialized
    [    0.078740] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.079485] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.079523] futex hash table entries: 256 (order: 1, 8192 bytes)
    [    0.084504] pinctrl core: initialized pinctrl subsystem
    [    0.086362] NET: Registered protocol family 16
    [    0.090843] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.121663] l4_wkup_cm:clk:0010:0: failed to disable
    [    0.197275] gpio gpiochip0: (gpio-0-31): added GPIO chardev (254:0)
    [    0.197439] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio-0-31)
    [    0.197832] OMAP GPIO hardware version 0.1
    [    0.199341] gpio gpiochip1: (gpio-32-63): added GPIO chardev (254:1)
    [    0.199498] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio-32-63)
    [    0.200668] gpio gpiochip2: Persistence not supported for GPIO 18
    [    0.200692] GPIO line 82 (FET_nOE) hogged as output/low
    [    0.201006] gpio gpiochip2: (gpio-64-95): added GPIO chardev (254:2)
    [    0.201148] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio-64-95)
    [    0.202675] gpio gpiochip3: (gpio-96-127): added GPIO chardev (254:3)
    [    0.202803] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio-96-127)
    [    0.213653] No ATAGs?
    [    0.213669] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.232116] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.232727] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-vref[0]'
    [    0.234763] SCSI subsystem initialized
    [    0.235140] usbcore: registered new interface driver usbfs
    [    0.235235] usbcore: registered new interface driver hub
    [    0.235419] usbcore: registered new device driver usb
    [    0.236186] pps_core: LinuxPPS API ver. 1 registered
    [    0.236203] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.236827] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.237658] FPGA manager framework
    [    0.239789] clocksource: Switched to clocksource timer1
    [    0.253004] NET: Registered protocol family 2
    [    0.254295] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 7168 bytes)
    [    0.254359] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.254418] TCP bind hash table entries: 2048 (order: 3, 49152 bytes)
    [    0.254554] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.254732] UDP hash table entries: 256 (order: 2, 16384 bytes)
    [    0.254790] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
    [    0.255113] NET: Registered protocol family 1
    [    0.256165] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.258188] Initialise system trusted keyrings
    [    0.258642] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [    0.267684] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.271331] Key type asymmetric registered
    [    0.271359] Asymmetric key parser 'x509' registered
    [    0.271476] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
    [    0.271495] io scheduler noop registered
    [    0.271507] io scheduler deadline registered
    [    0.271910] io scheduler cfq registered (default)
    [    0.271930] io scheduler mq-deadline registered
    [    0.271942] io scheduler kyber registered
    [    0.274957] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    0.282356] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.287325] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    0.849323] console [ttyS0] enabled
    [    0.854237] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
    [    0.865768] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    0.870058] random: fast init done
    [    0.870430] random: crng init done
    [    0.883367] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@48030000[0]' - status (0)
    [    0.883410] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@48030000[1]' - status (0)
    [    0.883439] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@48030000[2]' - status (0)
    [    0.885272] m25p80 spi0.0: s25fl128s (16384 Kbytes)
    [    0.890266] 4 fixed-partitions partitions found on MTD device spi0.0
    [    0.896653] Creating 4 MTD partitions on "spi0.0":
    [    0.901485] 0x000000000000-0x000000020000 : "u-boot-spl"
    [    0.908457] 0x000000020000-0x000000120000 : "u-boot"
    [    0.914798] 0x000000120000-0x000000130000 : "u-boot-env"
    [    0.921460] 0x000000130000-0x000000790000 : "emergency-boot"
    [    0.929649] m25p80 spi0.1: n25q00 (131072 Kbytes)
    [    0.934440] 2 fixed-partitions partitions found on MTD device spi0.1
    [    0.940834] Creating 2 MTD partitions on "spi0.1":
    [    0.945661] 0x000000000000-0x000000200000 : "test_part0"
    [    0.952477] 0x000000200000-0x000000400000 : "test_part1"
    [    0.960627] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[0]' - status (0)
    [    0.960664] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[1]' - status (0)
    [    0.960696] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[2]' - status (0)
    [    0.960725] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[3]' - status (0)
    [    0.960756] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[4]' - status (0)
    [    0.963452] mdio_bus fixed-0: GPIO lookup for consumer reset
    [    0.963467] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.963479] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.963521] libphy: Fixed MDIO Bus: probed
    [    0.971174] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    0.977749] ehci-platform: EHCI generic platform driver
    [    0.983348] usbcore: registered new interface driver usb-storage
    [    0.991949] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [    0.991968] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [    0.992007] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.992030] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.992046] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [    0.992059] am335x-phy-driver 47401300.usb-phy: No GPIO consumer reset found
    [    0.992071] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [    0.992080] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [    0.992101] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.992122] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.992132] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [    0.992143] am335x-phy-driver 47401300.usb-phy: No GPIO consumer vbus-detect found
    [    0.992284] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
    [    1.002415] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0
    [    1.014409] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [    1.014428] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [    1.014468] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.014491] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.014506] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [    1.014518] am335x-phy-driver 47401b00.usb-phy: No GPIO consumer reset found
    [    1.014530] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [    1.014538] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [    1.014559] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.014580] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.014590] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [    1.014600] am335x-phy-driver 47401b00.usb-phy: No GPIO consumer vbus-detect found
    [    1.014727] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    1.024873] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0
    [    1.047219] altera-ps-spi spi0.2: GPIO lookup for consumer nconfig
    [    1.047238] altera-ps-spi spi0.2: using device tree for GPIO lookup
    [    1.047300] of_get_named_gpiod_flags: parsed 'nconfig-gpios' property of node '/ocp/spi@48030000/fpgamgr0@2[0]' - status (0)
    [    1.047333] gpio gpiochip2: Persistence not supported for GPIO 19
    [    1.047352] altera-ps-spi spi0.2: GPIO lookup for consumer nstat
    [    1.047362] altera-ps-spi spi0.2: using device tree for GPIO lookup
    [    1.047395] of_get_named_gpiod_flags: parsed 'nstat-gpios' property of node '/ocp/spi@48030000/fpgamgr0@2[0]' - status (0)
    [    1.047410] gpio gpiochip2: Persistence not supported for GPIO 20
    [    1.047424] altera-ps-spi spi0.2: GPIO lookup for consumer confd
    [    1.047432] altera-ps-spi spi0.2: using device tree for GPIO lookup
    [    1.047464] of_get_named_gpiod_flags: parsed 'confd-gpios' property of node '/ocp/spi@48030000/fpgamgr0@2[0]' - status (0)
    [    1.047479] gpio gpiochip2: Persistence not supported for GPIO 21
    [    1.047685] fpga_manager fpga0: altera-ps-spi spi0.2 registered
    [    1.055544] NET: Registered protocol family 10
    [    1.061999] Segment Routing with IPv6
    [    1.065822] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.072960] NET: Registered protocol family 17
    [    1.077739] Key type dns_resolver registered
    [    1.082290] omap_voltage_late_init: Voltage driver support not added
    [    1.090110] Loading compiled-in X.509 certificates
    [    1.111330] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.116540] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.122828] gpiochip_find_base: found new base at 511
    [    1.123305] gpio gpiochip4: (omap-gpmc): added GPIO chardev (254:4)
    [    1.123448] gpiochip_setup_dev: registered GPIOs 511 to 511 on device: gpiochip4 (omap-gpmc)
    [    1.124022] gpmc cs0 before gpmc_cs_program_settings:
    [    1.129116] cs0 GPMC_CS_CONFIG1: 0x00000000
    [    1.133326] cs0 GPMC_CS_CONFIG2: 0x00101001
    [    1.137531] cs0 GPMC_CS_CONFIG3: 0x22060514
    [    1.141738] cs0 GPMC_CS_CONFIG4: 0x10057016
    [    1.145942] cs0 GPMC_CS_CONFIG5: 0x010f1111
    [    1.150148] cs0 GPMC_CS_CONFIG6: 0x8f070000
    [    1.154350] gpmc cs0 access configuration:
    [    1.158467] gpmc,mux-add-data = <0>;
    [    1.162061] gpmc,device-width = <1>;
    [    1.165655] gpmc,wait-pin = <0>;
    [    1.168898] gpmc,burst-length = <4>;
    [    1.172497] gpmc cs0 timings configuration:
    [    1.176711] gpmc,cs-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.182491] gpmc,cs-rd-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.189054] gpmc,cs-wr-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.195619] gpmc,adv-on-ns = <40>; /* 31 ns - 40 ns; 4 ticks */
    [    1.201576] gpmc,adv-rd-off-ns = <50>; /* 41 ns - 50 ns; 5 ticks */
    [    1.207877] gpmc,adv-wr-off-ns = <60>; /* 51 ns - 60 ns; 6 ticks */
    [    1.214180] gpmc,adv-aad-mux-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.220746] gpmc,adv-aad-mux-rd-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.227745] gpmc,adv-aad-mux-wr-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.234746] gpmc,oe-on-ns = <60>; /* 51 ns - 60 ns; 6 ticks */
    [    1.240614] gpmc,oe-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.246916] gpmc,oe-aad-mux-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.253392] gpmc,oe-aad-mux-off-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.260045] gpmc,we-on-ns = <50>; /* 41 ns - 50 ns; 5 ticks */
    [    1.265910] gpmc,we-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.272213] gpmc,rd-cycle-ns = <170>; /* 161 ns - 170 ns; 17 ticks */
    [    1.278688] gpmc,wr-cycle-ns = <170>; /* 161 ns - 170 ns; 17 ticks */
    [    1.285165] gpmc,access-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.291470] gpmc,page-burst-access-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.298293] gpmc,bus-turnaround-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.304683] gpmc,cycle2cycle-delay-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.311336] gpmc,wait-monitoring-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.317811] gpmc,clk-activation-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.324202] gpmc,wr-data-mux-bus-ns = <70>; /* 61 ns - 70 ns; 7 ticks */
    [    1.330944] gpmc,wr-access-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.337515] GPMC CS0: cs_on            :   0 ticks,   0 ns (was   1 ticks)   0 ns
    [    1.345041] GPMC CS0: cs_rd_off        :  16 ticks, 160 ns (was  16 ticks) 160 ns
    [    1.352568] GPMC CS0: cs_wr_off        :  16 ticks, 160 ns (was  16 ticks) 160 ns
    [    1.360094] GPMC CS0: adv_on           :   1 ticks,  10 ns (was   4 ticks)  10 ns
    [    1.367616] GPMC CS0: adv_rd_off       :   2 ticks,  20 ns (was   5 ticks)  20 ns
    [    1.375141] GPMC CS0: adv_wr_off       :   2 ticks,  20 ns (was   6 ticks)  20 ns
    [    1.382667] GPMC CS0: adv_aad_mux_on   :   0 ticks,   0 ns (was   1 ticks)   0 ns
    [    1.390192] GPMC CS0: adv_aad_mux_rd_off:   0 ticks,   0 ns (was   2 ticks)   0 ns
    [    1.397800] GPMC CS0: adv_aad_mux_wr_off:   0 ticks,   0 ns (was   2 ticks)   0 ns
    [    1.405412] GPMC CS0: oe_on            :   3 ticks,  30 ns (was   6 ticks)  30 ns
    [    1.412938] GPMC CS0: oe_off           :  15 ticks, 150 ns (was  16 ticks) 150 ns
    [    1.420464] GPMC CS0: oe_aad_mux_on    :   0 ticks,   0 ns (was   1 ticks)   0 ns
    [    1.427986] GPMC CS0: oe_aad_mux_off   :   0 ticks,   0 ns (was   3 ticks)   0 ns
    [    1.435510] GPMC CS0: we_on            :   3 ticks,  30 ns (was   5 ticks)  30 ns
    [    1.443037] GPMC CS0: we_off           :  15 ticks, 150 ns (was  16 ticks) 150 ns
    [    1.450562] GPMC CS0: rd_cycle         :  16 ticks, 160 ns (was  17 ticks) 160 ns
    [    1.458086] GPMC CS0: wr_cycle         :  16 ticks, 160 ns (was  17 ticks) 160 ns
    [    1.465612] GPMC CS0: access           :  13 ticks, 130 ns (was  15 ticks) 130 ns
    [    1.473139] GPMC CS0: page_burst_access:   1 ticks,  10 ns (was   1 ticks)  10 ns
    [    1.480664] GPMC CS0: bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
    [    1.488187] GPMC CS0: cycle2cycle_delay:  10 ticks, 100 ns (was   0 ticks) 100 ns
    [    1.495712] GPMC CS0: wr_data_mux_bus  :   3 ticks,  30 ns (was   7 ticks)  30 ns
    [    1.503237] GPMC CS0: wr_access        :   0 ticks,   0 ns (was  15 ticks)   0 ns
    [    1.510764] GPMC CS0: wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
    [    1.518285] GPMC CS0: clk_activation   :   0 ticks,   0 ns (was   0 ticks)   0 ns
    [    1.525807] GPMC CS0 CLK period is 10 ns (div 1)
    [    1.530453] gpmc cs0 after gpmc_cs_set_timings:
    [    1.535006] cs0 GPMC_CS_CONFIG1: 0x00001200
    [    1.539208] cs0 GPMC_CS_CONFIG2: 0x00101000
    [    1.543413] cs0 GPMC_CS_CONFIG3: 0x00020201
    [    1.547618] cs0 GPMC_CS_CONFIG4: 0x0f030f03
    [    1.551824] cs0 GPMC_CS_CONFIG5: 0x010d1010
    [    1.556027] cs0 GPMC_CS_CONFIG6: 0x80030ac0
    [    1.560230] gpmc cs0 access configuration:
    [    1.564347] gpmc,mux-add-data = <2>;
    [    1.567939] gpmc,device-width = <2>;
    [    1.571533] gpmc,wait-pin = <0>;
    [    1.574778] gpmc,burst-length = <4>;
    [    1.578373] gpmc,cycle2cycle-samecsen = <1>;
    [    1.582664] gpmc,cycle2cycle-diffcsen = <1>;
    [    1.586954] gpmc cs0 timings configuration:
    [    1.591163] gpmc,cs-on-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.596765] gpmc,cs-rd-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.603330] gpmc,cs-wr-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.609896] gpmc,adv-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.615761] gpmc,adv-rd-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.622063] gpmc,adv-wr-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.628364] gpmc,adv-aad-mux-on-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.634754] gpmc,adv-aad-mux-rd-off-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.641494] gpmc,adv-aad-mux-wr-off-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.648229] gpmc,oe-on-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.654095] gpmc,oe-off-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.660399] gpmc,oe-aad-mux-on-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.666698] gpmc,oe-aad-mux-off-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.673087] gpmc,we-on-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.678953] gpmc,we-off-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.685255] gpmc,rd-cycle-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.691734] gpmc,wr-cycle-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.698208] gpmc,access-ns = <130>; /* 121 ns - 130 ns; 13 ticks */
    [    1.704511] gpmc,page-burst-access-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.711338] gpmc,bus-turnaround-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.717727] gpmc,cycle2cycle-delay-ns = <100>; /* 91 ns - 100 ns; 10 ticks */
    [    1.724902] gpmc,wait-monitoring-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.731381] gpmc,clk-activation-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.737769] gpmc,wr-data-mux-bus-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.744507] gpmc,wr-access-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.780243] bq32k 0-0068: Oscillator Failure. Check RTC battery.
    [    1.786681] rtc rtc0: read_time: fail to read: -22
    [    1.787052] rtc rtc0: bq32k: dev (253:0)
    [    1.787090] bq32k 0-0068: rtc core: registered bq32k as rtc0
    [    1.793404] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.803660] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    1.809071] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    1.816882] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
    [    1.825200] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.832466] usb usb1: Product: MUSB HDRC host driver
    [    1.837460] usb usb1: Manufacturer: Linux 4.19.94-rt39cmpc30_v8-ga242ccf3f1 musb-hcd
    [    1.845245] usb usb1: SerialNumber: musb-hdrc.0
    [    1.850801] hub 1-0:1.0: USB hub found
    [    1.854677] hub 1-0:1.0: 1 port detected
    [    1.864009] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    1.869423] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    1.877255] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
    [    1.885594] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.892861] usb usb2: Product: MUSB HDRC host driver
    [    1.897853] usb usb2: Manufacturer: Linux 4.19.94-rt39cmpc30_v8-ga242ccf3f1 musb-hcd
    [    1.905639] usb usb2: SerialNumber: musb-hdrc.1
    [    1.911134] hub 2-0:1.0: USB hub found
    [    1.914978] hub 2-0:1.0: 1 port detected
    [    1.920674] rtc rtc0: read_time: fail to read: -22
    [    1.920697] bq32k 0-0068: hctosys: unable to read the hardware clock
    [    1.928969] Waiting for root device /dev/sda2...
    [    2.359949] usb 2-1: new high-speed USB device number 2 using musb-hdrc
    [    2.541347] usb 2-1: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
    [    2.549577] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    2.556755] usb 2-1: Product: DataTraveler 3.0
    [    2.561229] usb 2-1: Manufacturer: Kingston
    [    2.565437] usb 2-1: SerialNumber: B06EBF0AB34CE3606000212F
    [    2.572084] usb-storage 2-1:1.0: USB Mass Storage device detected
    [    2.579038] scsi host0: usb-storage 2-1:1.0
    [    3.601284] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [    3.610993] sd 0:0:0:0: [sda] 60506112 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [    3.620585] sd 0:0:0:0: [sda] Write Protect is off
    [    3.625433] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 00
    [    3.625993] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [    3.876541]  sda: sda1 sda2 sda3
    [    3.884739] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [    3.892596] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
    [    3.899530] EXT4-fs (sda2): write access will be enabled during recovery
    [    4.002857] EXT4-fs (sda2): recovery complete
    [    4.026676] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
    [    4.034501] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
    [    4.042745] devtmpfs: mounted
    [    4.048324] Freeing unused kernel memory: 1024K
    [    4.053384] Run /sbin/init as init process
    [    4.539467] EXT4-fs (sda3): recovery complete
    [    4.544060] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
    [    4.745018] udevd[93]: starting version 3.2.8
    [    4.841234] udevd[94]: starting eudev-3.2.8
    [    5.056773] fpga_clock: loading out-of-tree module taints kernel.
    [    5.075845] cmpc30_fpga fpga_clock: firmware file: CMPC30_fpga_fw.rbf
    [    5.089589] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led0[0]' - status (0)
    [    5.089634] gpio gpiochip3: Persistence not supported for GPIO 18
    [    5.089641] no flags found for gpios
    [    5.110744] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led1[0]' - status (0)
    [    5.110787] gpio gpiochip2: Persistence not supported for GPIO 22
    [    5.110792] no flags found for gpios
    [    5.111070] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led2[0]' - status (0)
    [    5.111090] gpio gpiochip2: Persistence not supported for GPIO 23
    [    5.111095] no flags found for gpios
    [    5.111267] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led3[0]' - status (0)
    [    5.111285] gpio gpiochip2: Persistence not supported for GPIO 24
    [    5.111289] no flags found for gpios
    [    5.111451] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led4[0]' - status (0)
    [    5.111468] gpio gpiochip2: Persistence not supported for GPIO 25
    [    5.111473] no flags found for gpios
    [    5.128270] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    5.149115] fpga_manager fpga0: writing CMPC30_fpga_fw.rbf to altera-ps-spi spi0.2
    [    5.172189] gpiochip_find_base: found new base at 495
    [    5.192984] at24 0-0050: GPIO lookup for consumer wp
    [    5.192998] at24 0-0050: using device tree for GPIO lookup
    [    5.193065] of_get_named_gpiod_flags: parsed 'wp-gpios' property of node '/ocp/i2c@44e0b000/eeprom@50[0]' - status (0)
    [    5.193099] gpio gpiochip2: Persistence not supported for GPIO 26
    [    5.196106] gpio gpiochip5: (mcp23s17.0): added GPIO chardev (254:5)
    [    5.196321] gpiochip_setup_dev: registered GPIOs 495 to 510 on device: gpiochip5 (mcp23s17.0)
    [    5.201589] gpiochip_find_base: found new base at 479
    [    5.207150] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [    5.211242] gpio gpiochip6: (mcp23017): added GPIO chardev (254:6)
    [    5.211493] gpiochip_setup_dev: registered GPIOs 479 to 494 on device: gpiochip6 (mcp23017)
    [    5.230309] gpiochip_find_base: found new base at 463
    [    5.232031] gpio gpiochip7: (pcf8575): added GPIO chardev (254:7)
    [    5.232271] gpiochip_setup_dev: registered GPIOs 463 to 478 on device: gpiochip7 (pcf8575)
    [    5.232288] pcf857x 0-0021: probed
    [    6.009762] ti-dac082s085 spi1.2: Linked as a consumer to regulator.1
    [    6.066269] ads7950 spi1.1: Linked as a consumer to regulator.1
    [    6.089426] ad7923 spi1.3: Linked as a consumer to regulator.1
    [    6.095892] ti-dac082s085 spi1.4: Linked as a consumer to regulator.1
    [    6.102193] CAN device driver interface
    [    6.187413] c_can_platform 481d0000.can: c_can_platform device registered (regs=c5166075, irq=34)
    [    6.213145] ti-dac082s085 spi1.4: TXS timed out
    [    6.213169] ti-dac082s085 spi1.4: SPI transfer failed: -5
    [    6.214284] spi_master spi1: failed to transfer one message from queue
    [    6.214301] ti-dac082s085 spi1.4: failed to initialize outputs to 0
    [    6.214447] ti-dac082s085 spi1.4: Dropping the link to regulator.1
    [    6.214575] ti-dac082s085: probe of spi1.4 failed with error -5
    [    6.520767] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    6.595102] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    6.662429] omap-aes 53500000.aes: will run requests pump with realtime priority
    [    6.675686] remoteproc remoteproc0: wkup_m3 is available
    [    6.786497] remoteproc remoteproc0: powering up wkup_m3
    [    6.813290] mdio_bus 4a332400.mdio: GPIO lookup for consumer reset
    [    6.813306] mdio_bus 4a332400.mdio: using device tree for GPIO lookup
    [    6.813367] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[0]' - status (0)
    [    6.813400] gpio gpiochip2: Persistence not supported for GPIO 5
    [    6.813427] mdio_bus 4a332400.mdio: GPIO lookup for consumer reset
    [    6.813435] mdio_bus 4a332400.mdio: using device tree for GPIO lookup
    [    6.813472] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[1]' - status (0)
    [    6.813563] gpio gpiochip1: Persistence not supported for GPIO 31
    [    6.813585] mdio_bus 4a332400.mdio: GPIO lookup for consumer reset
    [    6.813593] mdio_bus 4a332400.mdio: using device tree for GPIO lookup
    [    6.813621] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[2]'
    [    6.813643] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[2]'
    [    6.813655] mdio_bus 4a332400.mdio: using lookup tables for GPIO lookup
    [    6.813666] mdio_bus 4a332400.mdio: No GPIO consumer reset found
    [    6.870015] davinci_mdio 4a332400.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    6.877746] libphy: 4a332400.mdio: probed
    [    6.899414] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 243456
    [    6.901058] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [    6.902215] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [    7.576221] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400/ethernet-phy@1[0]'
    [    7.721730] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400/ethernet-phy@2[0]'
    [    7.722244] davinci_mdio 4a332400.mdio: phy[1]: device 4a332400.mdio:01, driver TI TLK10X 10/100 Mbps PHY
    [    7.767770] davinci_mdio 4a332400.mdio: phy[2]: device 4a332400.mdio:02, driver TI TLK10X 10/100 Mbps PHY
    [    7.835097] remoteproc remoteproc1: 4a334000.pru is available
    [    7.880949] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
    [    7.920758] remoteproc remoteproc2: 4a338000.pru is available
    [    7.926689] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
    [    8.250992] prueth pruss_eth: pruss_fw_drop_untagged_vlan 0
    [    8.256632] prueth pruss_eth: pruss MC Mask (Port 0) ff:ff:ff:ff:ff:ff
    [    8.273869] prueth pruss_eth: pruss MC Mask (Port 1) ff:ff:ff:ff:ff:ff
    [    8.293288] prueth pruss_eth: TI PRU ethernet (type 0) driver initialized
    [    9.498177] i2c /dev entries driver
    [    9.604621] EXT4-fs (sda2): re-mounted. Opts: (null)
    [    9.782787] rtc rtc0: read_time: fail to read: -22
    [   10.513678] iep ptp bc clkid -1
    [   10.517012] remoteproc remoteproc1: powering up 4a334000.pru
    [   10.526031] remoteproc remoteproc1: Booting fw image ti-pruss/am335x-pru0-prueth-fw.elf, size 7796
    [   10.535389] pruss 4a300000.pruss: configured system_events[63-0] = 00000600,04500000
    [   10.543243] pruss 4a300000.pruss: configured intr_channels = 0x000000d5 host_intr = 0x00000155
    [   10.551931] remoteproc remoteproc1: remote processor 4a334000.pru is now up
    [   10.559440] net eth0: started
    [   10.562717] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   12.640900] prueth pruss_eth eth0: Link is Up - 100Mbps/Full - flow control off
    [   12.648390] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   14.017336] remoteproc remoteproc2: powering up 4a338000.pru
    [   14.025793] remoteproc remoteproc2: Booting fw image ti-pruss/am335x-pru1-prueth-fw.elf, size 7712
    [   14.035113] pruss 4a300000.pruss: configured system_events[63-0] = 00600000,08a00000
    [   14.042939] pruss 4a300000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa
    [   14.051630] remoteproc remoteproc2: remote processor 4a338000.pru is now up
    [   14.059116] net eth1: started
    [   14.062399] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [   16.160840] prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
    [   16.168305] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
    

  • Edited 11/16/2020

    Hello Greg,

    Thanks for attaching. You are running into a limitation in the McSPI hardware in the AM335x. Reference the Technical Reference Manual (TRM) chapter on Multichannel Serial Prot Interface (McSPI), section "Introduction": each McSPI module "can interface with up to four slave external devices".

    One option would be to move some of the slave devices onto the other AM335x SPI. I am not a DAC expert, but perhaps another option would be to daisy chain the two dac104s085 devices? Feel free to create a separate thread for the DAC team if you need help with that.

    Thread Use of GPIO pins as Chip select for SPI claims that each SPI slave needs a separate chip select, but I am not sure whether that is correct. I am reassigning this to a hardware engineer to comment.  After taking another look at your device tree, I see you are already using GPIOs as your chip select. This will be the last TI response unless you reply back with more questions.

    Regards,

    Nick

  • Hello Nick.

    Thank you for your support.

    I'm aware of 4 HW context of MCSPI.

    It's just kind of decision if we want to use those context and speedup some operations.  

    This hardware is our existing product but working under Sysbios control, and we have a hw options up-to 7 devices connected SPI1. It's not a problem to communicate with them, we just don't use SPI HW contexts. For each communication we reload SPI settings, and use single context.

  • So is it possible to support more than 4 devices on SPI bus on Kernel driver ? or not ?

    I assumed there is different working mode that can support more devices, as, as I already mentioned, it is definitely possible to support more devices.

  • Hello Greg,

    Let me take a couple of days to look at whether the Linux kernel driver has an option to do what you have observed in SYSBIOS. Feel free to ping me next week if I have not replied by then.

    Regards,

    Nick

  • Hello Nick

    Do you see any light in the tunnel?

    Best Regards

    Greg.

  • Hello Greg,

    Thanks for the ping.

    I did not see anything in the Linux driver that indicated support for single context SPI, where you just reload SPI settings every time you communicate with a SPI device. Last week I asked the development team for comment just in case, but I have not heard anything back yet. Just pinged them again.

    Regards,

    Nick

  • Hello Greg,

    The developer finally replied:

    As Greg mentioned, it is possible to use more that 4 GPIO based CS from HW point of view. 
    But McSPI Linux driver does not support this configuration. It uses different
    contexts for each chip-select/slave irrespective of where CS line is
    controlled via GPIO or McSPI IP.
    
    Supporting this config would need extensive changes throughout the
    driver. One would need to adjust code wherever spi->chip_select is used
    to use an index of 0 in case of GPIO CS in order for them to use same CS
    context with all slaves.

    So TI does NOT support single context SPI in our Linux driver.

    Regards,

    Nick

  • Hello Nick.

    Thank you for your support and clarification.

    Best regards

    Greg