reference
https://community.onion.io/topic/3046/spi-add-devices-gpio-cs-shared-miso-mosi
全志系列,主线 kernel
想要多两个个 SPI,不知道通过增加 CS 是否容易实现,内核是否有 spinlock 机制
离线
离线
https://whycan.cn/t_4774.html#p48764
&pio {
spi0_cs_pins: spi0_cs_pins {
pins = "PC3", "PH6";
function = "gpio_out";
};
};
&spi0 {
status ="okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
cs-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>, <&pio 7 6 GPIO_ACTIVE_HIGH>;
mx25l25635e:mx25l25635e@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
};
panel@0 {
compatible = "sitronix,st7789v";
reg = <1>;
reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>;//PC4
dc-gpios = <&pio 2 7 GPIO_ACTIVE_LOW>;//PC7
/*backlight = <&pwm_bl>;*/
led-gpios = <&pio 7 0 GPIO_ACTIVE_LOW>;//PH0
spi-max-frequency = <50000000>;
spi-cpol;
spi-cpha;
buswidth = <8>;
rotate = <270>;
rgb;
fps = <30>;
debug = <1>;
};
亲测可用。
离线
你试过全志V3S的SPI扩展吗?手册上SPI部分说有4个SPI片选脚,但是引脚复用部分只有一个SPI片选脚
离线
@哇酷小二
这个是设备树吧,适用于哪些linux版本呢?这个方法V3S也可以用吗?
离线