D1-H 使能spi0和spi1的问题
-
板卡: Lichee 86 Panel
OS: Tina问题:
spi0和spi1均无法枚举到设备节点
对dts修改如下:
project device/config/chips/d1-h/ diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts index 963aa17..199cb62 100755 --- a/configs/nezha/linux-5.4/board.dts +++ b/configs/nezha/linux-5.4/board.dts @@ -1065,7 +1065,7 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo spi_slave_mode = <0>; spi0_cs_number = <1>; spi0_cs_bitmap = <1>; - status = "disabled"; + status = "okay"; spi-nand@0 { compatible = "spi-nand"; @@ -1086,7 +1086,7 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo spi1_cs_number = <1>; spi1_cs_bitmap = <1>; spi_dbi_enable = <1>; - status = "disabled"; + status = "okay"; spi_board1@0 { device_type = "spi-dbi"; diff --git a/configs/nezha/linux-5.4/config-5.4 b/configs/nezha/linux-5.4/config-5.4 index 87ab49e..0837a61 100644 --- a/configs/nezha/linux-5.4/config-5.4 +++ b/configs/nezha/linux-5.4/config-5.4 @@ -1681,7 +1681,7 @@ CONFIG_I2C_SUNXI=y # CONFIG_I3C is not set CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_DEBUG=y CONFIG_SPI_MASTER=y # CONFIG_SPI_MEM is not set
-
@lbuque
驱动要配置SPI 导出User Interface。 -
有解决吗 我也碰到这个问题
-
@whycan 能说的详细点吗 我也碰到这个问题 SPI在/dev上显示不出来
-
@a892755772
板级目录下config-5.4 文件使能 CONFIG_SPI_DEV上面是盲打的,或许有误。
-
@whycan 感谢你的回复 你说的可能是CONFIG_SPI_SPIDEV 可是我已经设置了 但是不行。您能再看下吗
-
board.dts 也需要配置一下喔。
-
@whycan 也按照文档配置了
-
https://wiki.stmicroelectronics.cn/stm32mpu/wiki/How_to_use_SPI_from_Linux_userland_with_spidev
&spi4 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&spi4_pins_a>; pinctrl-1 = <&spi4_sleep_pins_a>; status = "okay"; spidev@0{ compatible = "spidev"; reg = <0>; spi-max-frequency = <4000000>; }; };
-
@whycan 感谢你的回复 我已经找到原因了
查看了 这个文件 out/t113/evb1_auto/longan/.sunxi.dts 我发现其实没有配置好
配置有两个地方需要改 -
所以楼主最后怎么解决的,我也遇到了这个问题
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号