Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend CI so it can use self-hosted runner #37

Open
wants to merge 61 commits into
base: qcom-sdm660-6.10.y
Choose a base branch
from

Conversation

minlexx
Copy link
Member

@minlexx minlexx commented Aug 7, 2024

And produce .apk package for our kernel, and also boot images in the future.

  • add debug step
  • do not install depends - already in container
  • do not clean build dir - try incremental builds
  • add LOCALVERSION= to make invocations
  • produce linux-postmarketos-qcom-sdm660 package
  • rename CI build steps
  • publish first artifact

minlexx and others added 30 commits August 6, 2024 12:24
Since Android primary bootloader with system-as-root feature [1]
enabled adds some arguments to kernel command line from boot.img,
that make booting Linux harder:

  * skip_initramfs
  * root=/dev/dm-0
  * init=/init
  * dm=...

Most importantly, Linux processes root= parameter and at boot time
skips initramfs and tries to mount root device that does not exist
and fails.

Add a quick hack to scramble these parameters from cmdline passed by
primary bootloader in FDT /chosen/bootargs property, so that Linux
won't accidentally process them.

[1] https://source.android.com/docs/core/architecture/partitions/system-as-root

Signed-off-by: Alexey Minnekhanov <[email protected]>
Generated with:
 $ make savedefconfig && cp defconfig ../arch/arm64/configs/sdm660_defconfig

barni2000: Add CONFIG_DRM_PANEL_BOE_TD4320 as a module.

Signed-off-by: Alexey Minnekhanov <[email protected]>
Signed-off-by: Barnabás Czémán <[email protected]>
Similarly to MSM8998, add and use modem metadata memory region.
This fixes dtbs check warning; but however does not seemingly
affect device functionality.

Signed-off-by: Alexey Minnekhanov <[email protected]>
Describe Wi-Fi device node used in SDM630/660.

Signed-off-by: Alexey Minnekhanov <[email protected]>
Similarly to MSM8996 DragonBoard 820c, MSM8998 and SDM630 are equipped
with Adreno 5xx series, which doesn't have separate pagetables support
at the moment of writing.
Skip the TTBR1 quirk for these two SoCs as to get Adreno in a usable
state.
Add MSM8998 and SDM660's mss-pil compatibles to switch the default
iommu domain type to IDENTITY, as similarly required by SDM845 and
others.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
(JAMI: fixup for 6.0-rc2)
It cannot be taken for granted that the last IOMMU context is free
and available for us to use it to emulate bypass streams and, at least
on MSM8998's lpass iommu, using the last one will produce a crash;
please note that this may not be only dependant on the SoC, but also
on the firmware version.

To overcome to this issue, allow specifying a different context for
bypass emulation with the optional DT property "qcom,bypass-cbndx":
if this property is not found this means that we are either booting
with ACPI instead or that we don't want to specify a custom cb because
the default one (the last context bank) is fine.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
(JAMI: fixup for v6.0-rc1)
On some SoCs some IOMMU context banks are actively used from TZ
during system boot, or some hypervisor configurations will trigger
a system reset upon disabling some protected/secured CBs.

Allow skipping the disablement of such contexts at IOMMU reset time
during initialization with a new implementation detail to work around
this quirk.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Some Qualcomm SoCs' TZ/hypervisor configuration is disallowing the
disablement of some context banks, being them used for tzapps and/or
remote processors; any attempt to disable such CBs will result in
triggering a fault and the system will freeze and/or reset.

For this reason, get a list of context banks that should never get
disabled during smmu initialization through a DT array property
`qcom,reset-nodisable-cbs`.
It was chosen to not hardcode the CBs as this is dependant on the
SoC's firmware, which may vary on different boards.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
(JAMI: fixup for v6.0-rc1)
Avoid modifying the contents of the secure Auxiliary Control Register
on some Qualcomm SoCs: due to a hypervisor configuration on some
firmware versions, this would result in a system crash.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
On the LPASS and ANOC2 IOMMUs, we cannot use the last context to
emulate bypass streams: set the right context banks to avoid crashes.
Some IOMMU context banks are secured and any attempt to disable them
during arm-smmu initialization will result in a system crash.
To work around this issue, add a list of context banks that will never
be disabled, but only reconfigured, at initialization time.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Add binding for the Novatek NT36xxx series touchscreen driver.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
This is a driver for the Novatek in-cell touch controller and
supports various chips from the NT36xxx family, currently
including NT36525, NT36672A, NT36676F, NT36772 and NT36870.

Functionality like wake gestures and firmware flashing is not
included: I am not aware of any of these DrIC+Touch combo
chips not including a non-volatile memory and it should be
highly unlikely to find one, since the touch firmware is
embedded into the DriverIC one, which is obviously necessary
to drive the display unit.

However, the necessary address for the firmware update
procedure was included into the address table in this driver
so, in the event that someone finds the need to implement it
for a reason or another, it will be pretty straightforward to.

This driver is lightly based on the downstream implementation [1].
[1] https://github.com/Rasenkai/caf-tsoft-Novatek-nt36xxx

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
This finally allowed me to get past the 2 ath10k_info()'s in qmi.c!

However, this doesn't fix everything; it seems you *have* to run
diag-router from https://github.com/linux-msm/diag to calm the firmware
down and stop constantly crashing; need to look into a way to get Wi-Fi
working later without needing this debug crap to be running.

link: JamiKettunen/linux-mainline-oneplus5@088eaa9

Signed-off-by: Jami Kettunen <[email protected]>
Ths driver supports the fuel gauge hardware available on PMICs such as PMI8994,
as well as gen 3 fuel gauge hardware available on PMI8998.

Co-developed-by: Caleb Connolly <[email protected]>
Co-developed-by: Yassine Oudjana <[email protected]>
Signed-off-by: Yassine Oudjana <[email protected]>

qcom_fg: expose PROP_STATUS to fix upower not detecting charging status properly

fg: adopt battery info API changes

power: qcom_fg: silence -EPROBE_DEFER error

Sometimes, the devm_power_supply_register function will return
ERR_PTR(-EPROBE_DEFER) to make the driver subsystem probe the fuel guage
later. This is not an error and do not report it as such.

Signed-off-by: Richard Acayan <[email protected]>

power/supply: qcom_fg: add present sysfs property

Present property is required for battery drivers from UPower>=1.90.0
onwards to work properly.

Signed-off-by: Alexander Martinz <[email protected]>

Link: https://gitlab.com/sdm845-mainline/linux/-/commit/b5f9aa03a205d74b7b4e2470cb92c258040849d5
Add bindings for qcom PMIC SPMI haptics driver.

Signed-off-by: Caleb Connolly <[email protected]>
Add support for the haptics found in pmi8998 and related PMICs.
Based on the ff-memless interface. Currently this driver provides
a partial implementation of hardware features.

This driver only supports LRAs (Linear Resonant Actuators) in the "buffer"
mode with a single wave pattern.

Signed-off-by: Caleb Connolly <[email protected]>
Describe fuel gauge and charger on PM660 PMIC.

PM660 has a fuel guage gen 3, which is compatible with the one
used in MSM8998. Readings from round-robin ADC are needed for
charger to function, so add it as well.

Signed-off-by: Aboothahir U <[email protected]>
Signed-off-by: Marijn Suijten <[email protected]>
Signed-off-by: Aboothahir U <[email protected]>
Initial support for Asus Zenfone Max Pro M1 (SDM636)
	* Currently works
	-Simple-framebuffer
	-eMMC,SDCard
	-Power Button
	-Volume-keys
        -Wifi(Partial)
        -Bluetooth
	-Touchscreen-NT36XXX
	-Display
	-GPU(Partial)
	-USB

Signed-off-by: Aboothahir U <[email protected]>

arm64: dts: qcom: asus-x00td: Add support for battery

Enable fuelgauge, charger and round-robin ADC nodes required
for fully functional battery support.
Describe simple-battery node.

Signed-off-by: Aboothahir U <[email protected]>
Initial support for Xiaomi Mi Pad 4.

Currently works:
* simple-framebuffer
* USB
* touchscreen
* GPIO buttons

Signed-off-by: Mark Hargreaves <[email protected]>
For always-on or boot-on regulators their supplies must be specified before
them, because regulator core framework tries to resolve their supplies early
and fails with probe deferral error if it can't.

The supply for PM660L's l3b is buck-or-boost vreg_bob, but it is not
registered yet (it is described as last item). Move it upper above l3b
and others.

Also bob_pin1, bob_pin2 and bob_pin3 are not supported by driver,
remove them.

Signed-off-by: Alexey Minnekhanov <[email protected]>
Add support for the SDM660 Xiaomi Platina (Mi 8 Lite).

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
* Add simple framebuffer display node and reserve memory for it.
* Enable qusb2phy0 and its vdd supplies
* Disable gpucc and mmcc, simplefb stops working after few seconds when these are enabled.
* Add node for touchscreen
* Fix volume keys

Signed-off-by: Molly Sophia <[email protected]>
Enable support for modem remote processor, WCN3990 Wi-Fi and bluetooth
on Xiaomi Redmi Note 7 (lavender).

Durig probe chip is identified as:
 qmi chip_id 0x140 chip_family 0x4002  board_id 0xff soc_id 0x40050000

Signed-off-by: Alexey Minnekhanov <[email protected]>
M0Rf30 and others added 26 commits August 7, 2024 07:03
Commit 1: Initial support
Commit 2: enable touchscreen input and panel
Commit 3: Enable bluetooth

Add support for HCI wcn3990-bt on Xiaomi Redmi Note 6 Pro
tulip.

Commit 4: enable touchscreen input and bluetooth

Signed-off-by: Gianluca Boiano <[email protected]>
alexeymin: this needs to be integrated into panel-novatek-nt36672a.c
as variation with its own compatible string and own init sequences.

[1] https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/panel/panel-novatek-nt36672a.c

Signed-off-by: Joe Mason <[email protected]>
Add initial device tree for Xiaomi Mi A2 phone, codenam jasmine.

Supported features:
* UART serial output
* hw keys (volume up/down, power)
* regulators
* USB
* eMMC

Things lacking full upstream support:
* novatek touchscreen
* modem remote processor + wcn3390 Wi-Fi
* display, GPU, panel + backlight

Signed-off-by: Joe Mason <[email protected]>
…ce DTS

Split Xiaomi Mi Pad 4 (xiaomi-clover) dts to clover-common base dtsi and
separate xiaomi-clover dts. This will be used to later add another
variant of xiaomi-clover device called Mi Pad 4 Plus.

Signed-off-by: Nickolay Goppen <[email protected]>
Add variant of Xiaomi Mi Pad 4 device called Mi Pad 4 Plus
using xiaomi-clover-common as base.

Defferences btween clover and clover-plus include:
 * bigger screen size, different panels
 * different touchscreen

Signed-off-by: Nickolay Goppen <[email protected]>
Temporarily disable GPU preemption because of GPU hangs.
Hangs look like:

 [drm:hangcheck_handler [msm]] *ERROR* 5.1.2.0: hangcheck detected gpu lockup rb 2!
 [drm:hangcheck_handler [msm]] *ERROR* 5.1.2.0:     completed fence: 4294967067
 [drm:hangcheck_handler [msm]] *ERROR* 5.1.2.0:     submitted fence: 4294967074
 [drm:recover_worker [msm]] *ERROR* 5.1.2.0: hangcheck recover!
 [drm:recover_worker [msm]] *ERROR* 5.1.2.0: offending task: Renderer (/usr/lib/firefox-esr/firefox-esr)

Signed-off-by: Barnabás Czémán <[email protected]>
Add zap-shader node for adreno_gpu to be able to load zap shader
firmware, which is required for working GPU.

According to drivers/gpu/drm/msm/adreno/adreno_device.c, Adreno 508
(found in SDM630) uses it's own a508_zap, Adreno 509 (found in
SDM636) uses same a512_zap as Adreno 512.

Signed-off-by: Barnabás Czémán <[email protected]>
Add SDM630/660's MDP5 compatibles to switch the default iommu domain
type to IDENTITY, as similarly required by SDM845 and others.

Signed-off-by: Alexey Minnekhanov <[email protected]>
Add panel-simple used in xiaomi-lavender phone.

Signed-off-by: Alexey Minnekhanov <[email protected]>
…e 6 Pro

Add panel-simple used in xiaomi-tulip phone.

Signed-off-by: Gianluca Boiano <[email protected]>
Add driver for BOE TD4320 DSI panel, used in Xiaomi Redmi Note 7
mobile phone.

Signed-off-by: Barnabás Czémán <[email protected]>
Enable display susystem, Adreno GPU and all required nodes,
such as iommus, gpucc and DSI PHY.
Add panel node.

Relocate zap-shader memory region to avoid CPU stalls.

Signed-off-by: Alexey Minnekhanov <[email protected]>
Add compatibles for Xiaomi Redmi Note 7 (lavender) variants.

Signed-off-by: Barnabás Czémán <[email protected]>
Xiaomi Redmi Note 7 (lavender) has two variant one with tianma display
with novatek touchscreen and one with boe display with synpatics
touchscreen. These changes split lavender devicetree by display.

Signed-off-by: Barnabás Czémán <[email protected]>
The WCN3990 might split MSDUs among multiple "in-order" indications. The
driver needs information from previous indications to handle MPDUs that
are not started by the same indications that complete them. Move the
list that tracks unprocessed MSDUs to the driver state so the driver can
handle MPDUs that are split in this way and be less confused.

Fixes: c545070 ("ath10k: implement rx reorder support")
Signed-off-by: Richard Acayan <[email protected]>
Add driver for 1080x1920 DSI panel used in Sony Xperia XA2
phone.

Signed-off-by: Bhushan Shah <[email protected]>
If the service locator server is restarted fast enough, the PDR can
rewrite locator_addr fields concurrently. Protect them by placing
modification of those fields under the main pdr->lock.

Fixes: fbe639b ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD
Tested-by: Steev Klimaszewski <[email protected]>
Tested-by: Alexey Minnekhanov <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
The in-kernel PD mapper is going to use same message structures as the
QCOM_PDR_HELPERS module. Extract message marshalling data to separate
module that can be used by both PDR helpers and by PD mapper.

Reviewed-by: Bryan O'Donoghue <[email protected]>
Tested-by: Steev Klimaszewski <[email protected]>
Tested-by: Alexey Minnekhanov <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Existing userspace protection domain mapper implementation has several
issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't
reread JSON files if firmware location is changed (or if firmware was
not available at the time pd-mapper was started but the corresponding
directory is mounted later), etc.

Provide in-kernel service implementing protection domain mapping
required to work with several services, which are provided by the DSP
firmware.

This module is loaded automatically by the remoteproc drivers when
necessary via the symbol dependency. It uses a root node to match a
protection domains map for a particular board. It is not possible to
implement it as a 'driver' as there is no corresponding device.

Tested-by: Steev Klimaszewski <[email protected]>
Tested-by: Alexey Minnekhanov <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Request in-kernel protection domain mapper to be started before starting
Qualcomm DSP and release it once DSP is stopped. Once all DSPs are
stopped, the PD mapper will be stopped too.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Tested-by: Steev Klimaszewski <[email protected]>
And produce .apk package for our kernel, and also boot images
in the future.

* add debug step
* do not install depends - already in container
* do not clean build dir - try incremental builds
* add LOCALVERSION= to make invocations
* produce linux-postmarketos-qcom-sdm660 package
* rename CI build steps
* publish first artifact
@minlexx minlexx force-pushed the qcom-sdm660-6.10.y branch 3 times, most recently from a909822 to 37f163f Compare September 9, 2024 19:18
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.