S
steve.xu 发布的帖子
-
回复: T113-S3 使用GPIO模拟SPI
@whycan SPI 模拟的,实际测试了一下,clk能到180K左右,主要是用来控制ADC采集,速度达不到,需要2M左右的spi速率
-
T113-S3 使用GPIO模拟SPI
使用GPIO模拟SPI接口,Linux 5.4. 按照linux的binding教程配置,但是在系统的/dev目录找不到驱动
spi_gpio{ compatible = "spi-gpio"; ranges; pinctrl-0 = <&spi_gpio_pins>; pinctrl-names = "default"; status = "okay"; #address-cells = <0x1>; #size-cells = <0x0>; sck-gpios = <&pio PD 16 GPIO_ACTIVE_LOW>; miso-gpios = <&pio PD 17 GPIO_ACTIVE_LOW>; mosi-gpios = <&pio PD 18 GPIO_ACTIVE_LOW>; cs-gpios = <&pio PD 19 GPIO_ACTIVE_LOW>; num-chipselects = <1>; wavegen@0 { compatible = "rohm,dh2228fv"; spi-max-frequency = <500000>; spi-rx-bus-width = <1>; spi-tx-bus-width = <1>; bits-per-word = <8>; reg = <0>; status = "okay"; }; };