Part Number:TDA4VM
我需要在TDA4上使用主域的SPI0做MASTER,SPI3做SLAVE。计划采用spidev驱动,请问在设备树中该如何设置。
目前我已经可以识别到spidev节点,但是没有数据发出。其中interputs和clocks配置不确定如何配置,其他配置如下:
main_spi0_pins_default: main_spi0_pins_default {
pinctrl-single,pins = <
J721E_IOPAD(0x1c8, PIN_INPUT, 0) /* (AA1) SPI0_CLK */
J721E_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (AB5) SPI0_D0 */
J721E_IOPAD(0x1d0, PIN_INPUT, 0) /* (AA3) SPI0_D1 */
J721E_IOPAD(0x1c0, PIN_INPUT, 0) /* (AA2) SPI0_CS0 */
>;
};
main_spi3_pins_default: main_spi3_pins_default {
pinctrl-single,pins = <
J721E_IOPAD(0x144, PIN_OUTPUT, 4) /* (Y25) PRG0_PRU1_GPO17.SPI3_CLK */
J721E_IOPAD(0x148, PIN_OUTPUT, 4) /* (AA26) PRG0_PRU1_GPO18.SPI3_D0 */
J721E_IOPAD(0x14c, PIN_INPUT, 4) /* (AA29) PRG0_PRU1_GPO19.SPI3_D1 */
J721E_IOPAD(0x11c, PIN_OUTPUT, 4) /* (AA24) PRG0_PRU1_GPO7.SPI3_CS0 */
>;
};
&main_mcspi0 {
pinctrl-names = "default";
pinctrl-0 = <&main_spi0_pins_default>;
status="okay";
spidev@0 {
spi-max-frequency = <24000000>;
reg = <0>;
compatible = "linux,spidev";
};
};
&main_mcspi3 {
pinctrl-names = "default";
pinctrl-0 = <&main_spi3_pins_default>;
status="okay";
spidev@0 {
spi-max-frequency = <24000000>;
reg = <0>;
compatible = "linux,spidev";
};
};
main_mcspi0: spi@2100000{
compatible = "ti,am654-mcspi","ti,omap4-mcspi";
reg = <0x0 0x02100000 0x0 0x400>;
interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&k3_clks 274 1>;
power-domains = <&k3_pds 274 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
};
main_mcspi3: spi@2130000{
compatible = "ti,am654-mcspi","ti,omap4-mcspi";
reg = <0x0 0x02130000 0x0 0x400>;
interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&k3_clks 274 1>;
power-domains = <&k3_pds 274 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
};
Nancy Wang:
请先阅读以下帖子的说明看一下是否有帮助:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/947437/faq-ccs-tda4vm-how-to-use-spi-spi_dev-on-tda4-j721e
,
shuai jiang:
我这边需要配置SPI0做从,SPI3做主对应的clocks和interputs该如何描述不太确定。引脚配置那个我根据pinmux生成的
,
shuai jiang:
您发的链接里面是spi6的设置 spi0和spi3具体的对应关系中断树和时钟树的对应关系有些复杂 我不太确定
,
Nancy Wang:
更详细的内容,建议您到英文论坛发帖咨询,会有相关产品线的工程师给您提供帮助。