diff --git a/device/device-samsung-gts210velte/90-sec_touchscreen.rules b/device/device-samsung-gts210velte/90-sec_touchscreen.rules new file mode 100644 index 000000000..0a5e65ba5 --- /dev/null +++ b/device/device-samsung-gts210velte/90-sec_touchscreen.rules @@ -0,0 +1,18 @@ +# * need ATTRS{name}=="sec_touchscreen" else device not detected as touchscreen +# * give size hint (in mm) otherwise too small size is assumed +# * to avoid palm detection, need LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=256 +# and libinput>1.10 +# * set calibration matrix for 270 degree clockwise rotation, see [1] +# * remove TOUCHPAD, add TOUCHSCREEN to ensure that device is seen as +# touchscreen only, see [2] +# +# [1] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html +# [2] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html#udev_device_type +# +ACTION=="add|change", SUBSYSTEM=="input", ATTRS{name}=="sec_touchscreen", \ +ENV{LIBINPUT_ATTR_SIZE_HINT}="190x140", \ +ENV{LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD}="256", \ +ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1", \ +ENV{ID_INPUT}="1", \ +ENV{ID_INPUT_TOUCHPAD}="", \ +ENV{ID_INPUT_TOUCHSCREEN}="1" diff --git a/device/device-samsung-gts210velte/APKBUILD b/device/device-samsung-gts210velte/APKBUILD new file mode 100644 index 000000000..11791de9e --- /dev/null +++ b/device/device-samsung-gts210velte/APKBUILD @@ -0,0 +1,26 @@ +# Reference: +pkgname="device-samsung-gts210velte" +pkgdesc="Samsung Galaxy Tab S2 9.7 LTE (SM-T819)" +pkgver=0.1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck" +depends="postmarketos-base linux-samsung-gts210velte mkbootimg mesa-dri-swrast mdss-fb-init-hack" +makedepends="devicepkg-dev" +source="deviceinfo 90-sec_touchscreen.rules" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname + install -D -m644 "$srcdir"/90-sec_touchscreen.rules \ + "$pkgdir"/etc/udev/rules.d/90-sec_touchscreen.rules +} + + +sha512sums="58ef7874dc145f613cfe88427eff21f49351427e2d20168bed64a5e70e684093940ad833f555fe8fadaa52c1a671ac43e396f26ae80ac73cbba500ee4ce9805c deviceinfo +0d23fae6de9b04a36f395068278b8a9054c33e435b24de943da1e55a0ee2d88ee932a3fd2f660596377b14474483edecb8357684f9b7bc2c53979c7f863fae52 90-sec_touchscreen.rules" diff --git a/device/device-samsung-gts210velte/deviceinfo b/device/device-samsung-gts210velte/deviceinfo new file mode 100644 index 000000000..4f3125477 --- /dev/null +++ b/device/device-samsung-gts210velte/deviceinfo @@ -0,0 +1,35 @@ +# Reference: +# Please use double quotes only. You can source this file in shell scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Samsung Galaxy Tab S2 9.7 LTE (SM-T819)" +deviceinfo_manufacturer="Samsung" +deviceinfo_codename="samsung-gts210velte" +deviceinfo_date="2016" +deviceinfo_dtb="" +deviceinfo_modules_initfs="" +deviceinfo_arch="aarch64" + +# Device related +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="2048" +deviceinfo_screen_height="1536" +deviceinfo_dev_touchscreen="/dev/input/event2" +deviceinfo_dev_touchscreen_calibration="0 1 1.342 -1 0 1536" +deviceinfo_dev_keyboard="" + +# Bootloader related +deviceinfo_flash_method="heimdall-bootimg" +deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom androidboot.wificountrycode=00 firmware_class.path=/lib/firmware/postmarketos msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk androidboot.selinux=permissive buildvariant=userdebug androidboot.sec_atd.tty=/dev/ttyHSL0 sec_log=0x200000@0xa0200000 sec_dbg=0x1ff000@0xa0000000 androidboot.revision=4 androidboot.warranty_bit=1 androidboot.bootloader=T819XXS2BRB1 androidboot.boot_recovery=0 sec_debug.reset_reason=0x0 sec_dbg_ex_info=0x400@0xa01ff000 charging_mode=0x00 pmic_info=3 androidboot.debug_level=0x4f4c sec_debug.enable=0 sec_debug.enable_user=0 msm_rtb.enable=0 androidboot.cp_debug_level=0x55FF sec_debug.enable_cp_debug=0 vmalloc=450M sysscope=0xff000000 fg_reset=0 androidboot.security_mode=1526595584 androidboot.ucs_mode=0 androidboot.emmc=true gpt androidboot.baseband=msm lcd_id=0x424015 lcd_id2=0xffffff hall_ic=0x0 mdss_mdp.panel=1:dsi:0:ss_dsi_panel_ANA38401_AMS968HH01_QXGA:1:ss_dsi_panel_ANA38" +deviceinfo_generate_bootimg="true" +deviceinfo_bootimg_qcdt="true" +deviceinfo_flash_offset_base="0x80000000" +deviceinfo_flash_offset_kernel="0x00008000" +deviceinfo_flash_offset_ramdisk="0x02000000" +deviceinfo_flash_offset_second="0x00f00000" +deviceinfo_flash_offset_tags="0x01e00000" +deviceinfo_flash_pagesize="2048" +deviceinfo_flash_heimdall_partition_kernel="BOOT" +deviceinfo_flash_heimdall_partition_system="SYSTEM" + diff --git a/device/linux-samsung-gts210velte/01_fix_msm_dba.patch b/device/linux-samsung-gts210velte/01_fix_msm_dba.patch new file mode 100644 index 000000000..2061842c0 --- /dev/null +++ b/device/linux-samsung-gts210velte/01_fix_msm_dba.patch @@ -0,0 +1,13 @@ +diff --git a/drivers/video/msm/msm_dba/msm_dba.c b/drivers/video/msm/msm_dba/msm_dba.c +index cc6512a..eb073a7 100644 +--- a/drivers/video/msm/msm_dba/msm_dba.c ++++ b/drivers/video/msm/msm_dba/msm_dba.c +@@ -22,7 +22,7 @@ + #include + + #include