Samsung Galaxy Tab 10.1 (samsung-p4wifi)
Users owning this device
postmarketOS for the Samsung Galaxy Tab 10.1 runs on mainline Linux kernel fork. The kernel uses both mainline and forward ported drivers. Some peripherals are using mainline device driver where applicable. Some peripherals which are not working on or don't have mainline drivers are using drivers forward ported from the stock 3.1.10 kernel.
How to enter flash mode
Press and hold Power + Volume Down buttons
$ pmbootstrap init
Choose 'samsung-p4wifi' as target device. Build the image:
$ pmbootstrap install
Enter flash (download) mode Flash the kernel and system images
$ pmbootstrap flasher flash_kernel $ pmbootstrap flasher flash_rootfs
As alternative you can flash rootfs to Data partition to use more space, because default system partition is small
$ pmbootstrap flasher flash_rootfs --partition UDA
The battery in this device is the
max17042. A tear down of the (nearly) identical Galaxy Tab 8.9 reveals that the charger is
Differences between mainline and downstream drivers:
The downstream kernel provides an early implementation of a driver for the
max17042 battery. The implementation of the battery and charger driver are split across
max17042_battery.c. The downstream charger driver implements additional logic to handle charge full and low battery events which may affect the health of the battery. The implementation details are not clear but the overall functionality appears to dynamically tune the full charge value. The mainline driver does not have this sort of functionality. The downstream driver reports the current in milliamp whereas the mainline driver is in microamp.
max8903 datasheet shows that there are separate GPIOs for USB and DC power connectors. This device has one connect GPIO for both USB and DC mode. The type of connector is determined by reading the
usb-sel GPIOs. It's unclear which piece of hardware the usb-sel is coming from (max8903 / tegra soc / 30-pin connector ???).
Moved to Nvidia_Tegra_2_(tegra20)#Graphics which cover all Tegra 2 devices.
Audio output through headphone and speakers are working. Audio input through the built-in microphone and headset microphone are working.
The ALSA UCM config files were previously generated using the
xml2ucm tool. The
p4wifi.config.xml can be found in this github gist.
$ stack exec -- xml2ucm -m mixer_paths.xml -c p4wifi-config.xml -o examples
pmaports!254 the ALSA UCM config files were created based the wm8994 datasheet and the downstream driver coding of the mixer.
The audio inputs are muted by default. Unmute and set the volume with
alsamixer or set the mixer controls manually with
amixer. The right channel (
IN1R) is the headset microphone. The left channel (
IN1L) is the built-in microphone.
Unmuting the headset microphone:
$ amixer cset name='IN1R Switch' on $ amixer cset name='IN1R Volume' 11
Note: Plug in the headset mic at boot otherwise the sound driver will not load. Some wm8994 device register writes fail during driver probe unless mic bias GPIO is set to high.
The wifi chip in this device is the Broadcom BCM4330 B1 revision. There is a B2 revision which is much more common. The only distinguishing factor is the firmware. Only the B1 firmware will work on this device. The most common BCM4330 firmware found from various sources (such as
linux-firmware) is for the B2 revision.
The xmm6260 modem was used in quite a few Samsung Android devices from the same era as this tablet. The Samsung Galaxy Tab 10.1 3G (p4) and Samsung Galaxy Tab 10.1 from T-Mobile (p4tmo) are otherwise identical to the WiFi only version of the tablet (p4wifi). The cellular modem is connected via an internal USB interface called USB HSIC. The mainline Tegra USB driver does not implement this functionality. Much of the work in enabling the cellular stack would involve adding USB HSIC support to the mainline USB driver.
The bcm4330 Bluetooth module is supported by the mainline kernel and Bluez 5 stack.
Install bluetooth service:
$ apk add bluez $ rc-update add bluetooth default $ rc-service bluetooth start
Pair a Bluetooth device:
$ bluetoothctl $ power on $ scan on $ connect XX:XX:XX:XX:XX:XX $ scan off
The following instructions will play audio to a Bluetooth headset.
$ apk add pulseaudio pulseaudio-bluez pulseaudio-utils
$ pulseaudio --daemonize
Check that the Bluetooth audio profiles are working in bluetoothctl:
$ show Controller XX:XX:XX:XX:XX:XX (public) Name: BlueZ 5.49 Alias: BlueZ 5.49 Class: 0x000c0000 Powered: yes Discoverable: no Pairable: yes UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb) UUID: Headset (00001108-0000-1000-8000-00805f9b34fb) Modalias: usb:v1D6Bp0246d0531 Discovering: no
Play an audio file through a Bluetooth headset:
$ paplay audio.wav
kxt9f accelerometer driver works pending device tree patches being merged into upstream. There requires a user space daemon such as
iio-sensor-proxy to read the sensor data.
USB OTG mode is not implemented in the mainline USB driver.
Hardware Information & Mainline Driver Status
The Linux mainlining effort contains drivers forward ported from the stock Samsung Linux 3.1.10 kernel which shipped with the device. Some peripheral devices have been transitioned over to the mainline driver. Other drivers are not in the mainline kernel or the device is not compatible with the mainline driver.
|Peripheral Type||Hardware||Mainline Driver|
|Ambient light sensor||bh1721fvc||Y|
|Analog Digital Converter||stmpe811||Y|
|CPU Temperature Sensor||nct1008||Y|
|Wifi / Bluetooth||bcm4330||Y|
|30-pin accessory port||unknown||-|
- 1: kxt9f driver exists in mainline. The driver needs support device tree bindings.
- 2: ak8975 driver exists in mainline. The device id for ak8975c needs to be added to the driver. I (decatf) can't test it because the compass seems to report nonsense data. The compass on my tablet might be broken.
- 3: sii9234 driver exists in mainline. Requires someone with an MHL cable to implement / test it.
Mainline Driver Status Legend
|P||Forward ported driver|
|-||No driver -- driver has not been forward ported|
latest mainline driver ?
latest kernel (based on grate-linux) with rebase patches to test (do not posses the HW) https://github.com/okias/linux/pull/new/p4wifi . Config file: https://raw.githubusercontent.com/Decatf/linux/040d3332474fceceaf4e4402417f0ead732f45bc/arch/arm/configs/tegra_postmarketos_defconfig
If it'll work for you, please let me know on Matrix (okias) or here.