Merge branch 'master' of ssh://g.hz.netease.com:22222/IoT/PV2/SmartAudioPV2

This commit is contained in:
wangzijiao 2019-01-11 16:03:40 +08:00
commit 2634e42d2d
5 changed files with 94 additions and 34 deletions

View File

@ -41,13 +41,13 @@
#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/consumer.h>
/***************************PART1:ON/OFF define*******************************/ /***************************PART1:ON/OFF define*******************************/
#define GTP_CUSTOM_CFG 0 #define GTP_CUSTOM_CFG 1
#define GTP_CHANGE_X2Y 0 #define GTP_CHANGE_X2Y 0
#define GTP_DRIVER_SEND_CFG 1 #define GTP_DRIVER_SEND_CFG 1
#define GTP_HAVE_TOUCH_KEY 0 #define GTP_HAVE_TOUCH_KEY 0
#define GTP_ICS_SLOT_REPORT 0 #define GTP_ICS_SLOT_REPORT 0
#define GTP_AUTO_UPDATE 1 /* auto update fw by .bin file as default*/ #define GTP_AUTO_UPDATE 0
#define GTP_HEADER_FW_UPDATE 1 /* auto update fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UPDATE */ #define GTP_HEADER_FW_UPDATE 1 /* auto update fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UPDATE */
#define GTP_AUTO_UPDATE_CFG 0 /* auto update config by .cfg file, function together with GTP_AUTO_UPDATE*/ #define GTP_AUTO_UPDATE_CFG 0 /* auto update config by .cfg file, function together with GTP_AUTO_UPDATE*/
@ -59,9 +59,9 @@
#define GTP_WITH_PEN 0 #define GTP_WITH_PEN 0
#define GTP_PEN_HAVE_BUTTON 0 /* active pen has buttons, function together with GTP_WITH_PEN*/ #define GTP_PEN_HAVE_BUTTON 0 /* active pen has buttons, function together with GTP_WITH_PEN*/
#define GTP_DEBUG_ON 0 #define GTP_DEBUG_ON 1
#define GTP_DEBUG_ARRAY_ON 0 #define GTP_DEBUG_ARRAY_ON 1
#define GTP_DEBUG_FUNC_ON 0 #define GTP_DEBUG_FUNC_ON 1
#if GTP_COMPATIBLE_MODE #if GTP_COMPATIBLE_MODE
typedef enum { typedef enum {
@ -171,25 +171,25 @@ extern void gtp_set_io_int(void);
suozhi,1536*2048,gt9271,COF suozhi,1536*2048,gt9271,COF
************************************************************************************/ ************************************************************************************/
#define CTP_CFG_GROUP1 {\ #define CTP_CFG_GROUP1 {\
0x46,0x80,0x07,0xB0,0x04,0x0A,0x3D,0x00,0x01,0x0A,\ 0x44,0x0A,0x05,0xDA,0x02,0x05,0x7D,0x00,0x01,0x0B,\
0x1E,0x0F,0x50,0x3C,0x03,0x04,0x01,0x01,0x00,0x00,\ 0x23,0x0B,0x46,0x3C,0x03,0x05,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x1A,0x1C,0x1E,0x14,0x90,0x30,0xAA,\ 0x00,0x00,0x00,0x17,0x19,0x1F,0x14,0x87,0x28,0x0A,\
0x32,0x30,0x03,0x15,0x00,0x00,0x02,0x03,0x03,0x1D,\ 0x50,0x52,0xB5,0x06,0x00,0x00,0x00,0x98,0x03,0x11,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,\ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,\
0x00,0x27,0x3B,0x94,0xC5,0x02,0x08,0x00,0x00,0x04,\ 0x00,0x32,0x82,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,\
0x8C,0x28,0x00,0x85,0x2C,0x00,0x80,0x30,0x00,0x7B,\ 0xB5,0x37,0x00,0x99,0x42,0x00,0x7F,0x50,0x00,0x6A,\
0x34,0x00,0x77,0x38,0x00,0x77,0x00,0x00,0x00,0x00,\ 0x62,0x00,0x5A,0x76,0x00,0x5A,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x19,0x18,0x17,0x16,0x15,0x14,0x11,0x10,\ 0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,\
0x0F,0x0E,0x0D,0x0C,0x09,0x08,0x07,0x06,0x05,0x04,\ 0x12,0x14,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,\
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x02,0x04,0x06,0x07,0x08,0x0A,0x0C,\ 0x00,0x00,0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x1D,\
0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x2A,0x29,\ 0x26,0x24,0x22,0x21,0x20,0x1F,0x1E,0xFF,0xFF,0xFF,\
0x28,0x27,0x26,0x25,0x24,0x23,0x22,0x21,0x20,0x1F,\ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,\
0x1E,0x1C,0x1B,0x19,0x00,0x00,0x00,0x00,0x00,0x00,\ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x61,0x01} 0x00,0x00,0x00,0x00,0x1F,0x01}
/* TODO: define your config for Sensor_ID == 1 here, if needed*/ /* TODO: define your config for Sensor_ID == 1 here, if needed*/
@ -352,9 +352,9 @@ extern void gtp_set_io_int(void);
0x00,0x00,0x00,0x00,0xDF,0x01} 0x00,0x00,0x00,0x00,0xDF,0x01}
#if GTP_CUSTOM_CFG #if GTP_CUSTOM_CFG
#define GTP_MAX_HEIGHT 800 #define GTP_MAX_HEIGHT 480
#define GTP_MAX_WIDTH 480 #define GTP_MAX_WIDTH 854
#define GTP_INT_TRIGGER 0 /* 0: Rising 1: Falling*/ #define GTP_INT_TRIGGER 1 /* 0: Rising 1: Falling*/
#else #else
#define GTP_MAX_HEIGHT 4096 #define GTP_MAX_HEIGHT 4096
#define GTP_MAX_WIDTH 4096 #define GTP_MAX_WIDTH 4096

View File

@ -0,0 +1,42 @@
#!/bin/sh
TMPFILE="/tmp/pid.txt"
let TOLMEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
let FREEMEM=`cat /proc/meminfo | grep MemFree | awk '{print $2}'`
USEDHWMEM=0
USEDVMMEM=0
ps | awk '{print $1}' > $TMPFILE
printf "------------------------------------------------------------------------------------------------------------------\n"
printf "| Memory(VM) = VmSize = VmLib + VmExe + VmData + VmStk |\n"
printf "------------------------------------------------------------------------------------------------------------------\n"
printf "| Process | PID | Memory(HW)/KB| Memory(VM)/KB| VMPeak/KB | VMLib/KB | VMStk/KB |\n"
printf "------------------------------------------------------------------------------------------------------------------\n"
while read line
do
MEMFILE=/proc/$line/status
if [ -f $MEMFILE ]; then
NAME=`cat $MEMFILE | grep Name | awk '{print $2}'`
PID=`cat $MEMFILE | grep -w Pid | awk '{print $2}'`
HWMEM=`cat $MEMFILE | grep VmRSS | awk '{print $2}'`
VMMEM=`cat $MEMFILE | grep VmSize | awk '{print $2}'`
VMPEAK=`cat $MEMFILE | grep VmPeak | awk '{print $2}'`
VMLIB=`cat $MEMFILE | grep VmLib | awk '{print $2}'`
VMSTK=`cat $MEMFILE | grep VmStk | awk '{print $2}'`
if [ -n "$HWMEM" ] && [ "$NAME" != "dump_mem.sh" ]; then
printf "| %-24s | %-8s | %-12s | %-12s | %-12s | %-12s | %-12s |\n" " $NAME" " $PID" " $HWMEM" "$VMMEM" "$VMPEAK" "$VMLIB" "$VMSTK"
USEDHWMEM=`expr $USEDHWMEM + $HWMEM`
USEDVMMEM=`expr $USEDVMMEM + $VMMEM`
fi
fi
done < $TMPFILE
printf "------------------------------------------------------------------------------------------------------------------\n"
awk -v b=$TOLMEM -v a=$FREEMEM -v c=$USEDHWMEM -v d=$USEDVMMEM -v y=1024.0 \
'BEGIN{printf "Used/Total(%.0fM/%.0fM): %11.2fM %11.2fM\n", (b-a)/y, b/y, c/y, d/y}'
date -R

View File

@ -259,6 +259,23 @@ endef
$(eval $(call KernelPackage,touchscreen-gt82x)) $(eval $(call KernelPackage,touchscreen-gt82x))
define KernelPackage/touchscreen-gt9xxnew
SUBMENU:=$(INPUT_MODULES_MENU)
TITLE:=gt9xxnew support
DEPENDS:= +kmod-input-core
KCONFIG:= \
CONFIG_INPUT_TOUCHSCREEN \
CONFIG_TOUCHSCREEN_GT9XXNEW_TS
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/gt9xxnew/gt9xxnew_ts.ko
AUTOLOAD:=$(call AutoProbe,gt9xxnew_ts)
endef
define KernelPackage/touchscreen-gt9xxnew/description
Enable support for new gt9xx touchscreen port.
endef
$(eval $(call KernelPackage,touchscreen-gt9xxnew))
define KernelPackage/touchscreen-atmel-mxt define KernelPackage/touchscreen-atmel-mxt
SUBMENU:=$(INPUT_MODULES_MENU) SUBMENU:=$(INPUT_MODULES_MENU)
TITLE:=Atmel MXT support TITLE:=Atmel MXT support

View File

@ -395,19 +395,19 @@ rtp_exchange_x_y_flag = 0
;---------------------------------------------------------------------------------- ;----------------------------------------------------------------------------------
[ctp] [ctp]
compatible = "allwinner,sun50i-ctp-para" compatible = "allwinner,sun50i-ctp-para"
ctp_used = 0 ctp_used = 1
ctp_name = "gt82x" ctp_name = "gt9xxnew_ts"
ctp_twi_id = 0 ctp_twi_id = 1
ctp_twi_addr = 0x38 ctp_twi_addr = 0x5d
ctp_screen_max_x = 1280 ctp_screen_max_x = 854
ctp_screen_max_y = 800 ctp_screen_max_y = 480
ctp_revert_x_flag = 1 ctp_revert_x_flag = 1
ctp_revert_y_flag = 1 ctp_revert_y_flag = 1
ctp_exchange_x_y_flag = 1 ctp_exchange_x_y_flag = 1
ctp_int_port = port:PH05<6><default><default><default> ctp_int_port = port:PL10<6><default><default><default>
ctp_wakeup = port:PH06<1><default><default><1> ctp_wakeup = port:PL09<1><1><1><0>
ctp_power_ldo = "vcc-ctp" ctp_power_ldo = "pmu1736_cldo1"
ctp_power_ldo_vol = 3300 ctp_power_ldo_vol = 3300
ctp_power_io = ctp_power_io =

3
target/allwinner/mandolin-c1evb/defconfig Normal file → Executable file
View File

@ -1742,7 +1742,8 @@ CONFIG_PACKAGE_kmod-input-evdev=y
# CONFIG_PACKAGE_kmod-touchscreen-focaltech is not set # CONFIG_PACKAGE_kmod-touchscreen-focaltech is not set
# CONFIG_PACKAGE_kmod-touchscreen-ft5x is not set # CONFIG_PACKAGE_kmod-touchscreen-ft5x is not set
# CONFIG_PACKAGE_kmod-touchscreen-gslx680new is not set # CONFIG_PACKAGE_kmod-touchscreen-gslx680new is not set
CONFIG_PACKAGE_kmod-touchscreen-gt82x=y # CONFIG_PACKAGE_kmod-touchscreen-gt82x is not set
CONFIG_PACKAGE_kmod-touchscreen-gt9xxnew=y
# #
# LED modules # LED modules