ASUS Transformer Pad (asus-tf300t)

== Contributors ==
* osctobe (Michał Mirosław)
* Clamor
* Ion Agorria
== Device owners ==
== Variants ==
* TF300T - regular wifi only tablet, currently has support both in pmaports and grate Linux kernel fork.
* TF300TG - 3G version of TF300T with some slight differences. Modem is very close to Nexus 7 2012 cellular (tilapia).
* TF300TL - LTE version of TF300T with differences similar to TF300TG. Uses Asus custom modem setup and doesn't have mainline driver for it.
Note: TF300TL has experimental support in this grate fork. TF300T and TF300TG are officially supported.
== Unlocking ==
The first step to do anything with the device is unlocking, with this device its done by sideloading the unlock apk from asus and clicking a few buttons in the app. In case you get a network connection error, you will need to patch the unlocker.
== Compiling a kernel ==
=== Android kernel ===
* 3.1 kernel based on ASUS sources with updates till Oreo support (Morpheus kernel)
* 3.4 kernel as a part of Unlegacy Android Project (Unlegacy kernel)
=== Mainline (Grate) ===
* Baseline kernel sources on master: https://github.com/grate-driver/linux
* Proper dts for TF300T is added
* Version: 6.0.6
* Status: Boots. Almost full support.
== Hardware status (mainline) ==
Status	Hardware 	Info
Y 	Booting 	boot.img has restriction of approx 8MB, which is /boot partition size.
Y 	Bootloader 	Open source bootloader U-Boot is available as alternative for stock Asus bootloader and can replace it. U-Boot can not boot downstream kernel due to TrustZone problem.
Y 	Panel 	Innolux G101ICE-L01 WXGA (1280x800) LCD IPS panel through LVDS controller.
Y 	HDMI output 	HDMI works, but maximum output is 1080p due to Tegra 3 limitations.
Y 	Touchscreen 	Used Elantech EKTH1036 touchscreen.
Y 	USB 	One full size USB 2.0 in dock or via 40pin adapter.
Y 	SD cards 	MicroSD card and full sized SD card (recognized as USB drive) in dock.
Y 	Internal memory 	Hynix emmc, works.
P 	GPS 	Broadcom GPS BCM4751 is used. Needs more attention.
Y 	WiFi 	Uses Azurewave AW-NH615 BCM4329. Wi-Fi works and firmwares are included.
Y 	Bluetooth 	Uses Azurewave AW-NH615 BCM4329B1. Works fine out of the box.
Y 	GPIO keys 	There is 3 keys on GPIO: Power, Volume up, Volume down.
Additionally GPIO-keys like are LID sensor and Audio dock line-out detect.
Y 	Dock Keyboard 	Both pad and dock have Nuvoton NPCE795LA0BX embedded controller which handles battery data, charging, leds, keyboard and touchpad. Driver of this EC is mainlined and is fully functional. Keyboard and Touchpad work. 
Alt Gr can be used for alternate multimedia keys instead of escape, fn keys, volumes and delete. Alt GR + Lock changes the default key mode.
Y 	Battery/Charger 	Driver is based on Texas Instruments bq24725 SMBus Charge Controller driver and GPIO charger but works through pad/dock EC. Charging and charge level of both batteries are shown correctly.
Y 	PMIC 	Transformers use Texas Instruments TPS659110 PMIC and TPS62361 core regulator.
Y 	Sound 	Sound codec is WM8903 on TF300T and RT5631 on cellular models. Kernel driver and tegra_wm8903/tegra_rt5631 glue drivers are present. UCMs are ready. Audio through HDMI works.
Y 	Voice processor 	Transformers use separate Fortemedia FM34NE voice processor. Mainline driver prototype is available but kernel lacks way to get mic status (dsp is internal mic dependent), set into constant bypass mode.
Y 	Thermal sensor 	NCT1008 ON Semiconductor LM90 series thermometer.
Y 	Orientation sensors	Include Invensense mpu3050 gyroscope with Kionix KXTF9 accelerometer and Aichi AMI306 3-axis digital compass.
Y 	Light sensor 	Driver Dyna-Image AL3010. Brightness regulation works, install iio-sensor-proxy . It's slightly oversensitive.
N 	Front camera 	Aptina mi1040 camera sensor. Grate kernel doesn't support VI yet. Mainline linux driver exists (authored by Okias) and proper nodes are added to device tree.
N 	Rear camera 	Is not planned to be added to support list. If you have such a need, development is welcome. Mainline driver doesn't exist.
P 	ULP GeForce 	GPU Acceleration partially works.
N 	Modem 	TF300TG uses XMM6260. TF300TL in downstream uses some Asus implementation of modem driver. Contributions are welcome, no work done yet.
== Usability ==
=== Desktop environment ===
Since 3D acceleration is not available yet, all DE which use it will be painfully slow and laggy.
Currently xfce4 or mate are recommended.
== U-Boot ==
=== Installing PMOS with U-Boot on eMMC ===
1. Primary, we need to compile a u-boot on legacy branch:
$ git clone https://github.com/clamor-s/u-boot -b legacy
$ cd ~/legacy
$ export CROSS_COMPILE=arm-linux-gnueabi-
$ make transformer_t30_defconfig tf300tg.config # Make sure to use the correct model number
$ make all
Copy u-boot-dtb-tegra.bin file to nvflash folder. 
Now, flash new bootloader with nvflash tool. Go to nvflash folder and do (Make sure to flash to EBT partition):
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 4 u-boot-dtb-tegra.bin
2. Secondary, during the Installation process add --split option then export:
$ pmbootstrap pull
$ pmbootstarp init
$ pmbootstrap install --split # --fde (optional)
$ pmbootstrap export
3. Finally, set /boot partition:
Mount pm_boot, copy dtb from dtbs folder to root directory (NOT rootfs), make uInitrd:
# mount /tmp/postmarketOS-export/asus-tf300tg-boot.img /mnt/tmp/
# cd /mnt/tmp/
# cp /mnt/tmp/dtbs/tegra30-asus-tf300tg.dtb /mnt/tmp/
# mkimage -n "Ramdisk Image" -A arm -O linux -T ramdisk -C gzip -d initramfs uInitrd
# umount /mnt/tmp
Go to nvflash folder and flash /root and /boot to tablet (Make sure to flash /root to UDA and /boot to APP):
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 17 /tmp/postmarketOS-export/asus-tf300tg-root.img
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 10 /tmp/postmarketOS-export/asus-tf300tg-boot.img
=== Issue with rootfs size ===
When install with --fde option (Maybe without encryption issue the same. It's not tested yet), the rootfs size less than Data partition on tablet. To fix it, we'll need sdcard as Live boot (just install PMOS on it). Load from sdcard, unlock crypt_LUKS and do:
# parted /dev/mapper/luks-xxxxx
(parted) print all # Look at max size partition
(parted) resizepart 1 <max size partition>
Then lock crypt_LUKS and reboot to eMMC. The rootfs size must to be changed.
== Disassembly ==
=== Dock ===
* Remove 2 torx screws on the bottom
* Remove 4 Philips screws under the glued pads on the bottom
* Remove 3 Philips screws near the mouse buttons. Be careful with removing and adding back the top plastic piece, it has small clips
=== Tablet ===
* See iFixit
== See also ==
* Asus Transformer device family on Tegra 3 includes also Transformer Prime TF201 and Transformer Pad Infinity TF700T
* Michał Mirosław latest kernel
* jonty-comp's pld kernel jonty-comp's old pmbootstrap