Difference between revisions of "Samsung Galaxy A5 2017 (samsung-a5y17lte)"

From postmarketOS
Jump to navigation Jump to search
 
(29 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
| imagecaption = Samsung Galaxy A5
 
| imagecaption = Samsung Galaxy A5
 
| releaseyear = 2017
 
| releaseyear = 2017
| originalsoftware = Android 6
+
| originalsoftware = Android 6.0.1 - 8.0
 
| chipset = Exynos 7880
 
| chipset = Exynos 7880
| cpu = ARM Cortex A53
+
| cpu = 8x 1.9 GHz Cortex-A53
| gpu = ARM Mali-T830 MP3
+
| gpu = Mali-T830 MP3
| storage = 32GB
+
| storage = 32 GB
 
| display = 5.2 inch 16:9, 1920 x 1080 pixel 424 PPI, capacitive, Super AMOLED, Corning Gorilla Glass 5, glossy: yes
 
| display = 5.2 inch 16:9, 1920 x 1080 pixel 424 PPI, capacitive, Super AMOLED, Corning Gorilla Glass 5, glossy: yes
| memory = 3GB
+
| memory = 3 GB
 
| architecture = aarch64
 
| architecture = aarch64
 +
| pmoskernel = 3.18.14
 
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
 
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
 
| status_usbnet = Y
 
| status_usbnet = Y
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
+
| status_flashing = N
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. -->
+
| status_touch = Y
 
| status_screen = Y
 
| status_screen = Y
| status_wifi = <!-- Wireless network works? -->
+
| status_wifi = Y
| status_xwayland = <!-- Showing X11 applications in a Wayland compositor (Weston, KWin, ...) works? -->
+
| status_xwayland = Y
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? -->
+
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard = Y
 
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. -->
 
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. -->
| status_battery = <!-- Charging the battery with charging-sdl is possible -->
+
| status_battery = Y<!-- Charging the battery with charging-sdl is possible -->
 
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
 
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
 
| status_accel = <!-- The sensor that measures proper acceleration works -->
 
| status_accel = <!-- The sensor that measures proper acceleration works -->
Line 35: Line 36:
 
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
 
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
 
| booting = yes <!-- The device is booting at all, can be yes/no *IMPORTANT* -->
 
| booting = yes <!-- The device is booting at all, can be yes/no *IMPORTANT* -->
 
+
| status_otg = Y
 +
| whet_dhry = 1691.5
 
<!-- you can also use these lines if you need to:
 
<!-- you can also use these lines if you need to:
 
if the device haven't originally ran Android OS, e.g. Nokia N900
 
if the device haven't originally ran Android OS, e.g. Nokia N900
Line 42: Line 44:
 
| pmoskernel = 3.x.x
 
| pmoskernel = 3.x.x
 
see Unixbench page on wiki
 
see Unixbench page on wiki
| whet_dhry = 0.0
+
 
Is OTG available, not used in wiki
 
| status_otg = -
 
 
-->
 
-->
 
}}
 
}}
Line 63: Line 63:
  
 
== How to enter flash mode ==
 
== How to enter flash mode ==
 +
When the device is fully powered off, hold Power, Volume Down and Home for a few seconds.
 +
 +
A (turquoise) download mode warning screen should appear, press Volume Up to confirm.
  
 
== Installation ==
 
== Installation ==
<!-- add more sections below as necessary, e.g. Wifi, photos, ... -->
+
It is recommended to sideload an android recovery zip through TWRP for the easiest process, since heimdall freaks out about the subpartitions in SYSTEM and won't move past ~7%.
 +
You can use <code>pmbootstrap flasher flash_kernel</code> and then use netcat or similar to flash SYSTEM, but this is a longer and more redundant method.
 +
 
 +
<syntaxhighlight lang="shell-session">
 +
$ pmbootstrap install --android-recovery-zip
 +
$ pmbootstrap flasher --method=adb sideload
 +
</syntaxhighlight>
 +
 
 +
== Notes ==
 +
=== USB ===
 +
 
 +
Device is equipped with usb type-c receptacle. No UART JIG mode cable schematic available as of 04.01.2020. Available info:
 +
 
 +
* The receptacle is managed by s2mu004 kernel module. Module is capable to manage non type-c receptacles (see CONFIG_MUIC_S2MU004_NON_USB_C_TYPE option)
 +
* Receptacle has non standard pinout: B12 (considering, A row facing top, B row facing bottom side of the phone) pin is not connected to the ground.
 +
* Device can detect water in usb receptacle, by measuring resistance between B12 pin and ground.
 +
* Device can detect plug attach, with ALL pins unconnected, including GND and VBUS pins. How?
 +
* Attaching 619K resistor to B12 pin results in ADC_JIG_UART_ON value in ADC register, during water detection sequence.
 +
* Enter UART mode by attaching resistors should be possible in NON type-c mode. (file s2mu004-muic.c ,lines 2835,2797)
 +
* Device has no USB type-c debug accessory mode(tried both with rd/rd and rp/rp resistors)
 +
 
 +
 
 +
* UART mode detection most likely is implemented in muic firmware, if exists, or chip logic.
 +
 
 +
Open questions:
 +
* How device can detect plug attach, when ALL plug pins are unconnected.
 +
* How device detects UART debug cable attach?
 +
 
 +
=== Wlan ===
 +
 
 +
wifi module gets initialized after 180 seconds. This is due to missing firmware files, and 60 secs timeout.
 +
 
 +
=== UART cable ===
 +
<span style="color:red">'''Attention:''' Author is not responsible for any damage to your devices. Signal level is 1.8V. You may fry your board, using standard 3.3V - 5V UART.
 +
</span>
 +
 
 +
It is possible to connect to UART port(/dev/ttySAC2) on the mainboard. It is located on [https://wiki.postmarketos.org/wiki/File:A5y17lte_test_port.jpg pins 1(RX), 2(TX)] of the test port, and used by bootloader to log loading process.
 +
 
 +
==== Bill of materials ====
 +
* Adhesive tape
 +
* Precise soldering equipment
 +
* USB - UART converter (you need also level shifter, if converter does not support 1.8V signals. I used [https://electronics.stackexchange.com/questions/333229/1-8v-uart-with-3-3v-uart schematic on two transistors])
 +
* Breadboard
 +
* Wires
 +
* Thermal glue
 +
 
 +
 
 +
<gallery caption="Assembly photos" widths="240px" heights="180px">
 +
File:A5y17lte uart wires.jpg|Wires, soldered to UART port.
 +
File:A5y17lte uart assembly.jpg|a5y17lte, connected to USB - UART converter via level shifter.
 +
</gallery>
 +
 
 +
==== Enabling console output ====
 +
===== Downstream kernel =====
 +
* Build kernel with options:
 +
**CONFIG_CMDLINE="earlycon=exynos,0x13820000,115200n8 console=ttySAC2,115200"
 +
**CONFIG_CMDLINE_EXTEND=y
 +
* Optional (enable login console on ttySAC2)[https://wiki.alpinelinux.org/wiki/Enable_Serial_Console_on_Boot]:
 +
 
 +
=== Main board ===
 +
<gallery>
 +
File:A5y17lte test port.jpg|Test port pin numbering
 +
</gallery>
 +
 
 +
=== Mainlining ===
 +
 
 +
==== Exynos calibration table driver (ect_parser.c) ====
 +
Exynos calibration table driver - simple driver, that reads and parses predefined cpu address range. It has voltage, cpu, gpu frequency tables, and more.
 +
 
 +
Legacy driver uses __raw_read macro to access data.
 +
Calibration table resides in volatile cpu address region (probably loaded there by bootloader into RAM?). One can write to ect cpu address region
  
 
== See also ==
 
== See also ==
Line 75: Line 148:
 
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
 
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
 
-->
 
-->
<!--
+
 
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.
+
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-samsung-a5y17lte Device package]
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-DEVICE_CODENAME Device package]
+
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/linux-samsung-a5y17lte Kernel package]
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/linux-DEVICE_CODENAME Kernel package]
 
-->
 

Latest revision as of 11:03, 30 May 2020

Samsung Galaxy A5 (2017)
Samsung Galaxy A5
Samsung Galaxy A5
Manufacturer Samsung
Name Galaxy A5 (2017)
Codename samsung-a5y17lte
Released 2017
Category testing
Original software Android 6.0.1 - 8.0
postmarketOS kernel 3.18.14
Hardware
Chipset Exynos 7880
CPU 8x 1.9 GHz Cortex-A53
GPU Mali-T830 MP3
Display 5.2 inch 16:9, 1920 x 1080 pixel 424 PPI, capacitive, Super AMOLED, Corning Gorilla Glass 5, glossy: yes
Storage 32 GB
Memory 3 GB
Architecture aarch64
Unixbench Whet/Dhry score 1691.5
Features
USB Networking
Works
Flashing
Broken
Touchscreen
Works
Display
Works
WiFi
Works
Xwayland
Works
FDE
Mainline
Battery
Works
3D Acceleration
Accelerometer
Audio
Bluetooth
Camera
GPS
Mobile data
SMS
Calls
USB OTG
Works



Contributors

  • dsankouski

Maintainer(s)

Users owning this device


How to enter flash mode

When the device is fully powered off, hold Power, Volume Down and Home for a few seconds.

A (turquoise) download mode warning screen should appear, press Volume Up to confirm.

Installation

It is recommended to sideload an android recovery zip through TWRP for the easiest process, since heimdall freaks out about the subpartitions in SYSTEM and won't move past ~7%. You can use pmbootstrap flasher flash_kernel and then use netcat or similar to flash SYSTEM, but this is a longer and more redundant method.

$ pmbootstrap install --android-recovery-zip
$ pmbootstrap flasher --method=adb sideload

Notes

USB

Device is equipped with usb type-c receptacle. No UART JIG mode cable schematic available as of 04.01.2020. Available info:

  • The receptacle is managed by s2mu004 kernel module. Module is capable to manage non type-c receptacles (see CONFIG_MUIC_S2MU004_NON_USB_C_TYPE option)
  • Receptacle has non standard pinout: B12 (considering, A row facing top, B row facing bottom side of the phone) pin is not connected to the ground.
  • Device can detect water in usb receptacle, by measuring resistance between B12 pin and ground.
  • Device can detect plug attach, with ALL pins unconnected, including GND and VBUS pins. How?
  • Attaching 619K resistor to B12 pin results in ADC_JIG_UART_ON value in ADC register, during water detection sequence.
  • Enter UART mode by attaching resistors should be possible in NON type-c mode. (file s2mu004-muic.c ,lines 2835,2797)
  • Device has no USB type-c debug accessory mode(tried both with rd/rd and rp/rp resistors)


  • UART mode detection most likely is implemented in muic firmware, if exists, or chip logic.

Open questions:

  • How device can detect plug attach, when ALL plug pins are unconnected.
  • How device detects UART debug cable attach?

Wlan

wifi module gets initialized after 180 seconds. This is due to missing firmware files, and 60 secs timeout.

UART cable

Attention: Author is not responsible for any damage to your devices. Signal level is 1.8V. You may fry your board, using standard 3.3V - 5V UART.

It is possible to connect to UART port(/dev/ttySAC2) on the mainboard. It is located on pins 1(RX), 2(TX) of the test port, and used by bootloader to log loading process.

Bill of materials

  • Adhesive tape
  • Precise soldering equipment
  • USB - UART converter (you need also level shifter, if converter does not support 1.8V signals. I used schematic on two transistors)
  • Breadboard
  • Wires
  • Thermal glue


Enabling console output

Downstream kernel
  • Build kernel with options:
    • CONFIG_CMDLINE="earlycon=exynos,0x13820000,115200n8 console=ttySAC2,115200"
    • CONFIG_CMDLINE_EXTEND=y
  • Optional (enable login console on ttySAC2)[1]:

Main board

Mainlining

Exynos calibration table driver (ect_parser.c)

Exynos calibration table driver - simple driver, that reads and parses predefined cpu address range. It has voltage, cpu, gpu frequency tables, and more.

Legacy driver uses __raw_read macro to access data. Calibration table resides in volatile cpu address region (probably loaded there by bootloader into RAM?). One can write to ect cpu address region

See also