Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    D1-H 使能spi0和spi1的问题

    MR Series
    4
    11
    3520
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lbuque LV 4 last edited by

      板卡: Lichee 86 Panel
      OS: Tina

      问题:

      spi0和spi1均无法枚举到设备节点

      d94e03a7-d485-42ff-bc7e-4bf3586b842d-image.png

      对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
      

      7aaacd94-51f5-4f86-be0c-8c32b92356bf-image.png

      1b337507-9b9f-4279-818d-c9a4a27016a7-image.png

      whycan 1 Reply Last reply Reply Quote Share 0
      • whycan
        whycan晕哥 LV 9 @lbuque last edited by

        @lbuque
        驱动要配置SPI 导出User Interface。

        A 1 Reply Last reply Reply Quote Share 0
        • A
          a892755772 LV 5 last edited by

          有解决吗 我也碰到这个问题

          1 Reply Last reply Reply Quote Share 0
          • A
            a892755772 LV 5 @whycan last edited by

            @whycan 能说的详细点吗 我也碰到这个问题 SPI在/dev上显示不出来

            whycan 1 Reply Last reply Reply Quote Share 0
            • whycan
              whycan晕哥 LV 9 @a892755772 last edited by

              @a892755772
              板级目录下config-5.4 文件使能 CONFIG_SPI_DEV

              上面是盲打的,或许有误。

              A 1 Reply Last reply Reply Quote Share 0
              • A
                a892755772 LV 5 @whycan last edited by

                @whycan 感谢你的回复 你说的可能是CONFIG_SPI_SPIDEV 可是我已经设置了 但是不行。您能再看下吗
                649a5489-1ecf-4356-8728-caeca83a3e49-image.png

                ce5f8ebd-c24b-40cc-80f4-3bd4fb23c2bb-image.png

                whycan 1 Reply Last reply Reply Quote Share 0
                • whycan
                  whycan晕哥 LV 9 @a892755772 last edited by

                  @a892755772

                  board.dts 也需要配置一下喔。

                  A 1 Reply Last reply Reply Quote Share 0
                  • A
                    a892755772 LV 5 @whycan last edited by

                    @whycan 也按照文档配置了

                    a692a332-3beb-45bf-9796-16e89564463a-image.png

                    eddf5ff3-2d53-4b71-8897-74d5d2908bb0-image.png

                    whycan 1 Reply Last reply Reply Quote Share 0
                    • whycan
                      whycan晕哥 LV 9 @a892755772 last edited by

                      @a892755772

                      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>;
                          };
                      };
                      
                      A 1 Reply Last reply Reply Quote Share 0
                      • A
                        a892755772 LV 5 @whycan last edited by

                        @whycan 感谢你的回复 我已经找到原因了
                        查看了 这个文件 out/t113/evb1_auto/longan/.sunxi.dts 我发现其实没有配置好
                        配置有两个地方需要改

                        K 1 Reply Last reply Reply Quote Share 0
                        • K
                          kaifan LV 2 @a892755772 last edited by

                          所以楼主最后怎么解决的,我也遇到了这个问题

                          1 Reply Last reply Reply Quote Share 0
                          • 1 / 1
                          • First post
                            Last post

                          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                          行为准则 | 用户协议 | 隐私权政策