Updated DTS with keypad and display

This commit is contained in:
sieni 2026-01-31 20:28:45 +02:00
parent 113af14d39
commit ae4ee5b585
1 changed files with 93 additions and 8 deletions

View File

@ -12,6 +12,74 @@
/ {
model = "Luckfox Pico Plus";
compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1103";
backlight: backlight {
status = "okay";
compatible = "pwm-backlight";
pwms = <&pwm1 0 25000 0>;
brightness-levels = <0 51 53 56 62 75 101 152 255>;
default-brightness-level = <8>;
};
matrix-keypad {
status = "okay";
compatible = "gpio-matrix-keypad";
pinctrl-names = "default";
pinctrl-0 = <&keypad_pins>;
debounce-delay-ms = <5>;
col-scan-delay-us = <50>;
row-gpios = <&gpio3 RK_PA1 0
&gpio3 RK_PA3 0
&gpio3 RK_PA2 0
&gpio3 RK_PA4 0>;
col-gpios = <&gpio3 RK_PA5 0
&gpio3 RK_PA7 0
&gpio3 RK_PA6 0>;
linux,keymap = <
MATRIX_KEY(0,0,KEY_RIGHTALT)
MATRIX_KEY(1,0,KEY_1)
MATRIX_KEY(2,0,KEY_UP)
MATRIX_KEY(3,0,KEY_2)
MATRIX_KEY(0,1,KEY_SPACE)
MATRIX_KEY(1,1,KEY_LEFT)
MATRIX_KEY(2,1,KEY_DOWN)
MATRIX_KEY(3,1,KEY_RIGHT)
MATRIX_KEY(0,2,KEY_LEFTCTRL)
MATRIX_KEY(1,2,KEY_TAB)
MATRIX_KEY(2,2,KEY_ENTER)
MATRIX_KEY(3,2,KEY_ESC)
>;
};
acodec {
status = "okay";
};
};
&pwm0 {
pinctrl-0 = <&pwm0m1_pins>;
status = "okay";
};
&pinctrl {
keypad {
keypad_pins: keypad-pins {
rockchip,pins = <3 RK_PA1 0 &pcfg_pull_down>,
<3 RK_PA2 0 &pcfg_pull_down>,
<3 RK_PA3 0 &pcfg_pull_down>,
<3 RK_PA4 0 &pcfg_pull_down>,
<3 RK_PA5 0 &pcfg_pull_none>,
<3 RK_PA6 0 &pcfg_pull_none>,
<3 RK_PA7 0 &pcfg_pull_none>;
};
};
};
/**********SFC**********/
@ -28,7 +96,7 @@
/**********SDMMC**********/
&sdmmc {
max-frequency = <50000000>;
/*max-frequency = <50000000>;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
@ -42,8 +110,8 @@
supports-sdio;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
status = "okay";
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;*/
status = "disabled";
};
/**********ETH**********/
@ -60,15 +128,27 @@
/**********SPI**********/
/* SPI0_M0 */
&spi0 {
status = "disabled";
status = "okay";
pinctrl-0 = <&spi0m0_clk &spi0m0_mosi &spi0m0_cs0>;
spidev@0 {
status = "disabled";
spi-max-frequency = <50000000>;
};
fbtft@0 {
spi-max-frequency = <50000000>;
status = "okay";
compatible = "tenstar,robo28", "ilitek,ili9340";
spi-max-frequency = <32000000>;
rotation = <0>;
width = <320>;
height = <240>;
bgr;
backlight = <&backlight>;
dc-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;//DC
reset-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;//RES
};
};
/**********I2C**********/
/* I2C3_M1 */
&i2c3 {
@ -93,9 +173,14 @@
status = "disabled";
};
&uart5 {
status = "disabled";
/delete-property/ pinctrl-names;
/delete-property/ pinctrl-0;
};
/**********PWM**********/
/* PWM1_M0 */
&pwm1 {
status = "disabled";
};
status = "okay";
};