Skip to content

arm64: Add initial support for MSM8952, Add support for generalmobile-shamrock - #58

Open
kadir1243 wants to merge 37 commits into
msm89x7-mainline:msm89x7/7.1.3from
kadir1243:msm89x7/7.1.3
Open

kadir1243 wants to merge 37 commits into
msm89x7-mainline:msm89x7/7.1.3from
kadir1243:msm89x7/7.1.3

Conversation

@kadir1243

@kadir1243 kadir1243 commented Jul 28, 2026 •

Copy link
Copy Markdown

Ported from mostly working downstream
No reference other than this downstream kernel used. Only exception is pinctrl driver, it is copied from here

Currently working:

  • Boots
  • Storage
  • Display
  • Power and Volume buttons
  • Usb connection works with dummy extcon
  • Ramoops
  • i2c
  • Camera
  • Gpu itself
  • Modem remote proc
  • Tsens seems working

Not tested yet:

  • 3d accel from gpu
  • Modem sim functions

Currently Broken:

  • Wcnss
  • Sound

If you want to here is dmesg: https://gist.github.com/kadir1243/fb923f7eeb0c7925cbab6be29f168065

@kadir1243 kadir1243 changed the title arm64: dts: qcom: Add initial support for MSM8952 arm64: Add initial support for MSM8952, Add support for generalmobile-shamrock Jul 28, 2026
@kadir1243
kadir1243 force-pushed the msm89x7/7.1.3 branch 4 times, most recently from 012cc28 to a5dc647 Compare August 1, 2026 13:34

@okias okias left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to see the msm8952

Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts
Comment thread arch/arm64/boot/dts/qcom/msm8952-generalmobile-shamrock.dts Outdated
@okias

okias commented Aug 5, 2026

Copy link
Copy Markdown

you may want to look at https://github.com/okias/linux/tree/b4/motorola-athene

this effort (when I found your work) was independently clanked, but... in general the code quality looks reasonable, reused pieces from mainline kernel, pretty much make sense. Try to steal as much as make sense to you :)

Just to be clear, myself, I'm not going to upstream it. But if YOU or anyone with more devices and interest in MSM8952 will be, I'm definitely giving a hand. (and likely I'll upstream the drm/msm bits I understand well enough and are self-contained).

@kadir1243
kadir1243 force-pushed the msm89x7/7.1.3 branch 4 times, most recently from 9b2570f to 7c97fac Compare August 14, 2026 20:05
@kadir1243
kadir1243 force-pushed the msm89x7/7.1.3 branch 4 times, most recently from b83070d to ec25487 Compare August 23, 2026 15:27
Add a device tree binding to describe clocks, resets and power domains
provided by the global clock controller on MSM8952 SoC.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
@kadir1243
kadir1243 force-pushed the msm89x7/7.1.3 branch 2 times, most recently from 91acb23 to 166762c Compare August 27, 2026 13:50
ylecuyer pushed a commit to ylecuyer/linux that referenced this pull request Aug 27, 2026
Currently, cacheline group macros trigger checkpatch warnings.
For example:

  $ ./scripts/checkpatch.pl -g ba7e025a6c84aed012421468d83639e5dae982b0
  WARNING: Missing a blank line after declarations
  msm89x7-mainline#58: FILE: drivers/gpio/gpio-virtio.c:32:
  +	struct virtio_gpio_response res;
  +	__dma_from_device_group_end();

  $ ./scripts/checkpatch.pl -g 5d4cc87
  WARNING: Missing a blank line after declarations
  msm8916-mainline#267: FILE: include/net/sock.h:431:
  +	int			sk_rcvlowat;
  +	__cacheline_group_end(sock_read_rx);

But these are not actually statements - the following macros
all expand to zero-length fields:
  __cacheline_group_begin()
  __cacheline_group_end()
  __cacheline_group_begin_aligned()
  __cacheline_group_end_aligned()
  __dma_from_device_group_begin()
  __dma_from_device_group_end()

Add them to $declaration_macros so checkpatch recognizes this fact.

Message-ID: <b345bb7e2d4e23672e3e5d1b283754dc11c7d8cd.1767647872.git.mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ylecuyer pushed a commit to ylecuyer/linux that referenced this pull request Aug 27, 2026
parse_durable_handle_context() unconditionally assigns dh_info->fp->conn
to the current connection when handling a DURABLE_REQ_V2 context with
SMB2_FLAGS_REPLAY_OPERATION. ksmbd_lookup_fd_cguid() does not filter by
fp->conn, so it returns file handles that are already actively connected.
The unconditional overwrite replaces fp->conn, and when the overwriting
connection is subsequently freed, __ksmbd_close_fd() dereferences the
stale fp->conn via spin_lock(&fp->conn->llist_lock), causing a
use-after-free.

KASAN report:

[    7.349357] ==================================================================
[    7.349607] BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x75/0xe0
[    7.349811] Write of size 4 at addr ffff8881056ac18c by task kworker/1:2/108
[    7.350010]
[    7.350064] CPU: 1 UID: 0 PID: 108 Comm: kworker/1:2 Not tainted 7.0.0-rc3+ msm89x7-mainline#58 PREEMPTLAZY
[    7.350068] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[    7.350070] Workqueue: ksmbd-io handle_ksmbd_work
[    7.350083] Call Trace:
[    7.350087]  <TASK>
[    7.350087]  dump_stack_lvl+0x64/0x80
[    7.350094]  print_report+0xce/0x660
[    7.350100]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[    7.350101]  ? __pfx___mod_timer+0x10/0x10
[    7.350106]  ? _raw_spin_lock+0x75/0xe0
[    7.350108]  kasan_report+0xce/0x100
[    7.350109]  ? _raw_spin_lock+0x75/0xe0
[    7.350114]  kasan_check_range+0x105/0x1b0
[    7.350116]  _raw_spin_lock+0x75/0xe0
[    7.350118]  ? __pfx__raw_spin_lock+0x10/0x10
[    7.350119]  ? __call_rcu_common.constprop.0+0x25e/0x780
[    7.350125]  ? close_id_del_oplock+0x2cc/0x4e0
[    7.350128]  __ksmbd_close_fd+0x27f/0xaf0
[    7.350131]  ksmbd_close_fd+0x135/0x1b0
[    7.350133]  smb2_close+0xb19/0x15b0
[    7.350142]  ? __pfx_smb2_close+0x10/0x10
[    7.350143]  ? xas_load+0x18/0x270
[    7.350146]  ? _raw_spin_lock+0x84/0xe0
[    7.350148]  ? __pfx__raw_spin_lock+0x10/0x10
[    7.350150]  ? _raw_spin_unlock+0xe/0x30
[    7.350151]  ? ksmbd_smb2_check_message+0xeb2/0x24c0
[    7.350153]  ? ksmbd_tree_conn_lookup+0xcd/0xf0
[    7.350154]  handle_ksmbd_work+0x40f/0x1080
[    7.350156]  process_one_work+0x5fa/0xef0
[    7.350162]  ? assign_work+0x122/0x3e0
[    7.350163]  worker_thread+0x54b/0xf70
[    7.350165]  ? __pfx_worker_thread+0x10/0x10
[    7.350166]  kthread+0x346/0x470
[    7.350170]  ? recalc_sigpending+0x19b/0x230
[    7.350176]  ? __pfx_kthread+0x10/0x10
[    7.350178]  ret_from_fork+0x4fb/0x6c0
[    7.350183]  ? __pfx_ret_from_fork+0x10/0x10
[    7.350185]  ? __switch_to+0x36c/0xbe0
[    7.350188]  ? __pfx_kthread+0x10/0x10
[    7.350190]  ret_from_fork_asm+0x1a/0x30
[    7.350197]  </TASK>
[    7.350197]
[    7.355160] Allocated by task 123:
[    7.355261]  kasan_save_stack+0x33/0x60
[    7.355373]  kasan_save_track+0x14/0x30
[    7.355484]  __kasan_kmalloc+0x8f/0xa0
[    7.355593]  ksmbd_conn_alloc+0x44/0x6d0
[    7.355711]  ksmbd_kthread_fn+0x243/0xd70
[    7.355839]  kthread+0x346/0x470
[    7.355942]  ret_from_fork+0x4fb/0x6c0
[    7.356051]  ret_from_fork_asm+0x1a/0x30
[    7.356164]
[    7.356214] Freed by task 134:
[    7.356305]  kasan_save_stack+0x33/0x60
[    7.356416]  kasan_save_track+0x14/0x30
[    7.356527]  kasan_save_free_info+0x3b/0x60
[    7.356646]  __kasan_slab_free+0x43/0x70
[    7.356761]  kfree+0x1ca/0x430
[    7.356862]  ksmbd_tcp_disconnect+0x59/0xe0
[    7.356993]  ksmbd_conn_handler_loop+0x77e/0xd40
[    7.357138]  kthread+0x346/0x470
[    7.357240]  ret_from_fork+0x4fb/0x6c0
[    7.357350]  ret_from_fork_asm+0x1a/0x30
[    7.357463]
[    7.357513] The buggy address belongs to the object at ffff8881056ac000
[    7.357513]  which belongs to the cache kmalloc-1k of size 1024
[    7.357857] The buggy address is located 396 bytes inside of
[    7.357857]  freed 1024-byte region [ffff8881056ac000, ffff8881056ac400)

Fix by removing the unconditional fp->conn assignment and rejecting the
replay when fp->conn is non-NULL. This is consistent with
ksmbd_lookup_durable_fd(), which also rejects file handles with a
non-NULL fp->conn. For disconnected file handles (fp->conn == NULL),
ksmbd_reopen_durable_fd() handles setting fp->conn.

Fixes: c8efcc7 ("ksmbd: add support for durable handles v1/v2")
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
This driver provides clocks, resets and power domains needed for various
components of the MSM8952.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add device tree bindings documentation for Qualcomm MSM8952
pinctrl driver.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
MSM8952 has same pin cound and similar pinctrl functions mostly, but some functions use
different pins.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add the compatible for the rpmpd to Documentation

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Document the compatible string for the SDHCI controller on the
msm8952 platform.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add vendor prefix for General Mobile.
Link: https://www.generalmobile.com

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Document the MSM8952 and add GM shamrock to it.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add MSM8952 compatible string with "qcom,msm-iommu-v2" as fallback
for the MSM8952 IOMMU which is compatible with Qualcomm's secure
fw "SMMU v2" implementation.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Document the qcom,tcsr-msm8952 compatible.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add the compatible for the MDP5 found on msm8952.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Document the scm compatible for msm8952 SoC.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add the mdp5_cfg_hw entry for MDP5 version v1.12 found on msm8952.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add initial support for MSM8952 SoC.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add node for wcnss remoteproc to make it possible to support wifi and bt.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add msm8952 to adsp target

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add adsp and lpass support to msm8952

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add support for MSM8952 MSS it is similar to MSM8917 MSS.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add modem support to msm8952

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add crypto support to msm8952

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
This commit describes the hardware layout for the MSM8952
for the following hardware blocks:

- 2 x VFE, 3 RDI per VFE
- 2 x CSID
- 2 x CSI PHY

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
msm8952 uses wcd_codec on pm8950. Copied from pm8937 and removed clocks because not all existing pm8950 devices has lpass support.

Disabled because this should be enabled and configured in board device tree.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
MSM8952 predates ubwc just like MSM8916 and MSM8976

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Some IS31FL319x variants don't reply to reset write. Don't fail probe over it.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
reset-gpio is already documented in dt-bindings but never implemented
in the driver.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Add LPASS iommu to apps_iommu and use it for lpass codec

Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
Ported using downstream mpm node.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
Ported using downstream mpm node.

Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
Add compatible string for tsens block found in MSM8952.

Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
Add MSM8952 support for tsens.

Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
Add thermal sensor support to msm8952.

Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
Document the QFPROM block found on MSM8952.

Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
These spi's and i2c's exist on cousin SoC's. I don't have a device that contains them, but their clocks exists in downstream gcc.
 They are possibly used by some devices.

Signed-off-by: kadir1243 <muzafferkadir@mainlining.org>
@okias

okias commented Sep 27, 2026

Copy link
Copy Markdown

rebased my patches on top of your v3 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants