Giter Site home page Giter Site logo

map220v / sm8150-mainline Goto Github PK

View Code? Open in Web Editor NEW
29.0 5.0 15.0 3.1 GB

WIP Mainline kernel for Xiaomi Pad 5

License: Other

Makefile 0.20% Roff 0.02% C 98.33% Assembly 0.74% Shell 0.36% Perl 0.10% C++ 0.02% Awk 0.01% Python 0.19% sed 0.01% Yacc 0.01% Lex 0.01% UnrealScript 0.01% SmPL 0.01% Gherkin 0.01% XS 0.01% Raku 0.01% MATLAB 0.01% Clojure 0.01% M4 0.01%
nabu sm8150

sm8150-mainline's Introduction

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.

sm8150-mainline's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sm8150-mainline's Issues

The error about gpu...

I built debian rootfs and this kernel (ver. 6.8.0).
System boot successful but screen is black.
Firmware is cloned from https://github.com/map220v/ubuntu-xiaomi-nabu

This is log from kernel:
dmesg.log

I noticed this:
[ 0.456392] adreno 2c00000.gpu: [drm:adreno_zap_shader_load] *ERROR* Unable to load qcom/sm8150/xiaomi/nabu/a640_zap.mbn
[ 0.456482] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -2
I can confirm "a640_zap.mbn" has been placed at โ€œ/lib/firmware/qcom/sm8150/xiaomi/nabu/a640_zap.mbnโ€.But why is this?

Kernel panic - display black

Hi @map220v,

I've compiled the kernel 6.6 with the defconfig and the panel turns on after boot.

However, if the kernel attempts to suspend the panel I get the following panic.

Do you observe the same issue?

[  389.523109] ------------[ cut here ]------------
[  389.523130] disp_cc_mdss_vsync_clk status stuck at 'on'
[  389.523229] WARNING: CPU: 2 PID: 6360 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c
[  389.523292] Modules linked in: zstd zram zsmalloc nft_reject_inet nf_reject_ipv6 nf_reject_ipv4 nft_reject nft_ct nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_tables nfnetlink ipv6 snd_soc_wcd934x snd_soc_wcd_mbhc gpio_wcd934x soundwire_qcom snd_soc_wcd_classh q6asm_dai q6routing q6afe_dai q6afe_clocks q6adm q6afe wcd934x regmap_slimbus joydev q6asm snd_q6dsp_common q6core fastrpc qrtr_smd rpmsg_ctrl nt36523_ts hci_uart btbcm btqca bluetooth ecdh_generic ecc crct10dif_ce rtc_pm8xxx ath10k_snoc snd_soc_cs35l41_i2c snd_soc_cs35l41 ath10k_core snd_soc_wm_adsp cs_dsp spi_geni_qcom snd_soc_cs35l41_lib snd_soc_sm8150 snd_soc_qcom_common mac80211 soundwire_bus qcom_stats libarc4 coresight_tmc coresight_stm ath coresight_funnel coresight_replicator stm_core coresight cfg80211 qrtr rfkill qcom_wdt qcom_q6v5_pas slim_qcom_ngd_ctrl qcom_q6v5 qcom_common qcom_pil_info qcom_glink_smem qcom_sysmon
[  389.524038] CPU: 2 PID: 6360 Comm: kwin_wayland Not tainted 6.6.0-sm8150 #3-postmarketos-qcom-sm8150
[  389.524064] Hardware name: Xiaomi Pad 5 (DT)
[  389.524076] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  389.524099] pc : clk_branch_wait+0x144/0x15c
[  389.524133] lr : clk_branch_wait+0x144/0x15c
[  389.524161] sp : ffff800082bdb700
[  389.524174] x29: ffff800082bdb710 x28: 0000000000000001 x27: ffff3862c15542d0
[  389.524215] x26: 0000000000000000 x25: 0000000000000000 x24: ffff3862c1ac7780
[  389.524254] x23: ffffdf852b707da0 x22: 0000000000000000 x21: ffffdf852aabffa8
[  389.524293] x20: 0000000000000000 x19: ffffdf852bde60f8 x18: fffffffffffee530
[  389.524332] x17: 0000000000000014 x16: 0000000000000030 x15: 0000000000000038
[  389.524370] x14: 0000000000000000 x13: ffffdf852bc9f348 x12: 0000000000000915
[  389.524407] x11: 0000000000000307 x10: ffffdf852bcfbbf0 x9 : ffffdf852bc9f348
[  389.524445] x8 : 00000000ffffefff x7 : ffffdf852bcf7348 x6 : 0000000000000307
[  389.524482] x5 : ffff3863b937ed48 x4 : 40000000fffff307 x3 : ffff58de8da5f000
[  389.524520] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3862c6a35880
[  389.524559] Call trace:
[  389.524571]  clk_branch_wait+0x144/0x15c
[  389.524603]  clk_branch2_disable+0x2c/0x3c
[  389.524636]  clk_core_disable+0x60/0xac
[  389.524660]  clk_disable+0x30/0x4c
[  389.524683]  clk_bulk_disable+0x3c/0x58
[  389.524715]  dpu_runtime_suspend+0x38/0x90
[  389.524742]  pm_generic_runtime_suspend+0x2c/0x44
[  389.524777]  genpd_runtime_suspend+0xa8/0x254
[  389.524810]  __rpm_callback+0x48/0x1d8
[  389.524831]  rpm_callback+0x6c/0x78
[  389.524852]  rpm_suspend+0x10c/0x570
[  389.524871]  rpm_idle+0x114/0x194
[  389.524889]  __pm_runtime_idle+0x54/0x98
[  389.524909]  dpu_kms_disable_commit+0x1c/0x28
[  389.524930]  msm_atomic_commit_tail+0x344/0x50c
[  389.524957]  commit_tail+0xa0/0x188
[  389.524988]  drm_atomic_helper_commit+0x17c/0x194
[  389.525017]  drm_atomic_commit+0xac/0xe8
[  389.525041]  drm_mode_atomic_ioctl+0xa0c/0xce4
[  389.525065]  drm_ioctl_kernel+0xc8/0x16c
[  389.525096]  drm_ioctl+0x20c/0x4b4
[  389.525124]  __arm64_sys_ioctl+0xac/0xf0
[  389.525156]  invoke_syscall+0x48/0x110
[  389.525188]  el0_svc_common.constprop.0+0x40/0xe0
[  389.525217]  do_el0_svc+0x1c/0x28
[  389.525243]  el0_svc+0x40/0xe4
[  389.525267]  el0t_64_sync_handler+0x120/0x12c
[  389.525288]  el0t_64_sync+0x190/0x194
[  389.525312] ---[ end trace 0000000000000000 ]---
[  389.526644] ------------[ cut here ]------------
[  389.526648] disp_cc_mdss_mdp_clk status stuck at 'on'
[  389.526670] WARNING: CPU: 2 PID: 73 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c
[  389.526682] Modules linked in: zstd zram zsmalloc nft_reject_inet nf_reject_ipv6 nf_reject_ipv4 nft_reject nft_ct nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_tables nfnetlink ipv6 snd_soc_wcd934x snd_soc_wcd_mbhc
[  389.526711] [NVT-ts-spi] nvt_ts_suspend 1787: end
[  389.526715]  gpio_wcd934x soundwire_qcom snd_soc_wcd_classh q6asm_dai q6routing q6afe_dai q6afe_clocks q6adm q6afe wcd934x regmap_slimbus joydev q6asm snd_q6dsp_common q6core fastrpc qrtr_smd rpmsg_ctrl nt36523_ts hci_uart btbcm btqca bluetooth ecdh_generic ecc crct10dif_ce rtc_pm8xxx ath10k_snoc snd_soc_cs35l41_i2c snd_soc_cs35l41 ath10k_core snd_soc_wm_adsp cs_dsp spi_geni_qcom snd_soc_cs35l41_lib snd_soc_sm8150 snd_soc_qcom_common mac80211 soundwire_bus qcom_stats libarc4 coresight_tmc coresight_stm ath coresight_funnel coresight_replicator stm_core coresight cfg80211 qrtr rfkill qcom_wdt qcom_q6v5_pas slim_qcom_ngd_ctrl qcom_q6v5 qcom_common qcom_pil_info qcom_glink_smem qcom_sysmon
[  389.526828] CPU: 2 PID: 73 Comm: kworker/2:1 Tainted: G        W          6.6.0-sm8150 #3-postmarketos-qcom-sm8150
[  389.526834] Hardware name: Xiaomi Pad 5 (DT)
[  389.526838] Workqueue: pm pm_runtime_work
[  389.526845] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  389.526850] pc : clk_branch_wait+0x144/0x15c
[  389.526857] lr : clk_branch_wait+0x144/0x15c
[  389.526865] sp : ffff800080cdbb40
[  389.526867] x29: ffff800080cdbb50 x28: 0000000000000000 x27: 0000000000000000
[  389.526877] x26: 0000000000000000 x25: 0000000000000000 x24: ffff3862c22cd780
[  389.526885] x23: ffffdf852b707e60 x22: 0000000000000000 x21: ffffdf852aabffa8
[  389.526894] x20: 0000000000000000 x19: ffffdf852bde64f8 x18: fffffffffffef2d0
[  389.526903] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000038
[  389.526912] x14: 0000000000000000 x13: ffffdf852bc9f348 x12: 00000000000009ab
[  389.526922] x11: 0000000000000339 x10: ffffdf852bcfc0a0 x9 : ffffdf852bc9f348
[  389.526938] x8 : 00000000ffffefff x7 : ffffdf852bcf7348 x6 : 0000000000000339
[  389.526995] x5 : 0000000000000000 x4 : 40000000fffff339 x3 : 0000000000000000
[  389.527032] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3862c0322c40
[  389.527070] Call trace:
[  389.527080]  clk_branch_wait+0x144/0x15c
[  389.527112]  clk_branch2_disable+0x2c/0x3c
[  389.527142]  clk_core_disable+0x60/0xac
[  389.527164]  clk_disable+0x30/0x4c
[  389.527186]  clk_bulk_disable+0x3c/0x58
[  389.527216]  mdss_runtime_suspend+0x40/0x98
[  389.527241]  pm_generic_runtime_suspend+0x2c/0x44
[  389.527271]  genpd_runtime_suspend+0xa8/0x254
[  389.527301]  __rpm_callback+0x48/0x1d8
[  389.527320]  rpm_callback+0x6c/0x78
[  389.527339]  rpm_suspend+0x10c/0x570
[  389.527358]  pm_runtime_work+0xc4/0xc8
[  389.527377]  process_one_work+0x138/0x248
[  389.527406]  worker_thread+0x320/0x438
[  389.527429]  kthread+0x110/0x114
[  389.527452]  ret_from_fork+0x10/0x20
[  389.527476] ---[ end trace 0000000000000000 ]---
[  389.528048] ------------[ cut here ]------------
[  389.528059] disp_cc_mdss_ahb_clk status stuck at 'on'
[  389.528148] WARNING: CPU: 2 PID: 73 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c
[  389.528193] Modules linked in: zstd zram zsmalloc nft_reject_inet nf_reject_ipv6 nf_reject_ipv4 nft_reject nft_ct nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_tables nfnetlink ipv6 snd_soc_wcd934x snd_soc_wcd_mbhc gpio_wcd934x soundwire_qcom snd_soc_wcd_classh q6asm_dai q6routing q6afe_dai q6afe_clocks q6adm q6afe wcd934x regmap_slimbus joydev q6asm snd_q6dsp_common q6core fastrpc qrtr_smd rpmsg_ctrl nt36523_ts hci_uart btbcm btqca bluetooth ecdh_generic ecc crct10dif_ce rtc_pm8xxx ath10k_snoc snd_soc_cs35l41_i2c snd_soc_cs35l41 ath10k_core snd_soc_wm_adsp cs_dsp spi_geni_qcom snd_soc_cs35l41_lib snd_soc_sm8150 snd_soc_qcom_common mac80211 soundwire_bus qcom_stats libarc4 coresight_tmc coresight_stm ath coresight_funnel coresight_replicator stm_core coresight cfg80211 qrtr rfkill qcom_wdt qcom_q6v5_pas slim_qcom_ngd_ctrl qcom_q6v5 qcom_common qcom_pil_info qcom_glink_smem qcom_sysmon
[  389.528788] CPU: 2 PID: 73 Comm: kworker/2:1 Tainted: G        W          6.6.0-sm8150 #3-postmarketos-qcom-sm8150
[  389.528812] Hardware name: Xiaomi Pad 5 (DT)
[  389.528824] Workqueue: pm pm_runtime_work
[  389.528848] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  389.528871] pc : clk_branch_wait+0x144/0x15c
[  389.528901] lr : clk_branch_wait+0x144/0x15c
[  389.528929] sp : ffff800080cdbb40
[  389.528940] x29: ffff800080cdbb50 x28: 0000000000000000 x27: 0000000000000000
[  389.528979] x26: 0000000000000000 x25: 0000000000000000 x24: ffff3862c22cd780
[  389.529017] x23: ffffdf852b708028 x22: 0000000000000000 x21: ffffdf852aabffa8
[  389.529056] x20: 0000000000000000 x19: ffffdf852bde59f0 x18: fffffffffffefef8
[  389.529094] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000038
[  389.529131] x14: 0000000000000000 x13: ffffdf852bc9f348 x12: 0000000000000a26
[  389.529169] x11: 0000000000000362 x10: ffffdf852bcfc478 x9 : ffffdf852bc9f348
[  389.529206] x8 : 00000000ffffefff x7 : ffffdf852bcf7348 x6 : 0000000000000362
[  389.529243] x5 : 0000000000000000 x4 : 40000000fffff362 x3 : 0000000000000000
[  389.529280] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3862c0322c40
[  389.529316] Call trace:
[  389.529326]  clk_branch_wait+0x144/0x15c
[  389.529356]  clk_branch2_disable+0x2c/0x3c
[  389.529386]  clk_core_disable+0x60/0xac
[  389.529405]  clk_disable+0x30/0x4c
[  389.529427]  clk_bulk_disable+0x3c/0x58
[  389.529454]  mdss_runtime_suspend+0x40/0x98
[  389.529479]  pm_generic_runtime_suspend+0x2c/0x44
[  389.529507]  genpd_runtime_suspend+0xa8/0x254
[  389.529540]  __rpm_callback+0x48/0x1d8
[  389.529559]  rpm_callback+0x6c/0x78
[  389.529578]  rpm_suspend+0x10c/0x570
[  389.529597]  pm_runtime_work+0xc4/0xc8
[  389.529616]  process_one_work+0x138/0x248
[  389.529641]  worker_thread+0x320/0x438
[  389.529666]  kthread+0x110/0x114
[  389.529685]  ret_from_fork+0x10/0x20

Is it possiable to use xiaomi smart pen on linux?

We are now using nt36523 touchscreen driver from @lujianhua. And bdec745 has enabled pen support.
I am running xiaomi pad 5 pro with the same touchscreen driver and that enble-pen patch.
I bought a xiaomi smart pen and I can pair it via bluetooth by method from this XDA post. But only the two keys on pen works as PgUp and PgDn. I can see no events from command libinput-debug-events when drawing on touchscreen.

At the moment Windows has already supported xiaomi smart pen. So I guess there is still some work to get done on linux system side(kernel driver or userspace libinput?)

Here is my NVT driver log:

[    2.706031] [NVT-ts] nvt_ts_probe 1239: probe start
[    2.706183] [NVT-ts] nvt_ts_probe 1291: mode=0, max_speed_hz=19200000
[    2.706284] [NVT-ts] nvt_parse_dt 686: novatek,irq-gpio=585
[    2.706338] [NVT-ts] nvt_parse_dt 689: novatek,pen-support=1
[    2.706423] [NVT-ts] nvt_parse_dt 692: novatek,wgp-stylus=1
[    2.706476] [NVT-ts] nvt_parse_dt 699: SWRST_N8_ADDR=0x03F0FE
[    2.706561] [NVT-ts] nvt_parse_dt 708: SPI_RD_FAST_ADDR=0x03F310
[    2.706647] [NVT-ts] nvt_parse_dt 722: spi-max-frequency: 19200000
[    2.725357] [NVT-ts] nvt_ts_probe 1365: Set default fw_ver=0, x_num=32, y_num=50, abs_x_max=1600, abs_y_max=2560, max_button_num=0!
[    2.725536] input: NVTCapacitiveTouchScreen as /devices/virtual/input/input4
[    2.725721] input: NVTCapacitivePen as /devices/virtual/input/input5
[    2.725844] [NVT-ts] nvt_ts_probe 1453: int_trigger_type=1
[    2.726282] [NVT-ts] nvt_ts_probe 1462: request irq 197 succeed
[    2.726799] [NVT-ts] nvt_ts_probe 1495: NVT_TOUCH_ESD_PROTECT is 1
[    2.727158] [NVT-ts] nvt_ts_probe 1528: end
[    6.881416] [NVT-ts] update_firmware_request 302: filename is novatek/nt36523-boe.bin
[    6.884622] [NVT-ts] nvt_bin_header_parser 125: cascade_2nd_header_info = 1
[    6.884640] [NVT-ts] nvt_bin_header_parser 156: ovly_info = 0, ilm_dlm_num = 2, ovly_sec_num = 0, info_sec_num = 14, partition = 16
[    6.890497] [NVT-ts] nvt_tx_auto_copy_mode 328: tx auto copy mode enable
[    7.039066] [NVT-ts] nvt_update_firmware 821: Update firmware success! <154371 us>
[    7.039200] [NVT-ts] nvt_get_fw_info 644: fw_ver = 0x0B, fw_type = 0x01, x_num=32, y_num=50
[    7.039357] [NVT-ts] nvt_read_pid 581: PID=595C
[    7.039440] [NVT-ts] disable_pen_input_device 1180: ++
[    7.081529] [NVT-ts] disable_pen_input_device 1204: pen charge state is DISABLE, ENABLE pen input device
[    7.081544] [NVT-ts] disable_pen_input_device 1209: --
[    7.081643] [NVT-ts] nvt_get_fw_info 644: fw_ver = 0x0B, fw_type = 0x01, x_num=32, y_num=50
[    7.081768] [NVT-ts] nvt_read_pid 581: PID=595C

Does ln8000 automatically set charging voltage?

Does ln8000 know how to charge battery, set coltage and amperage (or it is controlled by driver) and low voltage and/or wattage when battery is full(Is this implemented)? And does PD PPS supported?(Or it doesnt need?)

Ln8000 typec charging voltage and it controller

Which driver control charging voltage, tcpm.c (saw things about PD and PPS) or ln8000_charger.c or ln8000_charger.c configure ln8000 and it automatically control PD VBUS? Which voltage is standart 5v, 9v or even 12v?

Adding fast charge patches from maverickjb kernel and plans about updating to 6.8

As i can see maverickjb have more advance fuel gauge and charge drivers. Any plans about adding his patches to your kernel? Or your charging driver already works well with xiaomi 33w charger or to support it need PD and PPS support patches? Does the RTC works in your kernel? And very important question is there any plans to updating your kernel to linux 6.8?

Does the drm suspend/wakeup works?

Does the drm/dsi suspend works, can i suspend my screen and the wakeup it without any crash and fatal for UX bugs.
One important question, does hibernate to disk works? Eg, no crashes after resuming from image

Huaxing panel

Hi @map220v ,

thanks for the port. Would you have any suggestion how to run this on the Xiaomi Pad 5 with the AMOLED Huaxing panel?

If use the patches on top of 6.6 I get the kernel booting but as soon as it switches the DRM on the panel it goes dark.

I looked into the Xiaomi Kernel source code repo on github for the definition of the panel as there's a nice project that can convert that into a driver, that needs some polishing.

I tried the Windows 11 on the tablet and the boot image with the UEFI support was able to driver the panel correctly.

Should I extract the dtb, convert it into the dts with dtc, then run the script to get the driver with the sequences and timings for the display? Or is there another way how to bring the panel to life?

https://github.com/MiCode/Xiaomi_Kernel_OpenSource -- nabu-r-oss

https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator

https://github.com/erdilS/Port-Windows-11-Xiaomi-Pad-5/blob/main/guide/English/2-install-en.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.