Tool/software:
Hi,
I am trying to use two devices on mcspi0 with the following device tree overlay:
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2024 Benchmark Electronics B.V. * Author: Bas Vermeulen <bas.vermeulen@bench.com> */ /dts-v1/; /plugin/; #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include "k3-pinctrl.h" &main_pmx0 { main_spi0_pins_default: main-spi0-pins-default { pinctrl-single,pins = < AM62AX_IOPAD(0x1b4, PIN_OUTPUT, 0) /* (D16) SPI0_CS0 */ AM62AX_IOPAD(0x1b8, PIN_OUTPUT, 0) /* (C16) SPI0_CS1 */ AM62AX_IOPAD(0x1bc, PIN_INPUT, 0) /* (A17) SPI0_CLK */ AM62AX_IOPAD(0x1c0, PIN_INPUT, 0) /* (B15) SPI0_D0 MISO */ AM62AX_IOPAD(0x1c4, PIN_OUTPUT, 0) /* (E15) SPI0_D1 MOSI */ >; }; }; &mcu_pmx0 { bmi088_accel_pins_default: bmi088-accel-pins-default { pinctrl-single,pins = < AM62AX_MCU_IOPAD(0x030, PIN_INPUT, 7) /* (C8) MCU_GPIO0_11 INT1 */ >; }; bmi088_gyro_pins_default: bmi088-gyro-pins-default { pinctrl-single,pins = < AM62AX_MCU_IOPAD(0x02c, PIN_INPUT, 7) /* (C10) MCU_GPIO0_12 INT2 */ >; }; }; &main_spi0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&main_spi0_pins_default>, <&bmi088_accel_pins_default>, <&bmi088_gyro_pins_default>; bmi088-accel@0 { compatible = "bosch,bmi088-accel"; reg = <0>; spi-max-frequency = <10000000>; interrupt-parent = <&mcu_gpio0>; interrupts = <11 IRQ_TYPE_EDGE_RISING>; interrupt-names = "INT1"; }; bmi088-gyro@1 { compatible = "bosch,bmi088_gyro"; reg = <1>; interrupt-parent = <&mcu_gpio0>; interrupts = <12 IRQ_TYPE_EDGE_RISING>; interrupt-names = "INT2"; }; };
When I load the device tree overlay, the overlay is active, but the mcspi device (20100000.spi) gets deferred. The only path where this could happen is when the probe function in omap4-mcspi.c can't find the DMAs.
I don't need DMA, but it won't hurt if it's enabled and used.
My questions:
- How do I enable the mcspi0 in linux without DMA?
- If I can't, what DMA channels should I be using for mcspi0 with two chip-selects? I'd like to know how to determine the values to put in the device tree so I can do it myself next time.
Regards,
Bas Vermeulen