使用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";
};
};