Samsung Galaxy Tab E 7.0 (SM-T116) (samsung-goyave3g)

From postmarketOS
Samsung Galaxy Tab E 7.0 /
Galaxy Tab 3V Lite
Galaxy Tab E 7.0 running XFCE4
Galaxy Tab E 7.0 running XFCE4
Manufacturer Samsung
Name Galaxy Tab E 7.0 /
Galaxy Tab 3V Lite
Codename samsung-goyave3g
Model SM-T116BU
Released 2015
Category testing
Pre-built images no
Original software Android (TouchWiz)
Original version 4.4.4
postmarketOS kernel 3.10.17
Hardware
Chipset Spreadtrum SC8830
CPU 4x 1.3 GHz Cortex-A7
GPU Mali-400MP
Display 600x1024 TFT
Storage 8GB
Memory 1GB
Architecture ARMv7
Type tablet
Unixbench Whet/Dhry score 793.6
Features
Flashing
Works
Touchscreen
Partial
Display
Partial
WiFi
Broken
FDE
Mainline
Battery
Works
3D Acceleration
Broken
Audio
Partial
Bluetooth
Broken
Camera
Broken
GPS
Mobile data
Internal storage
Works
SMS
Calls
USB OTG
Sensors
Accelerometer
Power Sensor
Misc
Memory Card
Works
FOSS bootloader
Broken


Contributors

Users owning this device


How to enter flash mode

  • Download mode: Volume Down + Power + Home
  • Recovery mode: Volume Up + Power + Home

Installation

$ pmbootstrap flasher flash_rootfs  # to install system
$ pmbootstrap flasher flash_kernel  # to install kernel

Boot

Boot screen is broken after Spreadtrum video patches are applied, but system boots normally.

Display

  • Needs this and this patch for Xorg to work properly.
  • After applying sprdfb-fix-swapped-colors.patch the boot screen breaks. Xorg works after system is booted. (plymouth)
  • Using msm-fb-refresher
  • Adjusting screen brightness works.

Touchscreen

Touchscreen goes to opposite locations, see pmaports #1883.

Wi-Fi and Bluetooth

Needs proprietary firmware (BCM43438).

Findings

  • The kernel doesn't requires modules, but requires 4 files to be extracted: bcmdhd_sta.bin, nvram_net.txt, nvram_mfg_DCXO.txt, nvram_net_DCXO.txt.
  • Needs to change CONFIG_BCMDHD_FW_PATH and CONFIG_BCMDHD_NVRAM_PATH on config files to PostmarketOS' relative path.
  • Kernel's files in arch/arm/boot/dts/ needs to be patched to use PostmarketOS' relative paths for nv_path and nv_mfg_path
  • There are 2 proprietary binary files relative to BCM4343 in Android stock ROM at /system/vendor/firmware, but they don't seem to be needed: BCM43430A1_001.002.009.0013.0017_ORC_Goya_VE_37_4MHz.hcd and goyave3gREV02/BCM43430A1_001.002.009.0013.0015_ORC_Goya_VE.hcd

After doing all this, the firmware still can't be loaded and WiFi don't work. Trying to set wlan0 up errors:

samsung-goyave3g:~$ sudo ip link set wlan0 up
ip: ioctl 0x8914 failed: Operation not permitted

dmesg log:

[    1.943969] [c2] wifi_platform_bus_enumerate device present 1
[    1.943969] [c2] wlan_device_set_carddetect: 1                                          
[    1.960296] [c0] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter                         
[    1.960388] [c0] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter                                 
[    1.960388] [c0] bus num (host idx)=2, slot num (rca)=1          
[    1.960418] [c0] found adapter info 'DHD generic adapter'     
[    1.960479] [c0] alloc static buf at ede80000!  
[    1.963806] [c0] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x4
[    1.964904] [c0] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[    1.965789] [c0] wl_create_event_handler(): thread:wl_event_handler:86 started
[    1.965881] [c2] CFG80211-INFO2) wl_event_handler : tsk Enter, tsk = 0xee273680
[    1.966522] [c0] p2p0: P2P Interface Registered
[    1.966644] [c0] dhd_attach(): thread:dhd_watchdog_thread:87 started               
[    1.966766] [c0] dhd_attach(): thread:dhd_dpc:88 started  
[    1.966888] [c0] dhd_attach(): thread:dhd_rxf:89 started
[    1.966918] [c0] *** register_pm_notifier, nb->notifier_call:dhd_pm_callback ***
[    1.966949] [c0] dhd_deferred_work_init: work queue initialized
[    1.967285] [c0] Dongle Host Driver, version 1.141.64.8 (r)
               Compiled in drivers/net/wireless/bcmdhd on May  6 2024 at 03:12:19          
[    1.967803] [c0] Register interface [wlan0]  MAC: 00:c9:09
                                                                                     
[    1.967834] [c0] dhd_prot_ioctl : bus is down. we have nothing to do
[    1.967834] [c0] dhd_wl_ioctl: WLC_IOCTL: cmd: 3, ret = -1
[    1.967987] [c0] wifi_platform_set_power = 0                                            
[    1.967987] [c0] wlan_device_power:0


How it works in Android

As in PostmarketOS, the kernel seems to attempt to setup wlan0 but fails at first attempt, note "bus is down, we have nothing to do":

<4>[    1.743194]  [1:      swapper/0:    1] [c1] wifi_platform_bus_enumerate device present 1
<6>[    1.743194]  [1:      swapper/0:    1] [c1] wlan_device_set_carddetect: 1
<4>[    1.759582]  [0:      swapper/0:    1] [c0] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
<4>[    1.759674]  [0:      swapper/0:    1] [c0] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
<4>[    1.759704]  [0:      swapper/0:    1] [c0] bus num (host idx)=2, slot num (rca)=1
<4>[    1.759704]  [0:      swapper/0:    1] [c0] found adapter info 'DHD generic adapter'
<4>[    1.759796]  [0:      swapper/0:    1] [c0] alloc static buf at ede00000!
<4>[    1.763061]  [0:      swapper/0:    1] [c0] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x4
<4>[    1.764129]  [0:      swapper/0:    1] [c0] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
<4>[    1.764373]  [0:      swapper/0:    1] [c0] [NVPATH_FROMDT] Update sta nv : [/system/etc/wifi/nvram_net_DCXO.txt]
<4>[    1.765106]  [0:      swapper/0:    1] [c0] wl_create_event_handler(): thread:wl_event_handler:84 started
<6>[    1.765167]  [3:wl_event_handle:  132] [c3] CFG80211-INFO2) wl_event_handler : tsk Enter, tsk = 0xee058680
<4>[    1.765808]  [0:      swapper/0:    1] [c0] p2p0: P2P Interface Registered
<4>[    1.766052]  [0:      swapper/0:    1] [c0] dhd_attach(): thread:dhd_watchdog_thread:85 started
<4>[    1.766296]  [0:      swapper/0:    1] [c0] dhd_attach(): thread:dhd_dpc:86 started
<4>[    1.766448]  [1:      swapper/0:    1] [c1] dhd_attach(): thread:dhd_rxf:87 started
<6>[    1.766510]  [1:      swapper/0:    1] [c1] *** register_pm_notifier, nb->notifier_call:dhd_pm_callback ***
<4>[    1.766540]  [1:      swapper/0:    1] [c1] dhd_deferred_work_init: work queue initialized 
<4>[    1.766998]  [0:      swapper/0:    1] [c0] Dongle Host Driver, version 1.141.64.38 (security_patch)
<4>[    1.766998]  [0:      swapper/0:    1] Compiled in drivers/net/wireless/bcmdhd on May  3 2018 at 04:31:35
<4>[    1.767517]  [0:      swapper/0:    1] [c0] Register interface [wlan0]  MAC: 00:98:30
<4>[    1.767517]  [0:      swapper/0:    1] 
<6>[    1.767578]  [3:wl_event_handle:  132] [c3] CFG80211-INFO2) wl_event_handler : was terminated
<4>[    1.767761]  [0:      swapper/0:    1] [c0] wl_destroy_event_handler(): thread:wl_event_handler:84 terminated OK
<4>[    1.767791]  [0:      swapper/0:    1] [c0] dhd_prot_ioctl : bus is down. we have nothing to do
<4>[    1.767791]  [0:      swapper/0:    1] [c0] dhd_wl_ioctl: WLC_IOCTL: cmd: 3, ret = -1
<4>[    1.767913]  [0:      swapper/0:    1] [c0] wifi_platform_set_power = 0
<6>[    1.767944]  [0:      swapper/0:    1] [c0] wlan_device_power:0

Then something makes the kernel try again, the kernel then proceeds to load firmware and scan when everything is setup.

<4>[   16.852050]  [2: wpa_supplicant:  809] [c2] 
<4>[   16.852050]  [2: wpa_supplicant:  809] Dongle Host Driver, version 1.141.64.38 (security_patch)
<4>[   16.852050]  [2: wpa_supplicant:  809] Compiled in drivers/net/wireless/bcmdhd on May  3 2018 at 04:31:35
<4>[   16.852142]  [2: wpa_supplicant:  809] [c2] wl_android_wifi_on in
<4>[   16.852142]  [2: wpa_supplicant:  809] [c2] wifi_platform_set_power = 1
<6>[   16.852172]  [2: wpa_supplicant:  809] [c2] wlan_device_power:1 
<4>[   17.113281]  [1: wpa_supplicant:  809] [c1] sdio_reset_comm():
<4>[   17.198760]  [0: wpa_supplicant:  809] [c0] [NVPATH_FROMDT] Update sta nv : [/system/etc/wifi/nvram_net_DCXO.txt]
<4>[   17.203369]  [2: wpa_supplicant:  809] [c2] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x4
<4>[   17.205139]  [0: wpa_supplicant:  809] [c0] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
<4>[   17.205596]  [0: wpa_supplicant:  809] [c0] REVISION SPECIFIC feature is not required
<4>[   17.205627]  [0: wpa_supplicant:  809] [c0] dhdsdio_download_firmware: firmware path=/system/etc/wifi/bcmdhd_sta.bin, nvram path=/system/etc/wifi/nvram_net_DCXO.txt
<4>[   17.276672]  [0: wpa_supplicant:  809] [c0] sdioh_request_buffer: [1] doing memory copy buf=e6d93000, len=382
<4>[   17.281646]  [0: wpa_supplicant:  809] [c0] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
<4>[   17.337738]  [2: wpa_supplicant:  809] [c2] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
<4>[   17.345001]  [2: wpa_supplicant:  809] [c2] Firmware up: op_mode=0x0005, MAC=10:16:dc
<4>[   17.345855]  [2: wpa_supplicant:  809] [c2] [WIFI_SEC] sec_get_param_wfa_cert: File open failed, file path=/data/.roamoff.info
<4>[   17.355224]  [0: wpa_supplicant:  809] [c0] dhdcdc_set_ioctl: SET PM to 2
<4>[   17.356109]  [0: wpa_supplicant:  809] [c0] [WIFI_SEC] sec_control_pm: /data/.psm.info open failed, so set PM to 2
<4>[   17.356689]  [0: wpa_supplicant:  809] [c0] [WIFI_SEC] sec_get_param_wfa_cert: File open failed, file path=/data/.bustxglom.info
<4>[   17.370605]  [2: wpa_supplicant:  809] [c2] Firmware version = wl0: Jul  6 2015 16:24:38 version 7.10.323.58 (A1 Station/P2P) FWID 01-6c0a53f
<4>[   17.370941]  [2: wpa_supplicant:  809] [c2] [WIFI_SEC] save .wifiver.info file.
<4>[   17.371032]  [2: wpa_supplicant:  809] [c2] [WIFI_SEC] sec_get_param_wfa_cert: File open failed, file path=/data/.proptx.info
<4>[   17.372344]  [0: wpa_supplicant:  809] [c0] dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79
<4>[   17.373046]  [2: wpa_supplicant:  809] [c2] dhd_wlfc_init: query wlfc_mode succeed, fw_caps=0x1c
<4>[   17.373962] I[2: wpa_supplicant:  809] [c2] dhd_wlfc_init(): wlfc_mode=0x1c, ret=0
<4>[   17.374023]  [2: wpa_supplicant:  809] [c2] dhdsdio_func_blocksize: F2 Block size set from 512 to 128
<4>[   17.375030]  [0: wpa_supplicant:  809] [c0] dhd_wl_ioctl: WLC_GET_VAR: pfnlbest, ret = -14
<4>[   17.432708] I[0:        dhd_dpc:  134] [c0] wifi_platform_prealloc: failed to alloc static mem section 8
<4>[   17.432769] I[0:        dhd_dpc:  134] [c0] dhd_os_prealloc: Preallocated memory section 8(size: 22712)allocated by kmalloc
<4>[   17.450408]  [3: wpa_supplicant:  809] [c3] wl_create_event_handler(): thread:wl_event_handler:398 started
<6>[   17.450439]  [2:wl_event_handle:  920] [c2] CFG80211-INFO2) wl_event_handler : tsk Enter, tsk = 0xee058680
<6>[   17.489685]  [0:       watchdog:  930] [c0] !@Sync 0
<6>[   17.600891]  [2: wpa_supplicant:  809] [c2] CFGP2P-INFO2) wl_cfgp2p_add_p2p_disc_if : P2P interface registered
<4>[   17.607360]  [0:        dhd_dpc:  134] [c0] WLC_E_IF: NO_IF set, event Ignored
<6>[   17.781707]  [0: wpa_supplicant:  809] [c0] CFG80211-TRACE) __wl_cfg80211_scan : START SCAN

Camera

Needs proprietary firmware.

Audio

  • Needs soc-sprd-audio-sc8830
  • Back speaker works
  • Headphone works
  • Frontal speaker not tested
  • Microphone works (both handset and headset), but is really low.
  • Sometimes audio won't work, specially after booting the device. Connecting headphone and disconnecting fixes that

PulseAudio

Edit default ALSA card and device in /usr/share/alsa/alsa.conf, then reboot

defaults.ctl.card sprdphone
defaults.pcm.card sprdphone
defaults.pcm.device sprdphone

Alternatively, you may also add these lines at /etc/asound.conf instead:

defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 1

After that, PulseAudio successfully connects to Spreadtrum audio card. However, playing sounds freezes the audio buffer, playing a continuous buzz. Microphone doesn't works either. To fix that, find the following line in /etc/pulse/default.pa and disable timer-based schedulling:

load-module module-udev-detect tsched=0

3D Acceleration

Needs proprietary Mali driver, or attempt to setup open-source Lima driver on this good old manufacturer kernel.

Additional notes

  • Contributor is currently unable to upstream due to issues about GitLab requesting sensitive information.
  • Firewall doesn't works: Downstream kernel doesn't supports nftables

See also