hexdump0815 / imagebuilder

velvet os - simple script framework to build ubuntu 22.04 lts jammy (in older versions also 20.04 lts focal) and debian 12 bookworm (in older versions also 11 bullseye) bootable usb / sd card images for some arm and intel devices - lots of prebuilt images as well
GNU General Public License v3.0
300 stars 44 forks source link

snapdragon_7c_woa: status #136

Open hexdump0815 opened 1 year ago

hexdump0815 commented 1 year ago

notes from trying to use a samsung galaxy book go and reports about an acer aspire 1 (from travmurav) running v6.1/v6.2/v6.6:

here is list of working and non working features so far:

working

untested

broken

installation

problems

hexdump0815 commented 1 year ago

some discussion about firmware files, backlight control etc.: https://oftc.irclog.whitequark.org/aarch64-laptops/2023-03-02#31938232

samsung galaxy book go issue on aarch64-laptops repo: https://github.com/aarch64-laptops/debian-cdimage/issues/21

hexdump0815 commented 1 year ago

samsung galaxy book go: due to the potential problems with usb filesystem corruption it might be a good idea to simply write the image to an sd card (remove the first two partitions afterwards) and a usb device (remove the third partition afterwards) so that it boots from usb (sd card not supported) and runs from sd card (hopefully no fs corruption)

hexdump0815 commented 1 year ago

new image with slightly newer kernel and no longer starting the pd-mapper service by default - it looks like this might get rid of the usb fs corruption i observed with the last image: https://github.com/hexdump0815/imagebuilder/releases/tag/230308-01

AliceCyber commented 1 year ago

TCL Book 14 Go - image 230308-01 not working as is. "galaxy book" grub entry -- boot stucks at 0.8s (btrfs message) for ~20s, then kernel spews a warning about stall and that's it. "aces aspire" grub entry -- seems to boot past that but something fails with screen initialization and it flicker twice and dies.

Not sure how to proceed past that. Unscrew case, get to UART and log everything from the turn on to crash?

hexdump0815 commented 1 year ago

@AliceCyber - maybe something like this https://github.com/Sonicadvance1/linux/issues/27#issuecomment-823668871 helps to get some more useful log output for debugging where your problem is ... i guess your system is most probably closer to the aspire 1 as i guess it is also using the sc7180 reference design as a base ... maybe @TravMurav (the author of the aspire 1 support) has an idea?

TravMurav commented 1 year ago

@AliceCyber - maybe something like this Sonicadvance1/linux#27 (comment) helps to get some more useful log output for debugging where your problem is ... i guess your system is most probably closer to the aspire 1 as i guess it is also using the sc7180 reference design as a base ... maybe @TravMurav (the author of the aspire 1 support) has an idea?

B220G hw is very different from aspire1 I believe, notably it doesn't use the qsip module, instead having custom board layout and it's believed they are using different dsi-edp bridge than the one used in chromebooks and aspire1, which would result in no display support (when using a wrong DT) for sure.

There were a couple of people interested in the device, but I think no one ended up getting a far enough working system yet. You may find some notes in https://github.com/MinimumLaw/TCL-B220G-Linux (in russian)

Please note that it's ///very/// not a good idea to run a wrong DT on a device, since you may assert some gpios or power regulators incorrectly, which /may/ result in hardware damage (Though most of the time this won't cause too many problems, the possibility is always there.)

AliceCyber commented 1 year ago

B220G hw is very different from aspire1 I believe, notably it doesn't use the qsip module, instead having custom board layout and it's believed they are using different dsi-edp bridge than the one used in chromebooks and aspire1, which would result in no display support for sure.

Cant we tell kernel to just not touch the bridge, at least for now? It's already configured by UEFI and working. Unfortunately, nomodeset didn't help. Should I try to just cut everything about bridge from dts? Windows .sys driver for the bridge is something like 40kb, and a good half of it is padding zeroes and constant strings. Worst case, decompiling and reverse engineering would be needed. Best case, there's compatible driver already and it would need only a small patch with proper hwids/regvalues.

There were a couple of people interested in the device, but I think no one ended up getting a far enough working system yet. You may find some notes in https://github.com/MinimumLaw/TCL-B220G-Linux (in russian)

Видела уже. The most interesting info there is about hardware debug serial on motherboard. I currently have only one USB-UART adapter and would prefer to use that hardware serial as output instead of searching for another adapter to get logs out of the machine.

Please note that it's ///very/// not a good idea to run a wrong DT on a device, since you may assert some gpios or power regulators incorrectly, which /may/ result in hardware damage (Though most of the time this won't cause too many problems, the possibility is always there.)

Keyboard controller fucks up after "aces aspire" dts so much, that it stops working in uefi and windows until hard reset :lol:

TravMurav commented 1 year ago

Cant we tell kernel to just not touch the bridge, at least for now?

Yes, ideally you would start writing a completely new DT and disable everything related to SoC display subsystem (making Linux not reset it), + clk/pd_ignore unused to keep it clocked and powered on. UEFI sets up not only the bridge but also the SoC display pipeline in a "simple framebuffer" mode (aka just continuously displaying a memory region) which would work fine for bringup, but no gpu acceleration will be possible.

Видела уже. The most interesting info there is about hardware debug serial on motherboard. I currently have only one USB-UART adapter and would prefer to use that hardware serial as output instead of searching for another adapter to get logs out of the machine.

Yes, it will be /much/ easier for you if you have UART access, I'm not sure if it's easy to use it without soldering tho, but it's not too hard to i.e. get a multimeter probe to hold it on a testpoint safely.

Keyboard controller fucks up after "aces aspire" dts so much, that it stops working in uefi and windows until hard reset :lol:

Yeah, something probably upsets the embedded controller, and the firmware for those is usually hot garbage so it's really easy to do so. You'd need to figure out which i2c line is used for the keyboard HID from it and I think it would "just work" after defining it in the DT

AliceCyber commented 1 year ago

Okay, I would need sooooo much help with device tree - I don't even know where to start when writing one. Some of the useful info should be in the acpi dsdt.txt which I just dumped and decompiled. Probably. I hope. ~Windows installer doesn't see any hid, storages or usb on boot at all lol~

https://github.com/MinimumLaw/TCL-B220G-Linux show firmware boot log from internal UART which calls eDPBridge LT8911 (more precisely, it's LT8911EXB) Which has out-of-tree linux driver

So that should be supported. Technically. Code is four years old, and stable api is nonsense, after all.

@TravMurav are there any useful resources about translating acpi to dts and/or writing device trees in general?

TravMurav commented 1 year ago

Okay, I would need sooooo much help with device tree - I don't even know where to start when writing one. Some of the useful info should be in the acpi dsdt.txt which I just dumped and decompiled. Probably. I hope.

Yeah, acpi tables should have a bit of useful info (tho with a lot of noise around it sadly, it's pita to read)

~Windows installer doesn't see any hid, storages or usb on boot at all lol~

Unsurprising given qcom, being a shitty company, didn't even upload most 7c drivers to the MS repos, so you have to use special windows installer for the thing. Hopefully you did some ufs backup or still have the os installed, idk if tcl has recovery images...

At least your board presumably has hw secure-boot disabled so there should be a chance of recovering it if the boot chain on the ufs is corrupted. (speaking of that, I hope you already know that you must not touch any special partitions other than uefi esp, windows c: or windows recovery)

https://github.com/MinimumLaw/TCL-B220G-Linux show firmware boot log from internal UART which calls eDPBridge LT8911 (more precisely, it's LT8911EXB) Which has out-of-tree linux driver

So that should be supported. Technically. Code is four years old, and stable api is nonsense, after all.

That driver looks like something imported from old downstream and seems pretty annoying given it just throws some barely documented magic values in and doesn't even touch the DRM subsystem of the kernel, I suppose it might be workable at the start to write something sane from it, but sadly a quick skim didn't let me find a proper programming manual for the chip, which would have been much better to have :/

FWIW on the first steps it's probably better to ignore it and rely on efifb

@TravMurav are there any useful resources about translating acpi to dts and/or writing device trees in general?

For a general idea on how things go, pmOS has accumulated quite a lot of stuff for writing DTS for qcom based phones, which is /almost/ what you are up to. You can safely ignore pmOS specific things like packaging or anything related to bootloaders and android, but the general ideas and concepts should be described quite well.

These are the things I'd recommend to look at:

Unfortunately I don't immediately know what to suggest on reading the dsdt, but I'd like to invite you to #aarch64-laptops on OFTC IRC (English, has public log, I'm bridging to it via matrix) as there are a couple other people who might have good suggestions on that front.

I think as a starting task, getting the board to boot from minimal dt with retaining efifb should be your goal, then you could probably get usb pretty trivially.

Feel free to poke me if you are confused with something, if one is willing to do this work, I'm happy to help :)

AliceCyber commented 1 year ago

IMG_20230520_135700_071 Weeell, easier than i through it would be.

hexdump0815 commented 1 year ago

@AliceCyber - congratulations! - can you maybe share some details (dts etc.)? :)

AliceCyber commented 1 year ago

What is working:

What isn't:

DTS: sc7180-tcl-book-14-go.dts.txt

AliceCyber commented 1 year ago

I've voided my warranty ) @TravMurav is that enough to start bringing up gpu&mipi without touching the bridge for now? Also, anybody know how to properly work with earlycon?

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.3.1.1-00010-SC7180XWZB-1
S - IMAGE_VARIANT_STRING=RennellWP
S - OEM_IMAGE_VERSION_STRING=SM042022201
S - Boot Interface: UFS
S - Secure Boot: Off
S - Boot Config @ 0x00786070 = 0x000000c8
S - JTAG ID @ 0x00786130 = 0x1012c0e1
S - OEM ID @ 0x00786138 = 0x00000000
S - Serial Number @ 0x00786134 = 0x2c4aa279
S - OEM Config Row 0 @ 0x007841b8 = 0x0000000000000000
S - OEM Config Row 1 @ 0x007841c0 = 0x0000000000000000
S - Feature Config Row 0 @ 0x007841d0 = 0x0840200015300400
S - Feature Config Row 1 @ 0x007841d8 = 0x0014000000008080
S - Core 0 Frequency, 1516 MHz
S - PBL Patch Ver: 5
S - PBL freq: 600 MHZ
D -      5134 - pbl_apps_init_timestamp
D -     63890 - bootable_media_detect_timestamp
D -      1339 - bl_elf_metadata_loading_timestamp
D -       703 - bl_hash_seg_auth_timestamp
D -      6425 - bl_elf_loadable_segment_loading_timestamp
D -      5425 - bl_elf_segs_hash_verify_timestamp
D -      7210 - bl_sec_hash_seg_auth_timestamp
D -       890 - bl_sec_segs_hash_verify_timestamp
D -        37 - pbl_populate_shared_data_and_exit_timestamp
S -     91053 - PBL, End
B -    112362 - SBL1, Start
B -    231434 - SBL1 BUILD @ 14:16:36 on Jul 13 2022
B -    237534 - boot_flash_init, Start
D -         0 - boot_flash_init, Delta
B -    242444 - xblconfig_init, Start
B -    403423 - UFS INQUIRY ID: MICRON  MT128GASAO4U21  0101
D -      1098 - Auth Metadata
D -    193858 - xblconfig_init, Delta
B -    439871 - boot_config_data_table_init, Start
B -    443500 - Using default CDT
D -      4636 - boot_config_data_table_init, Delta - (54 Bytes)
B -    456859 - CDT Version:3,Platform ID:29,Major ID:1,Minor ID:0,Subtype:0
B -    464271 - pm_device_init, Start
B -    469303 - PM: PM 0=0x800808000000080:0x0 
B -    469364 - PM: PM 2=0x400008000000020:0x0 
B -    473726 - PM: POWER ON by KPDPWR,POWER OFF by RAW_DVDD_SHD
B -    564463 - PM: SET_VAL:Skip
B -    564768 - PM: PSI: b0x30_v0x17
B -    572271 - PM: Device Init # RTC: 0, #SDAM: 0
B -    572332 - PM: Device Init # SPMI Transn: 5258
D -    112636 - pm_device_init, Delta
B -    581665 - pm_driver_init, Start
B -    590327 - PM: Driver Init # SPMI Transn: 362
D -      5215 - pm_driver_init, Delta
B -    595024 - vsense_init, Start
D -         0 - vsense_init, Delta
B -    604937 - sbl1_ddr_set_params, Start
B -    605120 - Pre_DDR_clock_init, Start
D -        91 - Pre_DDR_clock_init, Delta
D -      8265 - sbl1_ddr_set_params, Delta
B -    616588 - sbl1_ddr_init, Start
D -      8052 - sbl1_ddr_init, Delta
B -    628605 - DSF version = 104.0.19, DSF SHRM version = 59.5
B -    637694 - Manufacturer ID = ff, Device Type = 7
B -    637846 - Rank 0 size = 4096 MB, Rank 1 size = 0 MB
B -    642909 - Row Hammer Check : DRAM supports unlimited MAC Value : MR24[OP2:0 = 0] & MR24[OP3 = 1] for CH0 & CS0
B -    653737 - Row Hammer Check : DRAM supports unlimited MAC Value : MR24[OP2:0 = 0] & MR24[OP3 = 1] for CH1 & CS0
B -    664412 - do_ddr_training, Start
B -    670512 - Frequency = 1555 MHz
D -      3660 - do_ddr_training, Delta
B -    678137 - pImem Init Start
D -     11468 - pImem Init End, Delta
B -    691160 - Relocate Pagetable to DDR, Start
B -    694973 - Relocate Pagetable to DDR, End
B -    699090 - External heap init, Start
B -    703391 - External heap init, End
B -    707234 - clock_init, Start
D -     20496 - clock_init, Delta
B -    731603 - Loading APDP Image
D -      4392 - Auth Metadata
D -       335 - Segments hash check
D -     10980 - Image Loaded, Delta - (21124 Bytes)
B -    746060 - usb: UFS Serial - 4e982bb5
B -    750635 - usb: fedl, vbus_low
B -    754966 - PM: SMEM Chgr Info Write Success
B -    758352 - Loading OEM_MISC Image
D -       915 - Auth Metadata
D -       275 - Segments hash check
D -     10339 - Image Loaded, Delta - (8024 Bytes)
B -    772016 - Loading QTI_MISC Image
D -      4636 - Image Loaded, Delta - (0 Bytes)
B -    785466 - PM: PM Total Mem Allocated: 1849 
B -    785497 - Loading AOP Image
D -       945 - Auth Metadata
D -      1830 - Segments hash check
D -     13633 - Image Loaded, Delta - (157928 Bytes)
B -    802455 - Loading QSEE Dev Config Image
D -      1159 - Auth Metadata
D -       549 - Segments hash check
D -     11804 - Image Loaded, Delta - (38124 Bytes)
B -    817552 - Loading QSEE Image
D -      4362 - Auth Metadata
D -     19215 - Segments hash check
D -     54565 - Image Loaded, Delta - (2967465 Bytes)
B -    875685 - Loading SEC Image
D -      4667 - Image Loaded, Delta - (0 Bytes)
B -    883493 - Loading QHEE Image
D -      1190 - Auth Metadata
D -      2684 - Segments hash check
D -     16836 - Image Loaded, Delta - (394336 Bytes)
B -    903654 - Loading STI Image
D -      4819 - Image Loaded, Delta - (0 Bytes)
B -    911736 - Loading APPSBL Image
D -      1464 - Auth Metadata
D -     10400 - Segments hash check
D -     29982 - Image Loaded, Delta - (2088960 Bytes)
B -    948611 - SBL1, End
D -    837560 - SBL1, Delta
S - Flash Throughput, 111000 KB/s  (5746011 Bytes,  51347 us)
S - DDR Frequency, 1555 MHz

UEFI Start     [ 1166] SEC
ASLR        : OFF [WARNING]
DEP         : ON (RTB)
Timer Delta : +1 mS
RAM Entry 0 : Base 0x0080000000  Size 0x003D800000
RAM Entry 1 : Base 0x00C0000000  Size 0x00C0000000
RAM Entry 2 : Base 0x00BD800000  Size 0x0000100000
Total Installed RAM : 4096 MB (0x0100000000)
UART Buffer size set to 0x8000 
Continue booting UEFI on Core 0
                               UEFI Ver    : 1.21
Build Info  : 64b Jul 29 2022 09:22:16
Boot Device : UFS
PROD Mode   : TRUE
Retail      : TRUE
npa_create_sync_client_ex start
PM0: 40, PM2: 31, 
UFS INQUIRY ID: MICRON  MT128GASAO4U21  0101
Get Card Info size = -864026624
LoadSecureApps: Embedded common libs load result 0
MDPLibProfile: Entry[MDPSetProperty()][6]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 10
MDPLibProfile: Exit[MDPPlatformConfigure()][87us function time][87us total time]
MDPLibProfile: Exit[MDPSetProperty()][150us function time][237us total time]
MDPLibProfile: Entry[MDPInit][0]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 6
SetupPlatformPanelConfig lt8911
SetupPlatformPanelConfig bDetectPanel = 0
MDPLibProfile: Exit[MDPPlatformConfigure()][121us function time][358us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 5
MDPLibProfile: Exit[MDPPlatformConfigure()][38us function time][396us total time]
MDPLibProfile: Entry[MDPSetCoreClock()][0]
MDPLibProfile: Exit[MDPSetCoreClock()][574us function time][970us total time]
MDPLibProfile: Exit[MDPInit()][838us function time][1808us total time]
MDPLibProfile: Entry[MDPPower()][0]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 1
Panel_CLS_PowerUp
MDPLibProfile: Exit[MDPPlatformConfigure()][31851us function time][33659us total time]
MDPLibProfile: Exit[MDPPower()][31913us function time][65572us total time]
MDPLibProfile: Entry[MDPDetect()][0]
MDPLibProfile: Entry[MDPDetectPanel()][0]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 0
trace bDetectPanel = 0
GetPanelXmlConfig ok
MDPLibProfile: Exit[MDPPlatformConfigure()][4130us function time][69702us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 14
Panel_CLS_Reset_LT8911
MDPLibProfile: Exit[MDPPlatformConfigure()][212403us function time][282105us total time]
EDPBridgeDriver_EDIDRead_LT8911
LT8911EXB edp bridge chip id 17 5 E0
LT8911 tx pll locked
Read eDP EDID......

0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x09,0xE5,0x0D,0x09,0x00,0x00,0x00,0x00,
0x1C,0x20,0x01,0x04,0x95,0x1F,0x11,0x78,0x03,0xF8,0x45,0x96,0x57,0x54,0x92,0x28,
0x23,0x50,0x54,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x2B,0x1B,0x56,0x78,0x50,0x00,0x0C,0x30,0x30,0x20,
0x36,0x00,0x35,0xAE,0x10,0x00,0x00,0x1A,0x1D,0x12,0x56,0x78,0x50,0x00,0x0C,0x30,
0x30,0x20,0x36,0x00,0x35,0xAE,0x10,0x00,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
0x00,0x0D,0x40,0xFF,0x0A,0x3C,0x7D,0x11,0x11,0x21,0x7D,0x00,0x00,0x00,0x00,0x52,

eDP Timing = { H_FP / H_pluse / H_BP / H_act / H_tol / V_FP / V_pluse / V_BP / V_act / V_tol / D_
eDP Timing = { 48, 32, 40, 1366, 1486, 3, 6, 3, 768, 780, 6955 }
 BitDeepPara:(208,0,0)
EDID_H:(1366,48,40,32,0)
EDID_V:(768,3,3,6,6973)
EDID_Board:(0,0,0,0,0x3C0000)
eDP_lane:(1)
EdpConfig: 0x00000000BD800000
PanelCfg print finish,totle lengh: 3942
EdpOffSetAddr=-1115684864
DisplayDxe: Resolution 1366x768 (1 intf)
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 5
MDPLibProfile: Exit[MDPPlatformConfigure()][36us function time][282141us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 6
MDPLibProfile: Exit[MDPPlatformConfigure()][85us function time][282226us total time]
MDPLibProfile: Exit[MDPDetectPanel()][118us function time][282344us total time]
MDPLibProfile: Exit[MDPDetect()][145us function time][282489us total time]
MDPLibProfile: Entry[MDPSetProperty()][3]
MDPLibProfile: Exit[MDPSetProperty()][22us function time][282511us total time]
MDPLibProfile: Entry[MDPSetProperty()][4]
MDPLibProfile: Exit[MDPSetProperty()][21us function time][282532us total time]
HW Wdog Setting from PCD : Disabled
ScmSipSysCall() failed, Status = (0x7)
Device booted from UFS

 APC1 Total 56
LoadSys  TIME 0ms
tsens  TIME 0ms
scm  TIME 0ms
LmhIsenseInit Pre CPU  TIME 0ms
GLD APC TOTAL IDDQ 56
LmhIsenseSubSysEntry Post SubSysEntryCb  TIME 0ms
LmhIsenseSubSysEntry Post LmhIsenseSubSysInit  TIME 0ms
LmhIsenseInitSubSys Post SubSysEntry  TIME 0ms
Core 0, CDYN=2250pF, IDDQ FUSE Volt 750, IDDQ Temp 30
Volt(mV)        Freq(KHz)       IDyn(mA)        ILeak(mA)       ITotal(mA)      Temp(c) CorePair        ADC
828     1555200 2897    53      2950    26      0       143
828     1708800 3183    53      3236    26      0       168
828     1900800 3541    53      3594    26      0       167
828     2112000 3934    53      3987    26      0       189
828     2208000 4113    53      4166    26      0       202
828     2323200 4328    54      4382    27      0       209
828     2400000 4471    54      4525    27      0       209
CoreIdx Slope   Intercept
0       184     -94
TIME TO MEASURE 3ms OpPoints 7
LmhIsenseInitSubSys Post SubSysTrim  TIME 4ms
LmhIsenseInitSubSys Post SubSysExit  TIME 4ms
LmhIsenseInit Post CPU  TIME 4ms
LmhIsenseInit Post Store  TIME 5ms
isense  TIME 5ms
ISENSE TOTAL TIME 6ms
qusb2_1: hstx: 4
PLL1 locked: 5
usb_lane: 0
EC Version = 1.13.
I2CKeyboardEntryPoint.
[DppDxe] Failed to read DPP block data with RawFSProtocol.
: BlockGetDPP returned Not Found
[LoadSHIPFromDPP] DppProtocol->GetDPP failed. Status: 14.
Gpio_Init_1!
SwitchUsbModeEntryPoint start
[LoadECFromDPP] WriteEcRegsI2C Set USB device mode SUCC
[LoadECFromDPP] DppProtocol->GetDPP EcFileBuffer: 48
SwitchUsbModeEntryPoint end
MDPLibProfile: Entry[MDPSetMode()][0]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 8
MDPLibProfile: Exit[MDPPlatformConfigure()][45us function time][282577us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 8
MDPLibProfile: Exit[MDPPlatformConfigure()][32us function time][282609us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 8
MDPLibProfile: Exit[MDPPlatformConfigure()][36us function time][282645us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 8
MDPLibProfile: Exit[MDPPlatformConfigure()][33us function time][282678us total time]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 7
MDPLibProfile: Exit[MDPPlatformConfigure()][105us function time][282783us total time]
EDPBridgeDriver_SetMode_LT8911
UsbEnumeratePort: new device connected at port 0, HubIfc =0xFD2FAB98 
LT8911 tx pll locked
link train on going...
Link train success, address 0x82 val= 62 
panel link rate: 10 
panel link count: 129 
LT8911 video check: mipi byteclk = 52154 
LT8911 video check: Vtotal = 780 

video check: Hact(word counter) = 1366 

video check: Vact = 768 

Reg0xD087 = 18
PCR Clock stable
MDPLibProfile: Exit[MDPSetMode()][471277us function time][754060us total time]
MDPLibProfile: Entry[MDPSetProperty()][0]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 4
MDPLibProfile: Exit[MDPPlatformConfigure()][24396us function time][778456us total time]
MDPLibProfile: Exit[MDPSetProperty()][24457us function time][802913us total time]
MDPLibProfile: Entry[MDPSetProperty()][2]
MDPLibProfile: Entry[MDPPlatformConfigure()][0]
MDPPlatformConfigure type = 5
MDPLibProfile: Exit[MDPPlatformConfigure()][32us function time][802945us total time]
MDPLibProfile: Exit[MDPSetProperty()][1298us function time][804243us total time]
WaitParallelThreads InIt [ 4053] 
-----------------------------
Platform Init  [ 4053] BDS
UEFI Ver   : 1.21
Platform           : CLS
Subtype            : 0
Boot Device        : UFS
Chip Name          : SC7180
Chip Ver           : 1.1
Chip Serial Number : 0x2C4AA279
-----------------------------
UsbEnumeratePort: new device connected at port 3, HubIfc =0xFD21FE18 
UsbSelectConfig: failed to connect driver Not Found, ignored
UsbSelectConfig: failed to connect driver Not Found, ignored
Successfully loaded Tools FV
Current is disabled
WaitForTimeout:0
HotKey: 0x11, 0x0
Boot menu Hotkey detected
FV mounted from memory
BattShow  don't need to show low batt tips
[DppDxe] Failed to read DPP block data with RawFSProtocol.
: BlockGetDPP returned Not Found
LoadEC failed. Status: Not Found.
ENEFlashApp force to flash EC.bin failed. Status: Not Found.
Start image failed
Failed to launch ENEAutoFlash app, status: Not Found
No pending capsules found in EFI Raw file
ACPI: Loaded 1 tables
TPM type 0x6654504D successfully updated to ACPI variable.
[DppDxe] Failed to read DPP block data with RawFSProtocol.
: BlockGetDPP returned Not Found
: DppProtocol->GetDPP returned Not Found
 HandleMorPpi delta: 4
Platform Init End : 5101
-----------------------------
JLQ_Gpio_Init_2
Entering Boot Menu
AliceCyber commented 1 year ago

Okay, I should've also added console=ttyMSM0 because kernel driver brings up device and breaks earlycon so after that console starts working. Boot log is there: boot.log Most interesting piece:

[    2.491423] ufshcd-qcom 1d84000.ufshc: Adding to iommu group 2
[    2.498737] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vdd-hba-supply regulator, assuming enabled
[    2.510605] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vcc-supply regulator, assuming enabled
[    2.522108] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vccq-supply regulator, assuming enabled
[    2.533706] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vccq2-supply regulator, assuming enabled
[    2.545938] scsi host0: ufshcd
[    2.734873] PM: genpd: Not disabling unused power domains
[    2.742312] clk: Not disabling unused clocks
[    3.166879] ufshcd-qcom 1d84000.ufshc: ufshcd_verify_dev_init: NOP OUT failed -11
[    3.185339] ------------[ cut here ]------------
[    3.191382] gcc_ufs_phy_axi_clk status stuck at 'off'
[    3.191417] WARNING: CPU: 0 PID: 63 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x13c/0x154
[    3.208574] Modules linked in:
[    3.213065] CPU: 0 PID: 63 Comm: kworker/u17:0 Not tainted 6.4.0-rc2+ #1
[    3.221319] Hardware name: TCL Communication Ltd. B220G/B220G, BIOS 1.21 07/29/2022
[    3.230573] Workqueue: ufs_clk_gating_0 ufshcd_ungate_work
[    3.237616] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    3.246185] pc : clk_branch_wait+0x13c/0x154
[    3.251997] lr : clk_branch_wait+0x13c/0x154
[    3.257789] sp : ffff800008b53c80
[    3.262563] x29: ffff800008b53c80 x28: 0000000000000000 x27: 0000000000000001
[    3.271288] x26: 0000000000000001 x25: ffff225ac2c89240 x24: 0000000000000000
[    3.280012] x23: ffffd98bd85e6bb8 x22: 0000000000000001 x21: ffffd98bd7b7d6c4
[    3.288746] x20: 0000000000000000 x19: ffffd98bd8a45b28 x18: fffffffffffe6568
[    3.297458] x17: 0000000000000000 x16: 0000000000000020 x15: 0000000000000038
[    3.306131] x14: 0000000000000000 x13: ffffd98bd89a3730 x12: 0000000000000465
[    3.314759] x11: 0000000000000177 x10: ffffd98bd89fda58 x9 : ffffd98bd89a3730
[    3.323338] x8 : 00000000ffffefff x7 : ffffd98bd89fb730 x6 : 0000000000000177
[    3.331870] x5 : 0000000000000000 x4 : 40000000fffff177 x3 : 0000000000000000
[    3.340376] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff225ac2c2c9c0
[    3.348854] Call trace:
[    3.352496]  clk_branch_wait+0x13c/0x154
[    3.357658]  clk_branch2_enable+0x30/0x40
[    3.362897]  clk_core_enable+0x6c/0xac
[    3.367852]  clk_enable+0x2c/0x4c
[    3.372336]  ufshcd_setup_clocks+0x238/0x28c
[    3.377815]  ufshcd_ungate_work+0x64/0x140
[    3.383105]  process_one_work+0x1b0/0x320
[    3.388294]  worker_thread+0x220/0x428
[    3.393201]  kthread+0x110/0x114
[    3.397577]  ret_from_fork+0x10/0x20
[    3.402289] ---[ end trace 0000000000000000 ]---
[    3.408203] ufshcd-qcom 1d84000.ufshc: ufshcd_setup_clocks: core_clk prepare enable failed, -16

That is failed boot with sm7150 ufs_phy driver. UFS does something to clocks and breaks display and everything.

TravMurav commented 1 year ago

Ah, seems like the UFS driver tries to init the chip and fails. Then it starts to tear down the configured and enabled clocks, which it for some reason fails to do, resulting in gcc being upset, and when gcc is sad clocks do break terribly everywhere...

I think the most obvious thing to look at is the fact that the driver complains about the missing power lines. Maybe efi turns those supplies off and Linux has to re-enable them before touching the ufs chip.

пн, 22 мая 2023 г. в 23:22, AliceCyber @.***>:

Okay, I should've also added console=ttyMSM0 because kernel driver brings up device and breaks earlycon so after that console starts working. Boot log is there: boot.log https://github.com/hexdump0815/imagebuilder/files/11535721/boot.log Most interesting piece:

[ 2.491423] ufshcd-qcom 1d84000.ufshc: Adding to iommu group 2 [ 2.498737] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vdd-hba-supply regulator, assuming enabled [ 2.510605] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vcc-supply regulator, assuming enabled [ 2.522108] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vccq-supply regulator, assuming enabled [ 2.533706] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: Unable to find vccq2-supply regulator, assuming enabled [ 2.545938] scsi host0: ufshcd [ 2.734873] PM: genpd: Not disabling unused power domains [ 2.742312] clk: Not disabling unused clocks [ 3.166879] ufshcd-qcom 1d84000.ufshc: ufshcd_verify_dev_init: NOP OUT failed -11 [ 3.185339] ------------[ cut here ]------------ [ 3.191382] gcc_ufs_phy_axi_clk status stuck at 'off' [ 3.191417] WARNING: CPU: 0 PID: 63 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x13c/0x154 [ 3.208574] Modules linked in: [ 3.213065] CPU: 0 PID: 63 Comm: kworker/u17:0 Not tainted 6.4.0-rc2+ #1 [ 3.221319] Hardware name: TCL Communication Ltd. B220G/B220G, BIOS 1.21 07/29/2022 [ 3.230573] Workqueue: ufs_clk_gating_0 ufshcd_ungate_work [ 3.237616] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 3.246185] pc : clk_branch_wait+0x13c/0x154 [ 3.251997] lr : clk_branch_wait+0x13c/0x154 [ 3.257789] sp : ffff800008b53c80 [ 3.262563] x29: ffff800008b53c80 x28: 0000000000000000 x27: 0000000000000001 [ 3.271288] x26: 0000000000000001 x25: ffff225ac2c89240 x24: 0000000000000000 [ 3.280012] x23: ffffd98bd85e6bb8 x22: 0000000000000001 x21: ffffd98bd7b7d6c4 [ 3.288746] x20: 0000000000000000 x19: ffffd98bd8a45b28 x18: fffffffffffe6568 [ 3.297458] x17: 0000000000000000 x16: 0000000000000020 x15: 0000000000000038 [ 3.306131] x14: 0000000000000000 x13: ffffd98bd89a3730 x12: 0000000000000465 [ 3.314759] x11: 0000000000000177 x10: ffffd98bd89fda58 x9 : ffffd98bd89a3730 [ 3.323338] x8 : 00000000ffffefff x7 : ffffd98bd89fb730 x6 : 0000000000000177 [ 3.331870] x5 : 0000000000000000 x4 : 40000000fffff177 x3 : 0000000000000000 [ 3.340376] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff225ac2c2c9c0 [ 3.348854] Call trace: [ 3.352496] clk_branch_wait+0x13c/0x154 [ 3.357658] clk_branch2_enable+0x30/0x40 [ 3.362897] clk_core_enable+0x6c/0xac [ 3.367852] clk_enable+0x2c/0x4c [ 3.372336] ufshcd_setup_clocks+0x238/0x28c [ 3.377815] ufshcd_ungate_work+0x64/0x140 [ 3.383105] process_one_work+0x1b0/0x320 [ 3.388294] worker_thread+0x220/0x428 [ 3.393201] kthread+0x110/0x114 [ 3.397577] ret_from_fork+0x10/0x20 [ 3.402289] ---[ end trace 0000000000000000 ]--- [ 3.408203] ufshcd-qcom 1d84000.ufshc: ufshcd_setup_clocks: core_clk prepare enable failed, -16

— Reply to this email directly, view it on GitHub https://github.com/hexdump0815/imagebuilder/issues/136#issuecomment-1557691230, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIO5GWZM4PJ2T6SP4QHX6DXHOVHLANCNFSM6AAAAAAVP2FONI . You are receiving this because you were mentioned.Message ID: @.***>

mrintrepide commented 7 months ago

Hi, I have an Acer Aspire 1, and I tried old and new builds with a USB stick (Samsung USB 3.1 FIT Plus 256 GB), but I got the same result. After GRUB model selection, I have some lines about dtb and get a permanent black screen. Did I do anything wrong? (I successfully boot PostMarketOS)

EDIT last screen after black screen : mpv-shot0001

hexdump0815 commented 7 months ago

@mrintrepide - can you please try to unplug/replug the usb device at the piint when it hangs? i have seen cases where this was required for some system/usb disk combinations for the usb disk to be properly recognized by the kernel ...

update: and please make sure you tried the latest image, i just built and uploaded a new one a few days ago

mrintrepide commented 7 months ago

@hexdump0815 thanks for your reply. I use the latest build for 7c_WOA with 6.6.9 kernel. Unplug/Replug do nothing visible in screen. But with plug/unplug some device (usb key or usb ethernet adapter) and reboot and reset sometime it boot. I don't know if it related.

trustytrojan commented 1 week ago

Any progress with the Snapdragon 7c? The main killer is having no wifi. I'd like to contribute some time to get it working. Just got my hands on a Galaxy Book Go, so I can do some experimentation on it, though I have no idea where to start. As I read through most of the comments here I hear a lot about ACPI tables and device trees (DTs), and ripping drivers from Windows images/installs. What can I do to push the effort forward?

hexdump0815 commented 1 week ago

@trustytrojan - wifi meanwhile actually works if you add the proper firmware files from windows - see https://github.com/hexdump0815/imagebuilder/blob/main/systems/snapdragon_7c_woa/doc/required-firmware.md ... i'll update the top page of this gh issue

trustytrojan commented 1 week ago

@hexdump0815 I got wifi working! Thanks for the link. The next obstacle is the very low brightness... Do you guys have any leads on how to fix that? I can experiment with any steps you give me.

thenameisluk commented 1 week ago

@trustytrojan you can try

echo 1000 | sudo tee /sys/class/backlight/*/brightness

it should set your brightness to maximum your kernel can set to

trustytrojan commented 1 week ago

@trustytrojan you can try

echo 1000 | sudo tee /sys/class/backlight/*/brightness

it should set your brightness to maximum your kernel can set to

@thenameisluk This I already know. I'm talking about how to increase that kernel limit, because it's not as high as what Windows provides.

thenameisluk commented 1 week ago

@trustytrojan you will likely need to modify .dts file for your device before compiling the kernel can't really help u with that since i don't have one of these

trustytrojan commented 1 week ago

How does one get a .dts file? Is there a guide for how to do this here?

hexdump0815 commented 1 week ago

sadly for the galaxy book go the backlight control has not yet been found, so there is no way to change the brightness right now ... one thing worth a try is to set it to a certain value in windows and hope that it keeps remembered after a restart to linux ... otherwise there is no way to change it as it first needs to be reverse engineered how it works which is a very complex task i'm for instance not able to get solved