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.

PROCESSOR-SDK-AM335X: McSPI questions

Part Number: PROCESSOR-SDK-AM335X

Hi, 

I'm working with a modified clone of the beagleboneblack using linux 4.19.3 taked from the TI SDK . We added a FRAM memory and a SPI display with touch screen. All the devices are connected to SPI1, the FRAM and the touch are using the standard CS and the display use GPIO 11 as chip select. I would like to add DMA support for the display. This is the dts declaration of my devices : but I don't know what edma number take and even if is this possible (use DMA with a non-standard CS) .

Thanks

Best Regards

&spi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
ti,spi-num-cs = <3>;
address-cells = <2>;
cs-gpios = <0>, <0>, <&gpio0 11 0>;
dmas = <&edma 42 0
&edma 43 0
&edma 44 0
&edma 44 0
&edma XX 0                                            <---- !!!!
&edma XX 0>;                                         <---- !!!!
dma-names = "tx0", "rx0", "tx1", "rx1", "tx2", "rx2";

flash: axes-fram@0 {
compatible = "axes-fram";
spi-max-frequency = <25000000>;
reg = <0>;
};

touch: axes-touch@1 {
compatible = "axes-touch";
spi-max-frequency = <1000000>;
spi-cpol;
spi-cpha;
reg = <1>;
};

display: axes-display@2 {
compatible = "axes-display";
spi-max-frequency = <15000000>;
spi-cpol;
spi-cpha;
reg = <2>;
};
};

&am33xx_pinmux {
spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
0x190 (PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_aclkx.spi1_sclk */
0x194 (PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_fsx.spi1_d0 */
0x198 (PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_axr0.spi1_d1 */
0x19c (PIN_OUTPUT | MUX_MODE3) /* mcasp0_ahclkr.spi1_cs0 */
0x164 (PIN_OUTPUT | MUX_MODE2) /* ecap0_in_pwm0_out.spi1_cs1 */
0x0DC (PIN_OUTPUT | MUX_MODE7) /* lcd_data15.gpio0_11 [spi1_cs2] */
0x0D0 (PIN_OUTPUT | MUX_MODE7) /* lcd_data12.gpio0_8 [lcd d/c] */
0x0CC (PIN_INPUT_PULLUP | MUX_MODE7) /* lcd_data11.gpio2_17 [touch irq] */
0x0D4 (PIN_INPUT_PULLUP | MUX_MODE7) /* lcd_data13.gpio0_9 [lcd detect] */
0x0CC (PIN_OUTPUT | MUX_MODE7) /* lcd_data10.gpio2_16 [lcd buzzer] */
>;
};
};

  • Hi Hanoi,

    Hanoi Santos Hung said:
    &spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    ti,spi-num-cs = <3>;
    address-cells = <2>;
    cs-gpios = <0>, <0>, <&gpio0 11 0>;
    dmas = <&edma 42 0
    &edma 43 0
    &edma 44 0
    &edma 44 0
    &edma XX 0                                            <---- !!!!
    &edma XX 0>;                                         <---- !!!!
    dma-names = "tx0", "rx0", "tx1", "rx1", "tx2", "rx2";

    These properties ("ti,spi-num-cs",  "dmas") are already defined in the am33xx.dtsi file, which you need to include in your main DTS file. Do not change these properties.

    linux-4.19.38/arch/arm/boot/dts/am33xx.dtsi

    See for example below DTS files:

    linux-4.19.38/arch/arm/boot/dts/am335x-boneblack-spi0.dtsi

    linux-4.19.38/arch/arm/boot/dts/am335x-cm-t335.dts

    linux-4.19.38/arch/arm/boot/dts/am335x-icev2-common.dtsi

    linux-4.19.38/arch/arm/boot/dts/am335x-icev2.dts

    linux-4.19.38/arch/arm/boot/dts/am335x-pdu001.dts


    Check also below txt file:

    linux-4.19.38/Documentation/devicetree/bindings/spi/omap-spi.txt

    For AM335x McSPI1 EDMA events numbers, you can refer to AM335x TRM section 11.3.19 EDMA Events

    Regards,
    Pavel