WIP serial: Add framebuffer uart driver#38
Open
minlexx wants to merge 30 commits intomaster-sdm660from
Open
Conversation
fc3ca07 to
602e19a
Compare
dda1acb to
03afb4d
Compare
602e19a to
f2aec8c
Compare
03afb4d to
4250fe5
Compare
f2aec8c to
925f4eb
Compare
4250fe5 to
95934c9
Compare
2b85665 to
58ba67a
Compare
95934c9 to
bb933c4
Compare
58ba67a to
19a88e4
Compare
Simple build script for PRs. Also create Android boot images for merge request's CI. And add auto-rebaser job, which will run rebase on upstream/master once a day to try to see if there are some incompatibilities with upstream. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
…UFS devices Currently (since 2026.01-rc) on all SDM630/660 based devices this is printed, after observing long boot delay (several seconds) before executing preboot commands: QCOM-FMP: Failed to find boot partition find_target_partition() function incorrectly assumes that eMMC is always at number 0. In general you can't rely on device numbering to determine if particular block device is eMMC or SD-card, because it depends on how aliases are defined in device tree "chosen" node. Some SoCs have MMC numbers starting at 1, not 0; so mmc1 is eMMC, mmc2 is SD-card. Make eMMC detection reliable by using IS_SD() macro from mmc.h header. Using this method target boot partition can be found successfully. With debug prints enabled, this is printed: QCOM-FMP: skipped SD-Card (devnum 2) QCOM-FMP: Capsule update target: boot (disk 1:60) QCOM-FMP: DFU string: 'mmc 0=u-boot.bin part 1 60' Without debug prints nothing is printed, no error about failure to find boot partition. Fixes: fe80a5f ("mach-snapdragon: CapsuleUpdate: support all boot methods") Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
Add default env file for sdm660 phones. Place all our options to 2 fragments: * qcom-sdm660-phone.config - default * debug-sdm660.config - additionally debug UART To build for SDM660, use "make qcom_defconfig qcom-sdm660-phone.config" Co-developed-by: Paul Sajna <hello@paulsajna.com> Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
Sometimes it's needed to keep serial port setup to whatever was configured by previous bootloader to see boot logs. Honor the existing Kconfig option to enable this behaviour. Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
This works around bug in serial_msm driver incorrectly assuming that default rate of 7372800 suits everyone. For SDM660 however the correct uartclk is 1843200, as reported by Linux driver (when booted w/o U-Boot): msm_serial c170000.serial: msm_serial: detected port #0 msm_serial c170000.serial: uartclk = 1843200 Rate of 1843200 allows serial_msm driver to calculate the correct divider value of 16 (1843200 / 115200) for clock select (CSR) register, which matches stock bootloader programmed value: 0xff. Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
Clearly state that serial_msm is about "older" UART DM (Data Mover) driver, to reduce confusion with the "newer" GENI one. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Clearly say whether it's stuck during power on or power off. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Apparently not all GDSCs are the same. In Linux driver, depending on which GDSC flags are set, different status register is checked when powering it on/off. And on top of that, different bit inside that register is tested. Port missing parts from Linux driver to U-Boot: - add GDSC flags; - adjust logic when checking GDSC status to match one in Linux driver. This fixes e.g. SDM660's USB_30_GDSC to be forever stuck during power on, since unlike SDM845 one it doesn't have POLL_CFG_GDSCR flag. Even though only POLL_CFG_GDSCR is the important one here, add all flags from Linux driver, to make it easier to compare which flags are needed for which GDSC, making porting process easier. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Now we need to specify flags for each GDSC for it to function properly. Copy .flags field from respective Linux GCC driver. Turns out, even among SDM845 not all GDSCs are the same. Some of GDSCs do specify the POLL_CFG_GDSCR flag that changes the logic to check the ON/OFF status, other don't. Some qcom clock drivers in U-Boot don't specify any GDSCs at all (apq8016, apq8096, ipq4019, qcs404), or GDSCs in their linux GCC driver don't specify any flags (qcm2290, sm6115) thus making them unaffected by this change. Add flags to all other SoC's GDSCs currently present in U-Boot that do need this change. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add driver for Global Clock Controller used in Qualcomm SDM630/660 SoCs. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add new stdio device driver that allows to store console messages in persistent ram console zone. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Inceasing number of mmc partitions to scan is important one, system or userdata partition have number > 60, which is way above 30. Removing the default BOOTFLOWIF_ONLY_BOOTABLE flag allows us to scan every partition in `bootflow scan -lb` command, not only those with "bootable" flag set. The addition of `bootmeth_setup_fs()` was needed IIRC to fix some nullptr deref somewhere, to fully reinit some struct fields, not sure if it's still needed? Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
SPMI PMIC arbiter V3 is using the same offset calculations as V2. But it needs to scan 512 periperals into channel_map. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Allow to use PMIC GPIOs on SDM630/660 platforms. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add pinctrl pinconf for volume_up gpio HACK because probably it's not correct thing to do, we shouldn't be fixup up upstream DTs, fixes shold go upstream or applied as *-uboot.dtsi maybe?
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
These will be used as base for devices whose device trees are not yet upstream in Linux kernel. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
This is combined DT for both clover & clover-plus devices - differences between them are not relevant to U-Boot. Additionally these DTs have all msm-serial interfaces disabled: * debug UART was never enabled in the first place * Bluetooth UART was explicitly disabled to fix probe errors with qcom_sdm660_clover_defconfig (due to CONFIG_SERIAL_PRESENT being not set). Separate config fragemnt for ramoops debugging. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
+Separate config fragment for ramoops debugging. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: iAboothahir <aboothahirpkd@gmail.com>
Signed-off-by: Antony K. S <postmarketos@smankusors.com>
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
update compatibles for boe panel variant, add athena Signed-off-by: Paul Sajna <hello@paulsajna.com>
Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
1ca58ed to
c8f6f03
Compare
Signed-off-by: N1kroks <nikroksm@mail.ru> WIP serial framebuffer hacks The serial framebuffer can be sometimes useful for debugging early boot failues since it registers as a debug UART. Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
bb933c4 to
e53247c
Compare
8f54e9d to
be3dc8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The serial framebuffer can be sometimes useful for debugging early boot failues since it registers as a debug UART.
Kind of works, experience is very rough though and screen with small letters is hard to read.
In current state, conflicts with simplefb video driver look unsolvable. Needs more work