From 235d246fa10a9637d59d8cc27107137ee2b005db Mon Sep 17 00:00:00 2001 From: simple <991605149@qq.com> Date: Sat, 24 Dec 2022 16:44:07 +0800 Subject: [PATCH] Fix nanopct4 rt5651 sound&clean wireless,bluetooth&add general-add-panel-simple-dsi.patch (#4608) * Fix nanopct4 rt5651 sound&clean wireless,bluetoorh * add panel-simple-dsi.patch --- .../00220-linux-90103-nanopc-t4-5651.patch | 57 +- .../00355-general-add-panel-simple-dsi.patch | 790 ++++++++++++++++++ 2 files changed, 792 insertions(+), 55 deletions(-) create mode 100644 patch/kernel/media-edge/00355-general-add-panel-simple-dsi.patch diff --git a/patch/kernel/media-edge/00220-linux-90103-nanopc-t4-5651.patch b/patch/kernel/media-edge/00220-linux-90103-nanopc-t4-5651.patch index bbeec9b192..aa5c72a44c 100644 --- a/patch/kernel/media-edge/00220-linux-90103-nanopc-t4-5651.patch +++ b/patch/kernel/media-edge/00220-linux-90103-nanopc-t4-5651.patch @@ -58,38 +58,6 @@ }; }; -@@ -190,6 +234,31 @@ - reset-deassert-us = <30000>; - reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - }; -+ }; -+ -+ wireless-wlan { -+ compatible = "wlan-platdata"; -+ rockchip,grf = <&grf>; -+ wifi_chip_type = "ap6359sa"; -+ sdio_vref = <1800>; -+ WIFI,host_wake_irq = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+ }; -+ -+ wireless-bluetooth { -+ compatible = "bluetooth-platdata"; -+ clocks = <&rk808 1>; -+ clock-names = "ext_clock"; -+ uart_rts_gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>; -+ pinctrl-names = "default", "rts_gpio"; -+ pinctrl-0 = <&uart0_rts>; -+ pinctrl-1 = <&uart0_gpios>; -+ // wifi-bt-power-toggle; -+ // BT,power_gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; -+ BT,reset_gpio = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; -+ BT,wake_gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; -+ BT,wake_host_irq = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; -+ status = "okay"; - }; - }; - @@ -453,10 +522,19 @@ }; @@ -105,8 +73,8 @@ + reg = <0x1a>; + clocks = <&cru SCLK_I2S_8CH_OUT>; + clock-names = "mclk"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_8ch_mclk>; ++ //pinctrl-names = "default"; ++ //pinctrl-0 = <&i2s_8ch_mclk>; + }; }; @@ -187,26 +155,6 @@ pmic { cpu_b_sleep: cpu-b-sleep { rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; -@@ -581,6 +713,19 @@ - - sdmmc0_pwr_h: sdmmc0-pwr-h { - rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ wireless-wlan { -+ wifi_pwr: wifi-pwr { -+ rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ wireless-bluetooth { -+ uart0_gpios: uart0-gpios { -+ rockchip,pins = -+ <2 RK_PC3 1 &pcfg_pull_up>; - }; - }; - }; @@ -747,11 +892,3 @@ &vopb_mmu { status = "okay"; @@ -219,4 +167,3 @@ -&vopl_mmu { - status = "okay"; -}; - diff --git a/patch/kernel/media-edge/00355-general-add-panel-simple-dsi.patch b/patch/kernel/media-edge/00355-general-add-panel-simple-dsi.patch new file mode 100644 index 0000000000..fcead1cb97 --- /dev/null +++ b/patch/kernel/media-edge/00355-general-add-panel-simple-dsi.patch @@ -0,0 +1,790 @@ +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index 42a7ab542..822999710 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -8,6 +8,7 @@ obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_NL6) += panel-boe-tv101wum-nl6.o + obj-$(CONFIG_DRM_PANEL_DSI_CM) += panel-dsi-cm.o + obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o + obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o ++obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple-dsi.o + obj-$(CONFIG_DRM_PANEL_EDP) += panel-edp.o + obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o + obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o +diff --git a/drivers/gpu/drm/panel/panel-simple-dsi.c b/drivers/gpu/drm/panel/panel-simple-dsi.c +new file mode 100644 +index 000000000..906d40ebe +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-simple-dsi.c +@@ -0,0 +1,772 @@ ++/* ++ * Copyright (C) 2021 ++ * This simple dsi driver porting from rock-chip panel-simple.c on linux-4.4 ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include