Skip to content

dts: msm8960: Add support for Sony Xperia SP (huashan) - #542

Merged
TravMurav merged 1 commit into
msm8916-mainline:mainfrom
Smankusors:huashan
Jun 9, 2025
Merged

TravMurav merged 1 commit into
msm8916-mainline:mainfrom
Smankusors:huashan

Conversation

@Smankusors

@Smankusors Smankusors commented May 25, 2025 •

Copy link
Copy Markdown
Contributor

unfortunately this device has some quirks:

  1. the display requires a lot of work, so for now we need ENABLE_DISPLAY=0 instead.
  2. the UART on C5302 (non LTE) has serial output on gsbi8, not at gsbi5. So somehow we need a way to define this via dts?

@peremen

peremen commented May 25, 2025

Copy link
Copy Markdown
Contributor

My device is using GSBI8 as I2C, and also after applying this patch the GSBI8 is configured correctly to I2C by stock Android kernel. Not sure about other devices.

Comment thread target/msm8960/init.c Outdated

uart_dm_init(5, 0x16400000, 0x16440000);
break;
return uart_dm_init(5, 0x16400000, 0x16440000);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's not typical to use "return " in functions with void type, can you leave this style the way it is?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

going to revert this since it negatively impacts expressatt

Comment thread lk2nd/device/dts/msm8960/bundle.dts Outdated
};
sony-huashan {
/*
* The display currently does not work due to lk2nd requiring MDP5, which is not available on the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lk2nd does also support MDP4, if the display was already enabled by the stock bootloader, so the justification here is a bit odd. What happens if you omit the ENABLE_DISPLAY=0? Ideally lk2nd should automatically detect that the display is not enabled.

@Smankusors Smankusors Jun 4, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the lk2nd would hang waiting for the display

if I manually init the display clocks, it will not hang anymore though

Comment thread target/msm8960/init.c Outdated
{
uart_dm_init(5, 0x16400000, 0x16440000);
switch (board_baseband()) {
case BASEBAND_MSM:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we sure this doesn't negatively affect any other devices? E.g. if Samsung devices use UART5 and Sony devices use UART8, then you are fixing Sony here but breaking Samsung.

Do you have UART accessible on your device? Or what are we fixing here?

@Smankusors Smankusors Jun 4, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, I confirmed with the expressatt user that it broke their UART output. I'm going to revert this first

@Smankusors
Smankusors marked this pull request as draft June 4, 2025 19:23
Signed-off-by: Antony K. S <postmarketos@smankusors.com>
@Smankusors
Smankusors marked this pull request as ready for review June 6, 2025 01:02
@Smankusors Smankusors changed the title lk2nd: device: dts: msm8960: Add support for Sony Xperia SP (huashan) dts: msm8960: Add support for Sony Xperia SP (huashan) Jun 6, 2025
@TravMurav
TravMurav merged commit e326eca into msm8916-mainline:main Jun 9, 2025
@TravMurav

Copy link
Copy Markdown
Member

Thanks!

@Smankusors
Smankusors deleted the huashan branch February 1, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants