Closed breaktime1903 closed 3 years ago
这貌似要改DTS了
谁能帮我一下
@breaktime1903
sun8i-h3-spi-st7789v-led-always-on.dts
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&pio>;
__overlay__ {
st7789v_pins: st7789v_pins {
pins = "PG7", "PG6"; /*RESET, DC_RS*/
function = "gpio_out","gpio_out";
};
};
};
fragment@1 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
cs-gpios = <&pio 0 16 0>; /* PA16 */
st7789v: st7789v@0 {
compatible = "sitronix,st7789v";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&st7789v_pins>;
spi-max-frequency = <16000000>;
rotate = <270>;
bgr;
fps = <30>;
height = <240>;
width = <240>;
buswidth = <8>;
reset-gpios = <&pio 6 7 1>; /*RESET=PG7*/
dc-gpios = <&pio 6 6 0>; /*DC_RS=PG6*/
/*led-gpios = <&pio 2 4 0>; LED=PC4*/
debug = <0>;
init = <0x1000011
0x20000ff
0x100003A 0x55
0x10000C0 0x0C
0x1000021
0x1000029 >;
};
};
};
};
dtc -O dtb -o sun8i-h3-spi-st7789v-led-always-on.dtbo sun8i-h3-spi-st7789v-led-always-on.dts
find /lib/modules/$(uname -r)/kernel/drivers/ -iname "*st7789v*"
sudo nano /boot/armbianEnv.txt
overlays=spi-spidev
param_spidev_spi_bus=1
param_spidev_spi_cs=1
dmesg | grep spi
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
@breaktime1903
I am not sure how to do it.
Originally posted by @modi12jin in https://github.com/notro/fbtft/issues/567#issuecomment-774871435