Re: [sophgo/linux] SPI transfer timed out when there's more than two cs pin (Issue #3)
Chen Wang <[email protected]>
| Newsgroups | dev.linux.lists.sophgo |
|---|---|
| Message-ID | <MAUPR01MB110725231A38B713C7F3C3FE5FE3FA@MAUPR01MB11072.INDPRD01.PROD.OUTLOOK.COM> |
Adding sophgo maillist.
Who can do help and have a look?
On 8/24/2025 4:08 AM, sodo wrote:
> *djdisodo* created an issue (sophgo/linux#3)
> <https://github.com/sophgo/linux/issues/3>
> |[ 43.260734] spidev spi0.1: SPI transfer timed out [ 43.260768]
> spi_master spi0: failed to transfer one message from queue [
> 43.260779] spi_master spi0: noqueue transfer failed |
>
> here's my dts
>
> pin configuration:
>
> |spi2_cfg: spi2-cfg { spi2-pins { pinmux = <PINMUX(PIN_SD1_CLK, 1)>,
> /* SPI2_SCK */ <PINMUX(PIN_SD1_CMD, 1)>, /* SPI2_MOSI (SDO) */
> <PINMUX(PIN_SD1_D0, 1)>; /* SPI2_MISO (SDI) */ bias-pull-up;
> drive-strength-microamp = <10800>; power-source = <3300>; };
> spi2-cs-pins { pinmux = <PINMUX(PIN_SD0_PWR_EN, 3)>,
> <PINMUX(PIN_SPK_EN, 3)>; bias-pull-up; drive-strength-microamp =
> <10800>; power-source = <3300>; }; }; |
>
> spidev configuration:
>
> |&spi2 { status = "okay"; pinctrl-0 = <&spi2_cfg>; pinctrl-names =
> "default"; num-cs = <2>; cs-gpios = <&porta 14 GPIO_ACTIVE_LOW>,
> <&porta 15 GPIO_ACTIVE_LOW>; //dmas = <&dmac 0>, <&dmac 1>;
> //dma-names = "tx", "rx"; spidev0: spidev@0 { status = "okay";
> compatible = "rohm,dh2228fv"; reg = <0>; #address-cells = <1>;
> #size-cells = <0>; spi-max-frequency = <400000000>; }; spidev1:
> spidev@1 { status = "okay"; compatible = "rohm,dh2228fv"; reg = <1>;
> #address-cells = <1>; #size-cells = <0>; spi-max-frequency =
> <400000000>; }; }; |
>
> this has been reported by @timstableford
> <https://github.com/timstableford> before
> https://community.milkv.io/t/spi2-multiple-cs-gpios/2042
> (although i'm unsure he was using upstream kernel source at this point)
>
> he links similar issue on rpi linux kernel which happens to use same
> spi driver, suggesting to apply patch on the issue
> raspberrypi/linux#6159 <https://github.com/raspberrypi/linux/issues/6159>
>
> |curl
> https://github.com/raspberrypi/linux/commit/12534b0b57ed1d78a1dd2ae47f4c111cfbf0a493.patch
> | git am|
>
> after patching and building, i had no issue using two device with spi
>
> hope this patch gets merged upstream
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/sophgo/linux/issues/3>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAS4RBPGVJOD2OQ7Z3YJ2L33PDC3LAVCNFSM6AAAAACEUQXTT2VHI2DSMVQWIX3LMV43ASLTON2WKOZTGM2DQNZVGAZTOOI>.
> You are receiving this because you are subscribed to this
> thread.Message ID: <sophgo/linux/issues/[email protected]>
>