Bug 218512 - Support Qualcomm Snapdragon 8cx Gen 2 (sc8180xp)
Summary: Support Qualcomm Snapdragon 8cx Gen 2 (sc8180xp)
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: ARM (show other bugs)
Hardware: ARM Linux
: P3 normal
Assignee: linux-arm-kernel@lists.arm.linux.org.uk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-19 20:41 UTC by Aram M.
Modified: 2024-10-07 06:08 UTC (History)
6 users (show)

See Also:
Kernel Version: 6.7.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output (80.57 KB, text/plain)
2024-02-19 20:41 UTC, Aram M.
Details
ACPI dump from Windows 11 (429.52 KB, application/octet-stream)
2024-03-20 05:10 UTC, Aram M.
Details

Description Aram M. 2024-02-19 20:41:29 UTC
Created attachment 305899 [details]
dmesg output

The Linux kernel 6.7.5 only boots in ACPI mode on DELL Inspiron 14 3420
with Qualcomm Snapdragon 8cx Gen 2 (sc8180xp).
A lot of hardware is not functional, this maybe due to missing device tree?
Built in keyboard and PCIe devices not working, only runs on USB connected disk, keyboard & peripherals.

Support for sc8180x & sc8280xp devices exist, but not for sc8180xp devices.

Under arch/arm64/boot/dts/qcom in source tree the files
sc8180x-pmics.dtsi, sc8180x.dtsi, sc8280xp-pmics.dtsi, sc8280xp.dtsi.
exist, but none for sc8180xp, which would be used for specific hardware dts 
files?
Maybe the hardware is similar enough to sc8180x? But of course I have no idea.

It would be nice for the keyboard to function without the device tree, seems like module i2c_qcom_geni doesn't work without dtb?


I have attached dmesg output.
Comment 1 Krzysztof Kozlowski 2024-02-22 07:43:52 UTC
Hi,

Thanks for the report, but not supporting some Devicetree or ACPI hardware is not a bug. Please close the bug.
Comment 2 alfred 2024-02-25 05:54:48 UTC
This is an old problem. I have been looking for support for 8cx gen 2, aka SC8180XP, for over a year.

At the moment the 6.5 kernel supports the Lenovo Flex 5G SoC SC8180X https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.5 which is only slightly different from my Lenovo IdeaPad 5G 14Q8X05. In fact, it has the SoC SC8180XP which is the evolution of the Flex with the same CPU-GPU, but at a higher frequency, with BT 5.1 and WiFi 6 instead of BT 5 and WiFi 5.

I'm still using it with Windows 11 and a virtual machine with GNU/linux :(. So I hope to have support soon....

Note: the Lenovo Thinkpad X13s has 8cx 3 SC8280XP and is supported by kernel 6.0 https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.0.
Comment 3 Aram M. 2024-02-25 07:39:21 UTC
Hi All,

Unfortunately I'm not very knowledgeable in device tree and even if I were, writing a Qualcomm SoC device tree demands intimate knowledge of hardware, which I also lack. My hope was that whoever is maintaining Qualcomm HW drivers/dts (Linaro?) would make some effort to bring Linux to these ARM laptops.
I'm going with WSL on this laptop, because not running Linux is not an option for me, but this is one battle the Linux kernel lost (for now) and there will be more ARM laptops coming.

Krzysztof Kozlowski, if this is not a bug, then what is? (technically may be considered a feature request?).
Only supported hardware is supported, and unsupported hardware is not supported?

I'm very thankful to all the kernel & open source software developers & the community for bringing us the pleasure of open source computing.
Comment 4 Krzysztof Kozlowski 2024-02-25 10:20:25 UTC
That's a feature request, not a bug. There is no problem in Linux kernel to be fixed here. Otherwise thousands of other unsupported devices are also bugs? No, they are not :)
Comment 5 prestino 2024-02-28 08:13:25 UTC
I agree that this bug/feature is very important, especially in light of the current ecosystem shift towards ARM-based devices.
Comment 6 Krzysztof Kozlowski 2024-02-28 08:17:19 UTC
(In reply to prestino from comment #5)
> I agree that this bug/feature is very important, especially in light of the
> current ecosystem shift towards ARM-based devices.

Not a bug. I don't think we collect feature requests here. Linux kernel is open source project, so anyone is can add whatever feature they want. We are not here to implement your needs. If you want to support a device, work on that.
Comment 7 prestino 2024-02-28 08:35:24 UTC
(In reply to Krzysztof Kozlowski from comment #6)
> (In reply to prestino from comment #5)
> > I agree that this bug/feature is very important, especially in light of the
> > current ecosystem shift towards ARM-based devices.
> 
> Not a bug. I don't think we collect feature requests here. Linux kernel is
> open source project, so anyone is can add whatever feature they want. We are
> not here to implement your needs. If you want to support a device, work on
> that.

Thank you for your prompt reply. Where can we apply for this feature? Unfortunately I am not able to contribute technically, but I could do it economically.
Thank you
Comment 8 Krzysztof Kozlowski 2024-02-28 09:10:44 UTC
(In reply to prestino from comment #7)
> Thank you for your prompt reply. Where can we apply for this feature?

OFTC/linux-msm IRC channel or linux-arm-msm mailing list? But there is some sort of misunderstanding here. You both write "apply for" or "request", but we are not working to fulfill requests... You want new hardware, you work on it.
Comment 9 prestino 2024-02-28 09:20:25 UTC
(In reply to Krzysztof Kozlowski from comment #8)
> (In reply to prestino from comment #7)
> > Thank you for your prompt reply. Where can we apply for this feature?
> 
> OFTC/linux-msm IRC channel or linux-arm-msm mailing list? But there is some
> sort of misunderstanding here. You both write "apply for" or "request", but
> we are not working to fulfill requests... You want new hardware, you work on
> it.

I am sorry for my incorrect words. What criteria do you or other contributors follow to support a new device?
From what I can see both from the posts above and the information on the web. The snapdragon 8cx gen 1, gen 3 SoCs are supported and they are/are working for the 8cx gen 4/elite X1E80100, with the 6.8 kernel coming soon. So only gen 2 is missing.
Thanks
Comment 10 Krishna Kurapati 2024-02-28 16:02:36 UTC
Krzysztof is right. We don't support feature requests to add new devices to upstream.

The boards you mentioned having support on upstream, were upstreamed by developers (If I am not wrong, like Linaro developers upon request of QC) or developers globally putting in their own voluntary effort.

Also since it is QC's hardware, you might want to check with QC first to see if they are ok for it to be on upstream because you just can't add support without knowing all details about the SoC.

Thanks,
Krishna,
Comment 11 Aram M. 2024-02-28 16:40:47 UTC
I think everybody here understands that the Linux kernel is this open source community driven wonderful phenomenon than no one confuses with commercial product where you can expect or demand support.
And I believe Bugzilla is one of the ways to reach out to the community to help you and further advance this project. Now if this is not the right place for new feature help, then please help me find where is the community for new hardware/feature help.
From what I understand with the device tree we are pretty much at the mercy of hardware vendors and can't just probe/discover devices and assign drivers & resources? 
In this particular situation I feel like this is such a low hanging fruit where I believe kernel drivers exist & hardware is so close to a "supported" one that it shouldn't take someone who is intimately familiar with Qualcomm Snapdragon SoC too much of an effort to whip up a device specific dts. Or am I wrong? Is this more of a DELL specific setup, rather than Qualcomm SoC?
Comment 13 Bjorn 2024-03-16 16:53:35 UTC
(In reply to Aram M. from comment #0)
> The Linux kernel 6.7.5 only boots in ACPI mode on DELL Inspiron 14 3420
> with Qualcomm Snapdragon 8cx Gen 2 (sc8180xp).

Running Linux with the ACPI tables in these devices is unfortunately not feasible, the current solution is therefor to write and explicitly load DeviceTree describing these platforms & devices.

> A lot of hardware is not functional, this maybe due to missing device tree?
> Built in keyboard and PCIe devices not working, only runs on USB connected
> disk, keyboard & peripherals.
> 

At one point we had sufficient ACPI support to be able to run the Debian installer on the Lenovo Flex 5G, but it was not possible to reach a more functional state and this minimal support has not been adequately maintained.

> Support for sc8180x & sc8280xp devices exist, but not for sc8180xp devices.
> 

It is my expectation that sc8180xp is sufficiently similar to sc8180x (from Linux's point of view) that you should be able to get quite far by leveraging the support for this.

> Under arch/arm64/boot/dts/qcom in source tree the files
> sc8180x-pmics.dtsi, sc8180x.dtsi, sc8280xp-pmics.dtsi, sc8280xp.dtsi.
> exist, but none for sc8180xp, which would be used for specific hardware dts 
> files?
> Maybe the hardware is similar enough to sc8180x? But of course I have no
> idea.
>

With sc8180x-lenovo-flex-5g.dts and the ACPI DSDT for your device, you should be able to come up with a minimal dts that gives you keyboard, and much more.

> It would be nice for the keyboard to function without the device tree, seems
> like module i2c_qcom_geni doesn't work without dtb?
>

As I mentioned above, keyboard used to work on sc8180x... But you probably want all the other features listed as well, for which writing a DeviceTree is the only solution.

Feel free to join us in the #aarch64-laptops IRC channel on OFTC for technical discussions on the subject.
Comment 14 Aram M. 2024-03-20 05:10:19 UTC
Created attachment 306011 [details]
ACPI dump from Windows 11

Attaching ACPI dump files as requested in IRC chat, which will be helpful in constructing DTS?
Comment 16 alfred 2024-03-21 15:34:25 UTC
This is my dump for Lenovo IdeaPad 5G 14Q8X05 with sc8180xp https://github.com/aarch64-laptops/build/files/14700163/ACPI.zip
Comment 17 alfred 2024-05-15 15:34:17 UTC
Qualcomm has announced Upstreaming Linux kernel support for the Snapdragon X Elite https://www.qualcomm.com/developer/blog/2024/05/upstreaming-linux-kernel-support-for-the-snapdragon-x-elite

Collaborating with Lenovo, Arm and Linaro on the AArch64 laptops GitHub project, we’ve built Linux support into several generations of our SoCs with Windows on Snapdragon. We’ve ensured that you could boot Linux on many of the laptops powered by our previous generation of SoCs. Notable models include the Lenovo Yoga C630 (Snapdragon 850), the Lenovo Flex 5G (Snapdragon 8cx Gen 1) and the Lenovo ThinkPad X13s (Snapdragon 8cx Gen 3).

In the description, all SoC 8cx are included except the unfortunate Gen 2 (sc8180xp). Who knows why it is the only one excluded.
Comment 18 alfred 2024-10-07 06:08:41 UTC
@Aram
Hi,
you can add your device to misc/subdir as described here https://github.com/aarch64-laptops/build/issues/76#issuecomment-2395403954

Note You need to log in before you can comment on or make changes to this bug.