Firefly开源社区

12
发表新贴
打印 上一主题 下一主题

[Android] rk3566jd4 android11 ,为什么我的spi1 居然pinctrl中看到没使用cs脚其他3脚正常

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361

rk3566jd4 android11 ,为什么我的spi1 居然pinctrl中看到没使用cs脚其他3脚正常

发表于 2022-10-10 15:01:19      浏览:11663 | 回复:12        打印      只看该作者   [复制链接] 楼主
本帖最后由 zhu944567126 于 2022-10-10 15:07 编辑

我的疑问是:我使用spi1我觉得少一个 spi1m1_cs1_hs 这个参数把。 我看了spi2 spi3 都有cs0 cs1,为什么我的cs1没有。是官方的dts有问题?请教怎么解决


dtsi的配置


&pinctrl {
    spi0-hs {
        /omit-if-no-ref/
        spi0m0_pins_hs: spi0m0-pins {
            rockchip,pins =
                /* spi0_clkm0 */
                <0 RK_PB5 2 &pcfg_pull_up_drv_level_1>,
                /* spi0_misom0 */
                <0 RK_PC5 2 &pcfg_pull_up_drv_level_1>,
                /* spi0_mosim0 */
                <0 RK_PB6 2 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi0m0_cs0_hs: spi0m0-cs0 {
            rockchip,pins =
                /* spi0_cs0m0 */
                <0 RK_PC6 2 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi0m0_cs1_hs: spi0m0-cs1 {
            rockchip,pins =
                /* spi0_cs1m0 */
                <0 RK_PC4 2 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi0m1_pins_hs: spi0m1-pins {
            rockchip,pins =
                /* spi0_clkm1 */
                <2 RK_PD3 3 &pcfg_pull_up_drv_level_1>,
                /* spi0_misom1 */
                <2 RK_PD0 3 &pcfg_pull_up_drv_level_1>,
                /* spi0_mosim1 */
                <2 RK_PD1 3 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi0m1_cs0_hs: spi0m1-cs0 {
            rockchip,pins =
                /* spi0_cs0m1 */
                <2 RK_PD2 3 &pcfg_pull_up_drv_level_1>;
        };
    };

    spi1-hs {
        /omit-if-no-ref/
        spi1m0_pins_hs: spi1m0-pins {
            rockchip,pins =
                /* spi1_clkm0 */
                <2 RK_PB5 3 &pcfg_pull_up_drv_level_1>,
                /* spi1_misom0 */
                <2 RK_PB6 3 &pcfg_pull_up_drv_level_1>,
                /* spi1_mosim0 */
                <2 RK_PB7 4 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi1m0_cs0_hs: spi1m0-cs0 {
            rockchip,pins =
                /* spi1_cs0m0 */
                <2 RK_PC0 4 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi1m0_cs1_hs: spi1m0-cs1 {
            rockchip,pins =
                /* spi1_cs1m0 */
                <2 RK_PC6 3 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi1m1_pins_hs: spi1m1-pins {
            rockchip,pins =
                /* spi1_clkm1 */
                <3 RK_PC3 3 &pcfg_pull_up_drv_level_1>,
                /* spi1_misom1 */
                <3 RK_PC2 3 &pcfg_pull_up_drv_level_1>,
                /* spi1_mosim1 */
                <3 RK_PC1 3 &pcfg_pull_up_drv_level_1>;
        };

        /omit-if-no-ref/
        spi1m1_cs0_hs: spi1m1-cs0 {
            rockchip,pins =
                /* spi1_cs0m1 */
                <3 RK_PA1 3 &pcfg_pull_up_drv_level_1>;
        };
    };
}



&spi1 {        status = "ok";        //status = "disabled";        max-freq = <48000000>;        dev-port = <0>;        pinctrl-0 = <&spi1m1_pins>;        pinctrl-1 = <&spi1m1_pins_hs>;        //pinctrl-0 = <&spi1m1_pins_hs>;        //pinctrl-1 = <&spi1m1_pins>;        //spidev1@10 {         spidev1@10 {                 compatible = "rockchip,spidev1";                 reg = <0>;   //chip select  0:cs0  1:cs1                 spi-max-frequency = <10000000>;   //spi output clock         };};



打印

:/sys/class/gpio # cat /d/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins  
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (gpio0-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 1 (gpio0-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 2 (gpio0-2): 0-0020 (GPIO UNCLAIMED) function pmic group soc_slppin_gpio
pin 3 (gpio0-3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (gpio0-4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (gpio0-5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 6 (gpio0-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (gpio0-7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 8 (gpio0-8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 9 (gpio0-9): fdd40000.i2c (GPIO UNCLAIMED) function i2c0 group i2c0-xfer
pin 10 (gpio0-10): fdd40000.i2c (GPIO UNCLAIMED) function i2c0 group i2c0-xfer
pin 11 (gpio0-11): fe5a0000.i2c (GPIO UNCLAIMED) function i2c1 group i2c1-xfer
pin 12 (gpio0-12): fe5a0000.i2c (GPIO UNCLAIMED) function i2c1 group i2c1-xfer
pin 13 (gpio0-13): fe5b0000.i2c (GPIO UNCLAIMED) function i2c2 group i2c2m0-xfer
pin 14 (gpio0-14): fe5b0000.i2c (GPIO UNCLAIMED) function i2c2 group i2c2m0-xfer
pin 15 (gpio0-15): (MUX UNCLAIMED) gpio0:15
pin 16 (gpio0-16): fdd50000.serial (GPIO UNCLAIMED) function uart0 group uart0-xfer
pin 17 (gpio0-17): fdd50000.serial (GPIO UNCLAIMED) function uart0 group uart0-xfer
pin 18 (gpio0-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 19 (gpio0-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 20 (gpio0-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 21 (gpio0-21): (MUX UNCLAIMED) gpio0:21
pin 22 (gpio0-22): fe6e0030.pwm (GPIO UNCLAIMED) function pwm7 group pwm7-pins
pin 23 (gpio0-23): (MUX UNCLAIMED) gpio0:23
pin 24 (gpio0-24): fiq-debugger (GPIO UNCLAIMED) function uart2 group uart2m0-xfer
pin 25 (gpio0-25): fiq-debugger (GPIO UNCLAIMED) function uart2 group uart2m0-xfer
pin 26 (gpio0-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio0-27): vcc3v3-4g-regulator gpio0:27 function pcie group pcie-4g-drv
pin 28 (gpio0-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 29 (gpio0-29): (MUX UNCLAIMED) gpio0:29
pin 30 (gpio0-30): vcc-5v-regulator gpio0:30 function vcc_5v group vcc-5v-drv
pin 31 (gpio0-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 32 (gpio1-0): fe670000.serial (GPIO UNCLAIMED) function uart3 group uart3m0-xfer
pin 33 (gpio1-1): fe670000.serial (GPIO UNCLAIMED) function uart3 group uart3m0-xfer
pin 34 (gpio1-2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 35 (gpio1-3): fe410000.i2s (GPIO UNCLAIMED) function i2s1 group i2s1m0-sclktx
pin 36 (gpio1-4): rk817-codec gpio1:36 function pmic group spk_ctl_gpio
pin 37 (gpio1-5): fe410000.i2s (GPIO UNCLAIMED) function i2s1 group i2s1m0-lrcktx
pin 38 (gpio1-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 39 (gpio1-7): fe410000.i2s (GPIO UNCLAIMED) function i2s1 group i2s1m0-sdo0
pin 40 (gpio1-8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 41 (gpio1-9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 42 (gpio1-10): 3c0000000.pcie gpio1:42 function pcie group pcie-reset-gpio
pin 43 (gpio1-11): fe410000.i2s (GPIO UNCLAIMED) function i2s1 group i2s1m0-sdi0
pin 44 (gpio1-12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 45 (gpio1-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 46 (gpio1-14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 47 (gpio1-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 48 (gpio1-16): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 49 (gpio1-17): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 50 (gpio1-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 51 (gpio1-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 52 (gpio1-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 53 (gpio1-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 54 (gpio1-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 55 (gpio1-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 56 (gpio1-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 57 (gpio1-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 58 (gpio1-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 59 (gpio1-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 60 (gpio1-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 61 (gpio1-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 62 (gpio1-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 63 (gpio1-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 64 (gpio2-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 65 (gpio2-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 66 (gpio2-2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 67 (gpio2-3): fe2c0000.dwmmc (GPIO UNCLAIMED) function sdmmc1 group sdmmc1-bus4
pin 68 (gpio2-4): fe2c0000.dwmmc (GPIO UNCLAIMED) function sdmmc1 group sdmmc1-bus4
pin 69 (gpio2-5): fe2c0000.dwmmc (GPIO UNCLAIMED) function sdmmc1 group sdmmc1-bus4
pin 70 (gpio2-6): fe2c0000.dwmmc (GPIO UNCLAIMED) function sdmmc1 group sdmmc1-bus4
pin 71 (gpio2-7): fe2c0000.dwmmc (GPIO UNCLAIMED) function sdmmc1 group sdmmc1-cmd
pin 72 (gpio2-8): fe2c0000.dwmmc (GPIO UNCLAIMED) function sdmmc1 group sdmmc1-clk
pin 73 (gpio2-9): sdio-pwrseq gpio2:73 function sdio-pwrseq group wifi-enable-h
pin 74 (gpio2-10): wireless-wlan (GPIO UNCLAIMED) function wireless-wlan group wifi-host-wake-irq
pin 75 (gpio2-11): fe650000.serial (GPIO UNCLAIMED) function uart1 group uart1m0-xfer
pin 76 (gpio2-12): fe650000.serial (GPIO UNCLAIMED) function uart1 group uart1m0-xfer
pin 77 (gpio2-13): wireless-bluetooth gpio2:77 function uart1 group uart1m0-rtsn
pin 78 (gpio2-14): fe650000.serial (GPIO UNCLAIMED) function uart1 group uart1m0-ctsn
pin 79 (gpio2-15): wireless-bluetooth gpio2:79 function wireless-bluetooth group bt-poweren
pin 80 (gpio2-16): wireless-bluetooth gpio2:80 function wireless-bluetooth group bt-host-wake-gpio
pin 81 (gpio2-17): wireless-bluetooth gpio2:81 function wireless-bluetooth group bt-host-wake-irq
pin 82 (gpio2-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 83 (gpio2-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 84 (gpio2-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 85 (gpio2-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 86 (gpio2-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 87 (gpio2-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 88 (gpio2-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 89 (gpio2-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 90 (gpio2-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 91 (gpio2-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 92 (gpio2-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 93 (gpio2-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 94 (gpio2-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 95 (gpio2-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 96 (gpio3-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 97 (gpio3-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 98 (gpio3-2): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rgmii-bus
pin 99 (gpio3-3): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rgmii-bus
pin 100 (gpio3-4): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rgmii-bus
pin 101 (gpio3-5): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rgmii-bus
pin 102 (gpio3-6): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rgmii-clk
pin 103 (gpio3-7): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rgmii-clk
pin 104 (gpio3-8): vcc-hub-reset-regulator gpio3:104 function usb group vcc-hub-reset-en
pin 105 (gpio3-9): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rx-bus2
pin 106 (gpio3-10): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rx-bus2
pin 107 (gpio3-11): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-rx-bus2
pin 108 (gpio3-12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 109 (gpio3-13): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-tx-bus2
pin 110 (gpio3-14): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-tx-bus2
pin 111 (gpio3-15): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-tx-bus2
pin 112 (gpio3-16): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-clkinout
pin 113 (gpio3-17): fe620000.spi (GPIO UNCLAIMED) function spi1 group spi1m1-pins
pin 114 (gpio3-18): fe620000.spi (GPIO UNCLAIMED) function spi1 group spi1m1-pins
pin 115 (gpio3-19): fe620000.spi (GPIO UNCLAIMED) function spi1 group spi1m1-pins
pin 116 (gpio3-20): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-miim
pin 117 (gpio3-21): fe010000.ethernet (GPIO UNCLAIMED) function gmac1 group gmac1m0-miim
pin 118 (gpio3-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 119 (gpio3-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 120 (gpio3-24): (MUX UNCLAIMED) gpio3:120
pin 121 (gpio3-25): vcc5v0-otg-regulator gpio3:121 function usb group vcc5v0-vbus-en
pin 122 (gpio3-26): vcc5v0-host-regulator gpio3:122 function usb group vcc5v0-host-en
pin 123 (gpio3-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 124 (gpio3-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 125 (gpio3-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 126 (gpio3-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 127 (gpio3-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 128 (gpio4-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 129 (gpio4-1): (MUX UNCLAIMED) gpio4:129
pin 130 (gpio4-2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 131 (gpio4-3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 132 (gpio4-4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 133 (gpio4-5): vcc5v0-usb30-regulator gpio4:133 function usb group vcc5v0-usb30-drv
pin 134 (gpio4-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 135 (gpio4-7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 136 (gpio4-8): leds gpio4:136 function leds group leds-gpio
pin 137 (gpio4-9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 138 (gpio4-10): fe5d0000.i2c (GPIO UNCLAIMED) function i2c4 group i2c4m0-xfer
pin 139 (gpio4-11): fe5d0000.i2c (GPIO UNCLAIMED) function i2c4 group i2c4m0-xfer
pin 140 (gpio4-12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 141 (gpio4-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 142 (gpio4-14): leds gpio4:142 function leds group leds-gpio
pin 143 (gpio4-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 144 (gpio4-16): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 145 (gpio4-17): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 146 (gpio4-18): fe640000.spi (GPIO UNCLAIMED) function spi3 group spi3m1-pins
pin 147 (gpio4-19): fe640000.spi (GPIO UNCLAIMED) function spi3 group spi3m1-pins
pin 148 (gpio4-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 149 (gpio4-21): fe640000.spi (GPIO UNCLAIMED) function spi3 group spi3m1-pins
pin 150 (gpio4-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 151 (gpio4-23): fe0a0000.hdmi (GPIO UNCLAIMED) function hdmitx group hdmitx-scl
pin 152 (gpio4-24): fe0a0000.hdmi (GPIO UNCLAIMED) function hdmitx group hdmitx-sda
pin 153 (gpio4-25): fe0a0000.hdmi (GPIO UNCLAIMED) function hdmitx group hdmitxm0-cec
pin 154 (gpio4-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 155 (gpio4-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 156 (gpio4-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 157 (gpio4-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 158 (gpio4-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 159 (gpio4-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)


驱动打印都是正常的
[    0.244857] ###zcp spi_init
[    0.245996] ###zcp ******spi.c******spi_drv_probe
[    0.246018] ###zcp ******spidev.c******spidev_probe
[    0.246894] ###zcp ******spi.c******spi_drv_probe
[    0.246920] ###zcp ******spidev.c******spidev_probe


回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2022-10-10 15:40:15        只看该作者  沙发
你要用spi做从机吗
回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-10 15:53:27        只看该作者  板凳
本帖最后由 zhu944567126 于 2022-10-10 16:12 编辑
zyk 发表于 2022-10-10 15:40
你要用spi做从机吗

rk3566 spi1做主机啊,
回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-10 16:12:26        只看该作者  地板
大神啊,指点下吧
回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2022-10-10 16:12:47        只看该作者  5#
一般在spi设备驱动中去申请cs作为普通gpio用,spi通信时将gpio拉高
回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-10 16:35:30        只看该作者  6#
zyk 发表于 2022-10-10 16:12
一般在spi设备驱动中去申请cs作为普通gpio用,spi通信时将gpio拉高

能说详细一点吗?   到底要那种设置效果:  比如平常cs低,当spi通信一次 先拉高,通信完成后cs又拉低吗?   或者cs一直拉高能正常工作吗
回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2022-10-10 16:47:02        只看该作者  7#
看应用场景。当你spi上挂多个设备时,需要多个gpio去拉从机的cs。驱动最好就是通信的时候拉高、通信完毕拉低
回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-10 17:46:46        只看该作者  8#
zyk 发表于 2022-10-10 16:47
看应用场景。当你spi上挂多个设备时,需要多个gpio去拉从机的cs。驱动最好就是通信的时候拉高、通信完毕拉 ...

我现在把cs当gpio控制正常控制电压,但是我的sck用示波器测量读flash没信号。 对了我使用pinctrl下面哪组是正常的。 我是用spi1 m1组。

pin 113 (gpio3-17): fe620000.spi (GPIO UNCLAIMED) function spi1 group spi1m1-pins
pin 114 (gpio3-18): fe620000.spi (GPIO UNCLAIMED) function spi1 group spi1m1-pins
pin 115 (gpio3-19): fe620000.spi (GPIO UNCLAIMED) function spi1 group spi1m1-pins


pin 113 (gpio3-17): fe620000.spi (GPIO UNCLAIMED) function spi1-hs group spi1m1-pins
pin 114 (gpio3-18): fe620000.spi (GPIO UNCLAIMED) function spi1-hs group spi1m1-pins
pin 115 (gpio3-19): fe620000.spi (GPIO UNCLAIMED) function spi1-hs group spi1m1-pins
回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2022-10-11 10:37:52        只看该作者  9#
看设备吧,不用hs试一下。flash是什么型号,供电各方面是否正常,现在是怎么驱动
回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-12 09:31:15        只看该作者  10#
本帖最后由 zhu944567126 于 2022-10-12 09:32 编辑

我试过不用hs 也是不行啊,flash型号BY25Q32ASSIG.   flash电路是正常的,因为我们另外一个同样底板,fpga工程师是可以正常操作flash。
回复

使用道具 举报

返回列表
12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表