Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  HiBy R3Pro Saber 2022
« previous next »
  • Print
Pages: [1]

Author Topic: HiBy R3Pro Saber 2022  (Read 3457 times)

Offline vitt13

  • Member
  • *
  • Posts: 93
HiBy R3Pro Saber 2022
« on: May 19, 2024, 01:44:29 AM »
HiBy R3Pro Saber 2022

SoC:    Ingenic X1000E    1.0GHz MIPS XBurst with 64MB of SIP LPDDR RAM
NAND:    GD5F1GQ5UEYIG    GigaDevice 1 Gbit SPI NAND flash
       https://datasheet.lcsc.com/lcsc/2201201730_GigaDevice-Semicon-Beijing-GD5F1GQ5REYIGR_C2927042.pdf
DAC+HP Amp:    Two ES9219C https://www.esstech.com/wp-content/uploads/2021/02/ES9219_Datasheet_v1.0.4.pdf   
FPGA:    HBC3000 (probably customized GOWIN Semiconductor GW1NZ-LV1 Series FPGA https://cdn.gowinsemi.com.cn/DS841E.pdf Tempotec V3 has original marked GW1NZ-LV1 with similar pinout)
CD/MP3 Quality Stereo 2:1 Multiplexer with Click and Pop Elimination:
      ISL54405IRUZ-T   https://www.renesas.com/us/en/document/dst/isl54405-datasheet
PMU:    AXP202 https://dl.linux-sunxi.org/AXP/AXP202%20Datasheet_v1.0_en.pdf   
Fuel gauge:    CW2015 http://www.cellwise-semi.com/Public/assests/menu/20230302/6400076806706.pdf   
USB Type-C controller:    TCS1421
                edit: datasheet can be easily requested from CHSEMI by E-mail
                general info and pinout
                http://www.chsemi.com/pdf/USB_Type-C_Reference_Design_hw.pdf
                http://www.chsemi.com/pdf/USB_Type-C_Reference_Design_phone.pdf

LCD:    LCD-39575-003/111 https://drive.google.com/file/d/1TV0aJ76S8zi1RjxvOUng5tgJLa_nfNNA/view
This is a LG Panel with the name LH320H04-SD01 (this number can be found inside the panel too) which is build in the BlackBerry Curve 9380
https://www.reddit.com/r/Gameboy/comments/cx0ldl/the_display_of_the_funny_playing_ips_mod_is/

MIPI Master Bridge: SSD2805C    https://datasheet.lcsc.com/lcsc/1912111437_Solomon-Systech-SSD2805CG39R_C235734.pdf
The SSD2805 IC is a MIPI master bridge chip that connects a host processor with traditional parallel LCD interface and an LCD driver with MIPI slave interface. The SSD2805 supports parallel RGB and MCU interface and serial SPI interface.

Touch controller:    GT911 used driver GT9XX-TS, OF also has support for gslx680, FT6X06
      https://www.lcd-module.de/fileadmin/eng/pdf/zubehoer/GT911%20Programming%20Guide_20140804_Rev00.pdf

RGB LED status indicator:     LP5562   https://www.ti.com/lit/gpn/lp5562
Accellerometer: Kionix kx126 https://cdn.sparkfun.com/assets/2/f/6/f/c/KX126-1063.pdf
Bluetooth/WiFi:    AP6256 combo (BT BCM43456C5)    
Battery:    1600 mAh 3.7V 5.92Wh
« Last Edit: June 13, 2024, 02:46:03 PM by vitt13 »
Logged

Offline vitt13

  • Member
  • *
  • Posts: 93
Re: HiBy R3Pro Saber 2022
« Reply #1 on: May 19, 2024, 02:10:03 AM »
Original firmware 2.2 r3pro.upt https://drive.google.com/drive/folders/1AYTaybSWHtbzAS6NNOD88GH4mCc8l9SG
Internal photo
https://www.mediafire.com/file/2y1ilgk4muij8fm/Internal_photo.zip/file

To get USB boot mode hold two buttons (in powered off state): 'Power' and 'Forward' (>>)
To get original recovery hold two buttons (in powered off state): 'Power' and 'Volume Up' (Vol+)

Boot log in attachment and here is DAC/Audio related part of boot log:
I have no clue how to deal with FPGA based buffer since I didn't find any of completed Rockbox port on Ingenic SoC with SA2000/HBC2500 FPGA. There is reference to HBC2500A on ShanlingM2s https://www.rockbox.org/wiki/ShanlingM2sPort.html but the page https://www.rockbox.org/wiki/HBC2500A.html is missing.
Note: original firmware v2.2 is for three version of R3Pro - first revision has cs43131, second revision has es9218p and 2022 revision has es9219c.
Code: [Select]
[    1.864347]  gpio_request GPIO 19 , name r3pro_dac_choice
[    1.870148] CARD: cs43131 platform dac error
[    1.874607] cs43131-codec: probe of 1-0030 failed with error -22
[    1.880988]  gpio_request GPIO 19 , name r3pro_dac_choice
[    1.886888] GPIO 37 , name es9218 reset
[    1.891070]  gpio_request GPIO 37 , name es9218 reset
[    1.896423] GPIO 53 , name es9218 bal reset
[    1.900911]  gpio_request GPIO 53 , name es9218 bal reset
[    1.906615] GPIO 32 , name es9218 channel sel
[    1.911276]  gpio_request GPIO 32 , name es9218 channel sel
[    1.917717]  gpio_request GPIO 19 , name r3pro_dac_choice
[    1.924252] jz-asoc-aic jz-asoc-aic: Aic core probe success
[    1.930454] jz-asoc-aic-i2s jz-asoc-aic-i2s: i2s platform probe success
[    1.937589] jz-asoc-pcm jz-asoc-pcm: pcm platform probe success
[    1.944062] [HBC3K] hbc3000_driver_init
[    1.948242]  gpio_request GPIO 46 , name JTAG_GPIO_PORT_TDI
[    1.954151]  gpio_request GPIO 44 , name JTAG_GPIO_PORT_TDO
[    1.960083]  gpio_request GPIO 45 , name JTAG_GPIO_PORT_TMS
[    1.965964]  gpio_request GPIO 47 , name JTAG_GPIO_PORT_TCK
[    1.971887]  gpio_request GPIO 39 , name GPIO_HBC3000_PIN_RESET
[    1.978155]  gpio_request GPIO 40 , name GPIO_HBC3000_PIN_SDO
[    1.984189]  gpio_request GPIO 42 , name GPIO_HBC3000_PIN_CLK
[    1.990288]  gpio_request GPIO 41 , name GPIO_HBC3000_PIN_CS
[    1.996262]  gpio_request GPIO 43 , name HBC2500_PWR
[    2.001562]  gpio_request GPIO 72 , name HBC2500_PWR_1V2
[    2.007176] [HBC3K] hbc3000_probe finish.
[    2.011474] [HBC3K] hbc3000_init finish
[    2.015547]  gpio_request GPIO 19 , name r3pro_dac_choice
[    2.021334] CARD: es9218 platform card error
[    2.025798] ingenic-r3pro-cs43131: probe of ingenic-r3pro-cs43131 failed with error -22
[    2.034282]  gpio_request GPIO 19 , name r3pro_dac_choice
[    2.040074]  gpio_request GPIO 54 , name r3pro_mute
[    2.045434] codec->dev =80696f10
[    2.049513] dma dma0chan4: Channel 4 have been requested.(phy id 3,type 0x06 desc a2190000)
[    2.067237] ingenic-r3pro-es9218 ingenic-r3pro-es9218:  es9218-hifi <-> jz-asoc-aic-i2s mapping ok
[    2.077057] dma dma0chan2: Channel 2 have been requested.(phy id 5,type 0x20 desc a2192000)
[    2.094952] ingenic-r3pro-es9218 ingenic-r3pro-es9218:  es9218-hifi <-> jz-asoc-pcm mapping ok
[    2.105335] sa_spdif_device_init success
[    2.119303] sa_spdif sa_spdif.0:  spdif dump dai <-> jz-asoc-aic-spdif mapping ok
[    2.129725] SWITCH: init OK
* boot_log.txt (33.77 kB - downloaded 155 times.)
« Last Edit: May 19, 2024, 05:22:14 AM by vitt13 »
Logged

Offline vitt13

  • Member
  • *
  • Posts: 93
Re: HiBy R3Pro Saber 2022
« Reply #2 on: June 05, 2024, 04:00:57 AM »
Here is original bootloader (mtd0 dump without OOB) that I got from the device (rename r3pro_mtd0.txt to r3pro_mtd0.zip).
* r3pro_mtd0.zip.txt (162.58 kB - downloaded 149 times.)
Logged

Offline vitt13

  • Member
  • *
  • Posts: 93
Re: HiBy R3Pro Saber 2022
« Reply #3 on: June 05, 2024, 09:23:05 AM »
Mounting debugfs with
Code: [Select]
mount -t debugfs debugfs /sys/kernel/debugI was able to get some useful info.

GPIO
Code: [Select]
GPIOs 0-31, GPIO A:
 gpio-16  (lcd rst             ) out lo
 gpio-17  (usb-insert-detect   ) in  lo

GPIOs 32-63, GPIO B:
 gpio-32  (es9218 channel sel  ) out lo
 gpio-35  (GPIO_AMP_PWR        ) out lo
 gpio-37  (es9218 reset        ) out lo
 gpio-38  (mmc_power           ) out hi
 gpio-39  (GPIO_HBC3000_PIN_RES) out lo
 gpio-40  (GPIO_HBC3000_PIN_SDO) out lo
 gpio-41  (GPIO_HBC3000_PIN_CS ) out hi
 gpio-42  (GPIO_HBC3000_PIN_CLK) out lo
 gpio-43  (HBC2500_PWR         ) out lo
 gpio-44  (JTAG_GPIO_PORT_TDO  ) in  lo
 gpio-45  (JTAG_GPIO_PORT_TMS  ) out lo
 gpio-46  (JTAG_GPIO_PORT_TDI  ) out lo
 gpio-47  (JTAG_GPIO_PORT_TCK  ) out lo
 gpio-48  (lcd rd              ) out lo
 gpio-51  (lcd vsync           ) in  lo
 gpio-53  (es9218 bal reset    ) out lo
 gpio-54  (r3pro_mute          ) out lo
 gpio-57  (drvvbus_pin         ) out lo
 gpio-58  (rtc32k              ) in  lo
 gpio-60  (prev key            ) in  hi
 gpio-63  (power key           ) in  hi

GPIOs 64-95, GPIO C:
 gpio-72  (HBC2500_PWR_1V2     ) out lo
 gpio-80  (oob_irq             ) in  lo
 gpio-81  (wifi_reset          ) out lo
 gpio-82  (bt_reg_on           ) out hi
 gpio-83  (host_wake_bt        ) out hi
 gpio-84  (bt_wake_host        ) in  lo
 gpio-85  (axp_irq             ) in  hi
 gpio-86  (mmc_detect          ) in  lo
 gpio-87  (GTP_INT_IRQ         ) out lo
 gpio-88  (lcd power           ) out hi
 gpio-89  (BL PWR              ) in  lo

GPIOs 96-101, GPIO D:
 gpio-98  (otg-id-detect       ) in  hi
 gpio-99  (GTP_RST_PORT        ) out lo
 gpio-100 (lp5562_en           ) out hi

mmc0 and mmc1 (actually it has only one physical microSD slot, I guess that is mmc0
Code: [Select]
# cat /sys/kernel/debug/mmc0/ios
clock:          48000000 Hz
vdd:            15 (2.7 ~ 2.8 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage: 0 (3.30 V)

# cat /sys/kernel/debug/mmc1/ios
clock:          48000000 Hz
vdd:            20 (3.2 ~ 3.3 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage: 0 (3.30 V)

USB devices
Code: [Select]
# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.10
S:  Manufacturer=Linux 3.10.14 dwc2-hcd
S:  Product=DesignWare USB2.0 High-Speed Host Controller
S:  SerialNumber=dwc2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

I2C devices
Code: [Select]
# cat /sys/class/i2c-adapter/i2c-0/0-0038/name
ft6x06_ts

# cat /sys/class/i2c-adapter/i2c-0/0-0040/name
gslX680_ts

# cat /sys/class/i2c-adapter/i2c-0/0-005d/name
GT9XX-TS

# cat /sys/class/i2c-adapter/i2c-1/1-0030/name
cs43131-codec

# cat /sys/class/i2c-adapter/i2c-1/1-003d/name
sau

# cat /sys/class/i2c-adapter/i2c-1/1-0048/name
es9218

# cat /sys/class/i2c-adapter/i2c-2/2-001e/name
kx126

# cat /sys/class/i2c-adapter/i2c-2/2-0030/name
lp5562

# cat /sys/class/i2c-adapter/i2c-2/2-0034/name
axp_mfd

# cat /sys/class/i2c-adapter/i2c-2/2-0062/name
cw201x

Power supply map
Code: [Select]
# cat /sys/kernel/debug/regulator/
GPIO_AMP_PWR/     axp_buck3/        axp_ldo3/         regulator-dummy/
axp_buck1/        axp_ldo1/         axp_ldo4/         supply_map
axp_buck2/        axp_ldo2/         axp_ldoio0/

# cat /sys/kernel/debug/regulator/supply_map
axp_ldoio0 -> (null).ldoio0
axp_buck3 -> (null).vdd_cpu
axp_buck2 -> (null).vdd_core
axp_buck1 -> (null).dcdc1
axp_ldo4 -> (null).ldo4
axp_ldo3 -> (null).ldo3
axp_ldo2 -> (null).ldo2
axp_ldo1 -> (null).ldo1
GPIO_AMP_PWR -> (null).es9218-avcc18
GPIO_AMP_PWR -> (null).es9218-avcc33
GPIO_AMP_PWR -> (null).es9218-vcca
GPIO_AMP_PWR -> (null).es9218-avdd
GPIO_AMP_PWR -> (null).hbc-power

AXP battery configuration
Code: [Select]
# cat /sys/class/power_supply/axp_battery/voltage_max_design
4200

# cat /sys/class/power_supply/axp_battery/voltage_min_design
3400

# cat /sys/class/power_supply/axp_battery/uevent
POWER_SUPPLY_NAME=axp_battery
POWER_SUPPLY_MODEL_NAME=axp_battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3400
POWER_SUPPLY_VOLTAGE_NOW=4000000
POWER_SUPPLY_CURRENT_NOW=127000
POWER_SUPPLY_ENERGY_FULL_DESIGN=1900
POWER_SUPPLY_CAPACITY=0
POWER_SUPPLY_TEMP=300

Regmap (for ES9218) actually cannot read
Code: [Select]
# cat /sys/kernel/debug/regmap/1-0048/
access        cache_dirty   name          rbtree
cache_bypass  cache_only    range         registers
# cat /sys/kernel/debug/regmap/1-0048/name
es9218
# cat /sys/kernel/debug/regmap/1-0048/range
0-4b
# cat /sys/kernel/debug/regmap/1-0048/registers
(cannot read):
[  ] i2c i2c-1: i2c_jz_irq 449, I2C transfer error, ABORT interrupt
[  ] i2c i2c-1: --I2C txabrt:
[  ] i2c i2c-1: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK
Logged

Offline vitt13

  • Member
  • *
  • Posts: 93
Re: HiBy R3Pro Saber 2022
« Reply #4 on: June 06, 2024, 09:50:03 AM »
There are 7 input devices. I think we have to care about only two (three) of them - buttons related devices and touch screen device.
There are also remote control by wired earpods and accelerometer but I don't think we really need this in Rockbox.
There was disappoint that only tho physical buttons are on GPIO, the others are related to unknown ADC device.
Here is some info
Code: [Select]
# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0002 Version=0100
N: Name="earpods_adc"
P: Phys=earpods-adc/input0
S: Sysfs=/devices/platform/earpods_adc.0/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=10000 138 0 0 0 0 0

I: Bus=0019 Vendor=0001 Product=0010 Version=0100
N: Name="adc_key"
P: Phys=adc_key/input0
S: Sysfs=/devices/platform/adc_key.0/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=18 0 c0000 0 0 0

I: Bus=0018 Vendor=0038 Product=0000 Version=0000
N: Name="kx126-accel"
P: Phys=
S: Sysfs=/devices/platform/jz-i2c.2/i2c-2/2-001e/input/input2
U: Uniq=
H: Handlers=event2
B: PROP=0
B: EV=9
B: ABS=7

I: Bus=0018 Vendor=0038 Product=0000 Version=0000
N: Name="kx126-stepdet"
P: Phys=
S: Sysfs=/devices/platform/jz-i2c.2/i2c-2/2-001e/input/input3
U: Uniq=
H: Handlers=event3
B: PROP=0
B: EV=9
B: ABS=100 0

I: Bus=0018 Vendor=0038 Product=0000 Version=0000
N: Name="kx126-stepcnt"
P: Phys=
S: Sysfs=/devices/platform/jz-i2c.2/i2c-2/2-001e/input/input4
U: Uniq=
H: Handlers=event4
B: PROP=0
B: EV=9
B: ABS=100 0

I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio-keys/input/input5
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=3
B: KEY=20 0 100000 0 0 0

I: Bus=0018 Vendor=dead Product=beef Version=28bb
N: Name="GT9XX-TS"
P: Phys=Ȥ▒▒▒HR▒i▒0▒▒i▒0▒▒
S: Sysfs=/devices/virtual/input/input6
U: Uniq=main_ts
H: Handlers=kbd event6
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 40000800 40 0 0 0
B: ABS=2650000 0

Here is output info from evtest utility
Input device name: "adc_key"
Code: [Select]
Available devices:
/dev/input/event0:      earpods_adc
/dev/input/event1:      adc_key
/dev/input/event2:      kx126-accel
/dev/input/event3:      kx126-stepdet
/dev/input/event4:      kx126-stepcnt
/dev/input/event5:      gpio-keys
/dev/input/event6:      GT9XX-TS
Select the device event number [0-6]:
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x10 version 0x100
Input device name: "adc_key"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 163 (KEY_NEXTSONG)
    Event code 164 (KEY_PLAYPAUSE)
Properties:
Testing ... (interrupt to exit)
Event: time 1717572858.161343, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1
Event: time 1717572858.161343, -------------- SYN_REPORT ------------
Event: time 1717572858.331344, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0
Event: time 1717572858.331344, -------------- SYN_REPORT ------------
Event: time 1717572866.361343, type 1 (EV_KEY), code 163 (KEY_NEXTSONG), value 1
Event: time 1717572866.361343, -------------- SYN_REPORT ------------
Event: time 1717572866.681755, type 1 (EV_KEY), code 163 (KEY_NEXTSONG), value 0
Event: time 1717572866.681755, -------------- SYN_REPORT ------------
Event: time 1717572896.781336, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1717572896.781336, -------------- SYN_REPORT ------------
Event: time 1717572896.931329, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1717572896.931329, -------------- SYN_REPORT ------------
Event: time 1717572898.161345, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1717572898.161345, -------------- SYN_REPORT ------------
Event: time 1717572898.331342, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1717572898.331342, -------------- SYN_REPORT ------------
Input device name: "gpio-keys"
Code: [Select]
Select the device event number [0-6]: 5
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 116 (KEY_POWER)
    Event code 165 (KEY_PREVIOUSSONG)
Properties:
Testing ... (interrupt to exit)
Event: time 1717572955.389456, type 1 (EV_KEY), code 165 (KEY_PREVIOUSSONG), value 1
Event: time 1717572955.389456, -------------- SYN_REPORT ------------
Event: time 1717572955.573842, type 1 (EV_KEY), code 165 (KEY_PREVIOUSSONG), value 0
Event: time 1717572955.573842, -------------- SYN_REPORT ------------
Event: time 1717572956.583762, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1717572956.583762, -------------- SYN_REPORT ------------
Event: time 1717572956.781806, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1717572956.781806, -------------- SYN_REPORT ------------
Input device name: "GT9XX-TS"
Code: [Select]
Select the device event number [0-6]: 6
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0xdead product 0xbeef version 0x28bb
Input device name: "GT9XX-TS"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 102 (KEY_HOME)
    Event code 139 (KEY_MENU)
    Event code 158 (KEY_BACK)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max      255
    Event code 50 (ABS_MT_WIDTH_MAJOR)
      Value      0
      Min        0
      Max      255
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max      360
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max      480
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max      255
Properties:
  Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)

tap on top left corner
Event: time 1717573100.261544, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1717573100.261544, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 13
Event: time 1717573100.261544, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 16
Event: time 1717573100.261544, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 22
Event: time 1717573100.261544, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 22
Event: time 1717573100.261544, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1717573100.261544, ++++++++++++++ SYN_MT_REPORT ++++++++++++
...same listing by 4 times...
Event: time 1717573100.381512, -------------- SYN_REPORT ------------
Event: time 1717573100.411504, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1717573100.411504, -------------- SYN_REPORT ------------

tap on top right corner
Event: time 1717573128.081561, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1717573128.081561, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 353
Event: time 1717573128.081561, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 16
Event: time 1717573128.081561, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 15
Event: time 1717573128.081561, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 15
Event: time 1717573128.081561, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1717573128.081561, ++++++++++++++ SYN_MT_REPORT ++++++++++++
...same listing by 4 times...
Event: time 1717573128.201502, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 1717573128.201502, -------------- SYN_REPORT ------------
Event: time 1717573128.231509, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1717573128.231509, -------------- SYN_REPORT ------------

tap on bottom left corner
Event: time 1717573146.691516, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1717573146.691516, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 16
Event: time 1717573146.691516, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 459
Event: time 1717573146.691516, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 30
Event: time 1717573146.691516, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 30
Event: time 1717573146.691516, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1717573146.691516, ++++++++++++++ SYN_MT_REPORT ++++++++++++
...same listing by 3 times...
Event: time 1717573146.751508, -------------- SYN_REPORT ------------
Event: time 1717573146.781508, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1717573146.781508, -------------- SYN_REPORT ------------

tap on bottom right corner
Event: time 1717573170.591513, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1717573170.591513, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 340
Event: time 1717573170.591513, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 458
Event: time 1717573170.591513, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 30
Event: time 1717573170.591513, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 30
Event: time 1717573170.591513, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1717573170.591513, ++++++++++++++ SYN_MT_REPORT ++++++++++++
...same listing by 3 times...
Event: time 1717573170.681557, -------------- SYN_REPORT ------------
Event: time 1717573170.711562, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1717573170.711562, -------------- SYN_REPORT ------------
Logged

Offline vitt13

  • Member
  • *
  • Posts: 93
Re: HiBy R3Pro Saber 2022
« Reply #5 on: January 23, 2025, 01:26:37 AM »
Here is Linux kernel source code for HiBy R players (HiBy OS based) https://www.reddit.com/r/Hiby/comments/1i5q7ac/comment/m85skc5/
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: HiBy R3Pro Saber 2022
« Reply #6 on: January 23, 2025, 10:07:57 AM »
Quote from: vitt13 on January 23, 2025, 01:26:37 AM
Here is Linux kernel source code for HiBy R players (HiBy OS based) https://www.reddit.com/r/Hiby/comments/1i5q7ac/comment/m85skc5/

It's a kernel source dump for the HiBy R1 only.

The R3 series at least uses a _very_ different kernel  (3.10.14, vs 4.4.94 for the R1)

Logged

Offline vitt13

  • Member
  • *
  • Posts: 93
Re: HiBy R3Pro Saber 2022
« Reply #7 on: April 08, 2025, 12:00:05 PM »
Similar to Tempotec V3 Blaze, HiBy is released updated R3II 2025 that is also has useful kernel module drivers that can be easy decompile in Ghidra.
R3II 2025 is quite different but some of drivers are common in R3Pro Saber 2022 and can help me to understand digital sound pass to dual ES9219 DACs and FPGA.
https://oss.hiby.com/HiBy R3II_2025/en-us/1.1/r3ii_2025.upt

Code: [Select]
axp2101.ko
codec_es9219.ko
cw2015.ko
cywdhd.ko
gt9xx_touch.ko
i2c_gpio_add.ko
keyboard_adc.ko
keyboard_gpio_add.ko
keyboard_ring.ko
lcd_st77903_8bit.ko
leds_sgm31324_add.ko
pwm_backlight.ko
rmem_manager.ko
sa_config_module.ko
sa_earpods_adc.ko
sa_hgl_dma.ko
sa_sound_hbc3000.ko
sa_sound_switch.ko
soc_adc.ko
soc_aic.ko
soc_efuse.ko
soc_fb.ko
soc_gpio.ko
soc_i2c.ko
soc_msc.ko
soc_pwm.ko
soc_utils.ko
tcs1421_add.ko
utils.ko
x1600_hiby_r3ii_sound_card.ko
Logged

Offline 7o9

  • Member
  • *
  • Posts: 160
Re: HiBy R3Pro Saber 2022
« Reply #8 on: April 08, 2025, 03:25:13 PM »
HiBy R1 and R3II 2025 use very similar firmware, potentially even a shared one (besides some different hardware drivers).

The added features and firmware change log are typically identical too.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: HiBy R3Pro Saber 2022
« Reply #9 on: April 08, 2025, 09:39:54 PM »
All of the non-Android Hiby devices (and many more from other manufacturers) are built on the same underlying software framework ("hibyos"), with the messy details nearly entirely handled by custom, per-device kernel drivers and existing platform daemons+scripts.

Rockbox has already been ported to multiple hibyos devices.  To port it to another one just needs to handle:

 * Display properties
 * Button layout
 * Audio output switcher and mixer names
 * Power management properties (battery and charging device names, plus discharge curves)

Logged

Offline 7o9

  • Member
  • *
  • Posts: 160
Re: HiBy R3Pro Saber 2022
« Reply #10 on: April 09, 2025, 10:34:08 AM »
You make it sound relatively easy.

I have tried (failed) to repack the firmware for the HiBy R1 in an attempt to run something custom on it.

The information in the list you provide would be enough for a hosted port?

I am sure I can provide most of that for the R1 based on disassembly of the firmware/driver .ko’s. All drivers are provided as modules and decompile very well.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: HiBy R3Pro Saber 2022
« Reply #11 on: April 09, 2025, 06:46:36 PM »
Quote from: 7o9 on April 09, 2025, 10:34:08 AM
You make it sound relatively easy.

It is, relatively.  :D

Quote from: 7o9 on April 09, 2025, 10:34:08 AM
I have tried (failed) to repack the firmware for the HiBy R1 in an attempt to run something custom on it.

The usual reason for this failing is because you didn't extract (or repack) the firmware as root.  If you don't, certain files will not end up with the correct permissions.

Quote from: 7o9 on April 09, 2025, 10:34:08 AM
The information in the list you provide would be enough for a hosted port?

The AGPTek Rocker was the first port to hibyos, and the X3II, X20, and hosted ErosQ/K ports were relatively minor tweaks from there.

You only need to build enough to get the "bootloader" (ie a glorified boot menu) to build, for this you need to have the basic display stuff (eg dimensions, resolution) and how to map the various buttons (ie /dev/input*) into something useful.  Next you'll need to figure out power management and how to talk to the audio hardware, and from there you should be able to do a plugin-less build.  Getting the plugins building will require creating keymaps for many (if not most) of them.  It's still a bit of work, but far, far less than a native port would be.

Quote from: 7o9 on April 09, 2025, 10:34:08 AM
I am sure I can provide most of that for the R1 based on disassembly of the firmware/driver .ko’s. All drivers are provided as modules and decompile very well.

To create a new native port, you need to effectively reverse-engineer the hardware schematic to figure out how things are connected.  Disassembly of the original firmware can help with that, and of course it should hopefully be able to tell you how to talk to some of the custom hardware.  FWIW it's possible (if not likely) that the FPGA stuff is handled by the bootloader before Linux ever starts.

( See https://www.rockbox.org/wiki/NewPort )
Logged

Offline Milardo

  • Member
  • *
  • Posts: 94
Re: HiBy R3Pro Saber 2022
« Reply #12 on: April 09, 2025, 07:20:06 PM »
Quote from: speachy on April 09, 2025, 06:46:36 PM
Quote from: 7o9 on April 09, 2025, 10:34:08 AM
You make it sound relatively easy.

It is, relatively.  :D

Quote from: 7o9 on April 09, 2025, 10:34:08 AM
I have tried (failed) to repack the firmware for the HiBy R1 in an attempt to run something custom on it.

The usual reason for this failing is because you didn't extract (or repack) the firmware as root.  If you don't, certain files will not end up with the correct permissions.

Quote from: 7o9 on April 09, 2025, 10:34:08 AM
The information in the list you provide would be enough for a hosted port?

The AGPTek Rocker was the first port to hibyos, and the X3II, X20, and hosted ErosQ/K ports were relatively minor tweaks from there.

You only need to build enough to get the "bootloader" (ie a glorified boot menu) to build, for this you need to have the basic display stuff (eg dimensions, resolution) and how to map the various buttons (ie /dev/input*) into something useful.  Next you'll need to figure out power management and how to talk to the audio hardware, and from there you should be able to do a plugin-less build.  Getting the plugins building will require creating keymaps for many (if not most) of them.  It's still a bit of work, but far, far less than a native port would be.

Quote from: 7o9 on April 09, 2025, 10:34:08 AM
I am sure I can provide most of that for the R1 based on disassembly of the firmware/driver .ko’s. All drivers are provided as modules and decompile very well.

To create a new native port, you need to effectively reverse-engineer the hardware schematic to figure out how things are connected.  Disassembly of the original firmware can help with that, and of course it should hopefully be able to tell you how to talk to some of the custom hardware.  FWIW it's possible (if not likely) that the FPGA stuff is handled by the bootloader before Linux ever starts.

( See https://www.rockbox.org/wiki/NewPort )

Looking at the Hiby R1, it has some sort of "developer mode" ?

https://www.amazon.com/HiBy-Bluetooth-Certified-Touchscreen-Expanded/dp/B0DKTF38HX?th=1

Would that help in getting rockbox on that player?

Also, would the touchscreen pose any large problems since there aren't physical buttons for mapping? I don't know of any player that is touchscreen based that is rockbox compatible, maybe there is a cowon one?

It would be nice to have more options for rockbox compatible players especially since the Hiby R1 is lower priced than  AIGO EROS Q / AIGO EROS K / IRULU Surfans F20 / AGPTek H3 / HIFI WALKER H2
« Last Edit: April 09, 2025, 09:24:11 PM by Milardo »
Logged

Offline 7o9

  • Member
  • *
  • Posts: 160
Re: HiBy R3Pro Saber 2022
« Reply #13 on: April 10, 2025, 01:50:32 PM »
The ‘developer mode’ is nonsense, all it does is let you raise the volume limit. There is nothing ‘developer’ about it.

The R1 has a touchscreen but also physical buttons on the side.

The Shanling Q1 is a touch screen device that runs Rockbox great.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  HiBy R3Pro Saber 2022
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.147 seconds with 22 queries.