fix(luckfox-config):Resolving conflicts between RGB and other pin multiplexing

feat(luckfox-config):Support for touch screens and FBTFT
feat(luckfox-config):Support for Ubuntu system
feat(ubuntu):Support using local root filesystem for submodule updates
feat(ubuntu):Support for WiFi on Luckfox Pico Ultra W using the Ubuntu system
perf(ubuntu):Improve the initial boot speed of RV1103 using the Ubuntu system
perf(kernel_dts):Improve EMMC read/write speed

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2024-06-28 19:18:35 +08:00
committed by luckfox-eng33
parent 6cf97cc3f9
commit 955ff6aa57
73 changed files with 6130 additions and 2172 deletions

View File

@@ -315,11 +315,23 @@
pinctrl-0 = <&spi0m0_clk &spi0m0_miso &spi0m0_mosi &spi0m0_cs0>;
#address-cells = <1>;
#size-cells = <0>;
spidev@0 {
compatible = "rockchip,spidev";
spidev@0 {
compatible = "rockchip,spidev";
spi-max-frequency = <50000000>;
reg = <0>;
};
fbtft@0{
compatible = "sitronix,st7789v";
reg = <0>;
spi-max-frequency = <20000000>;
fps = <30>;
buswidth = <8>;
debug = <0x7>;
led-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;//BL
dc = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; //DC
reset = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>; //RES
};
};
// I2C
&i2c3 {

View File

@@ -12,6 +12,7 @@
/ {
model = "Luckfox Pico Plus";
compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1103";
};
};
/**********SFC**********/
@@ -58,6 +59,9 @@
spidev@0 {
spi-max-frequency = <50000000>;
};
fbtft@0 {
spi-max-frequency = <50000000>;
};
};
/**********I2C**********/
@@ -90,5 +94,3 @@
status = "disabled";
};

View File

@@ -46,6 +46,9 @@
spidev@0 {
spi-max-frequency = <50000000>;
};
fbtft@0 {
spi-max-frequency = <50000000>;
};
};
/**********I2C**********/

View File

@@ -299,10 +299,22 @@
#address-cells = <1>;
#size-cells = <0>;
spidev@0 {
compatible = "rockchip,spidev";
compatible = "rockchip,spidev";
spi-max-frequency = <50000000>;
reg = <0>;
};
fbtft@0{
compatible = "sitronix,st7789v";
reg = <0>;
spi-max-frequency = <20000000>;
fps = <30>;
buswidth = <8>;
debug = <0x7>;
led-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>;//BL
dc = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>; //DC
reset = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>; //RES
};
};
// I2C
&i2c0 {
@@ -318,7 +330,7 @@
};
// &i2c4 {
// pinctrl-0 = <&i2c4m0_xfer>;
// pinctrl-0 = <&i2c4m0_xfer>;
// };
// UART

View File

@@ -56,34 +56,28 @@
panel: panel {
compatible = "simple-panel";
backlight = <&backlight>;
reset-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_LOW>;
reset-delay-ms = <200>;
status = "okay";
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
width-mm = <85>;
height-mm = <85>;
reset {
reset-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_LOW>;
reset-delay-ms = <200>;
status = "okay";
};
enable {
enable-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
enable-delay-ms = <20>;
status = "okay";
};
display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <0>;
hactive = <0>;
vactive = <0>;
hback-porch = <0>;
hfront-porch = <0>;
vback-porch = <0>;
vfront-porch = <0>;
hsync-len = <0>;
vsync-len = <0>;
clock-frequency = <30000000>;
hactive = <720>;
vactive = <720>;
hback-porch = <44>;
hfront-porch = <46>;
vback-porch = <18>;
vfront-porch = <16>;
hsync-len = <2>;
vsync-len = <2>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
@@ -98,7 +92,8 @@
};
};
reserved-memory {
reserved_memory: reserved-memory {
status = "okay";
#address-cells = <1>;
#size-cells = <1>;
ranges;
@@ -107,10 +102,11 @@
reg = <0x0 0x0>;
};
linux,cma {
status = "okay";
compatible = "shared-dma-pool";
inactive;
reusable;
size = <0xA00000>;
size = <0xA00000>; //10M
linux,cma-default;
};
};
@@ -279,8 +275,8 @@
&i2c4 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c4m2_xfer>;
//pinctrl-names = "default";
//pinctrl-0 = <&i2c4m2_xfer>;
sc3336: sc3336@30 {
compatible = "smartsens,sc3336";
@@ -465,13 +461,27 @@
};
&route_rgb {
status = "okay";
status = "disabled";
};
&vop {
status = "okay";
};
&i2c3 {
clock-frequency = <100000>;
GT911:touchscreen {
compatible = "goodix,gt911";
reg = <0x14>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
};
};
/**************************** PINCTRL ******************************/
// SPI
&spi0 {
@@ -492,12 +502,12 @@
&i2c2 {
pinctrl-0 = <&i2c2m0_xfer>;
};
// &i2c3 {
// pinctrl-0 = <&i2c3m0_xfer &i2c3m1_xfer &i2c3m2_xfer>;
// };
// &i2c4 {
// pinctrl-0 = <&i2c4m0_xfer &i2c4m1_xfer &i2c4m2_xfer>;
// };
&i2c3 {
pinctrl-0 = <&i2c3m0_xfer &i2c3m1_xfer &i2c3m2_xfer &tp_rst &tp_irq>;
};
&i2c4 {
pinctrl-0 = <&i2c4m0_xfer &i2c4m1_xfer &i2c4m2_xfer>;
};
// UART
&uart0 {
@@ -507,7 +517,7 @@
pinctrl-0 = <&uart1m1_xfer>;
};
&uart3 {
pinctrl-0 = <&uart3m0_xfer>;
pinctrl-0 = <&uart3m0_xfer &uart3m1_xfer>;
};
&uart4 {
pinctrl-0 = <&uart4m0_xfer>;
@@ -566,4 +576,14 @@
rockchip,pins = <1 RK_PC0 4 &pcfg_pull_none>;
};
};
touchscreen {
tp_rst:tp-rst {
rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
};
tp_irq:tp-irq {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

View File

@@ -58,6 +58,9 @@
spidev@0 {
spi-max-frequency = <50000000>;
};
fbtft@0 {
spi-max-frequency = <50000000>;
};
};
/**********I2C**********/
@@ -89,5 +92,3 @@
&rtc {
status = "okay";
};

View File

@@ -28,6 +28,13 @@
/**********EMMC**********/
&emmc {
bus-width = <8>;
cap-mmc-highspeed;
non-removable;
// mmc-hs200-1_8v;
rockchip,default-sample-phase = <90>;
no-sdio;
no-sd;
memory-region-ecsd = <&mmc_ecsd>;
post-power-on-delay-ms = <0>;
status = "okay";
@@ -110,4 +117,3 @@
spi-max-frequency = <50000000>;
};
};

View File

@@ -27,6 +27,13 @@
/**********EMMC**********/
&emmc {
bus-width = <8>;
cap-mmc-highspeed;
non-removable;
// mmc-hs200-1_8v;
rockchip,default-sample-phase = <90>;
no-sdio;
no-sd;
memory-region-ecsd = <&mmc_ecsd>;
post-power-on-delay-ms = <0>;
status = "okay";

View File

@@ -144,10 +144,9 @@ CONFIG_KEYBOARD_ADC=y
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_GOODIX=m
CONFIG_TOUCHSCREEN_GOODIX=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
# CONFIG_SERIO is not set
# CONFIG_VT is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
@@ -212,6 +211,10 @@ CONFIG_ROCKCHIP_RGA_PROC_FS=y
CONFIG_ROCKCHIP_RVE=m
CONFIG_ROCKCHIP_RVE_PROC_FS=y
CONFIG_ROCKCHIP_DVBM=m
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=y
# CONFIG_SND_PCM_TIMER is not set
@@ -225,7 +228,6 @@ CONFIG_SND_SOC_ROCKCHIP=y
CONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y
CONFIG_SND_SOC_RV1106=y
CONFIG_SND_SIMPLE_CARD=y
# CONFIG_HID is not set
# CONFIG_USB_HID is not set
CONFIG_USB=y
CONFIG_USB_OTG=y

View File

@@ -10,7 +10,6 @@
* 2010 - 2012 Goodix Technology.
*/
#define DEBUG
#include <linux/kernel.h>
#include <linux/dmi.h>

View File

@@ -88,6 +88,8 @@
# define DPRINTK(fmt, args...)
#endif
#define CURSOR_ENABLE 0
#define SHOW_CENTER 1
/*
* FIXME: Locking
*
@@ -365,6 +367,7 @@ static int get_color(struct vc_data *vc, struct fb_info *info,
static void fb_flashcursor(struct work_struct *work)
{
#if CURSOR_ENABLE
struct fb_info *info = container_of(work, struct fb_info, queue);
struct fbcon_ops *ops = info->fbcon_par;
struct vc_data *vc = NULL;
@@ -395,6 +398,7 @@ static void fb_flashcursor(struct work_struct *work)
ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
get_color(vc, info, c, 0));
console_unlock();
#endif
}
static void cursor_timer_handler(struct timer_list *t)
@@ -599,6 +603,9 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
if (fb_get_color_depth(&info->var, &info->fix) == 1)
erase &= ~0x400;
logo_height = fb_prepare_logo(info, ops->rotate);
#if SHOW_CENTER
logo_height += (info->var.yres/2) - (logo_height/2);
#endif
logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height);
q = (unsigned short *) (vc->vc_origin +
vc->vc_size_row * rows);
@@ -1329,6 +1336,7 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
static void fbcon_cursor(struct vc_data *vc, int mode)
{
#if CURSOR_ENABLE
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct fbcon_ops *ops = info->fbcon_par;
int c = scr_readw((u16 *) vc->vc_pos);
@@ -1350,6 +1358,7 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
get_color(vc, info, c, 0));
#endif
}
static int scrollback_phys_max = 0;

View File

@@ -38,7 +38,7 @@
#include <asm/fb.h>
#define SHOW_CENTER 1
/*
* Frame buffer device initialization and setup routines
*/
@@ -520,6 +520,11 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
image.dy = y;
}
#if SHOW_CENTER
image.dx = (info->var.xres - logo->width) / 2;
image.dy = (info->var.yres - logo->height) / 2;
#endif
image.width = logo->width;
image.height = logo->height;

File diff suppressed because it is too large Load Diff