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

Add initial a71 support #349

Merged
merged 7 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Platform/EFI_Binaries
Submodule EFI_Binaries updated 116 files
Binary file added Platform/LG/sm8150/AcpiTables/mh2lm5g/DSDT.aml
Binary file not shown.
Binary file added Platform/LG/sm8150/FdtBlob_compat/mh2lm5g.dtb
Binary file not shown.
39 changes: 39 additions & 0 deletions Platform/LG/sm8150/mh2lm5g.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[Defines]
VENDOR_NAME = LG
PLATFORM_NAME = mh2lm5g
PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010019
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = Platform/Qualcomm/sm8150/sm8150.fdf
DEVICE_DXE_FV_COMPONENTS = Platform/LG/sm8150/mh2lm.fdf.inc

!include Platform/Qualcomm/sm8150/sm8150.dsc

[BuildOptions.common]
GCC:*_*_AARCH64_CC_FLAGS = -DENABLE_SIMPLE_INIT -DMEMMAP_LG_HACKS

[PcdsFixedAtBuild.common]
gQcomTokenSpaceGuid.PcdMipiFrameBufferWidth|1080
gQcomTokenSpaceGuid.PcdMipiFrameBufferHeight|2340
gQcomTokenSpaceGuid.PcdMipiFrameBufferAddress|0x9D200000

# Simple Init
gSimpleInitTokenSpaceGuid.PcdGuiDefaultDPI|355

gRenegadePkgTokenSpaceGuid.PcdDeviceVendor|"LG"
gRenegadePkgTokenSpaceGuid.PcdDeviceProduct|"V50s ThinQ"
gRenegadePkgTokenSpaceGuid.PcdDeviceCodeName|"mh2lm5G"

# Synaptics Touchscren
gQcomTokenSpaceGuid.PcdTouchCtlrAddress|0x20
gQcomTokenSpaceGuid.PcdTouchCtlrResetPin|54
gQcomTokenSpaceGuid.PcdTouchCtlrIntPin|122
gQcomTokenSpaceGuid.PcdTouchCtlrI2cDevice|18
gQcomTokenSpaceGuid.PcdTouchMaxX|1080
gQcomTokenSpaceGuid.PcdTouchMaxY|2340
gQcomTokenSpaceGuid.PcdTouchCtlrVddPin|59
gQcomTokenSpaceGuid.PcdTouchCtlrVddIoPin|152
57 changes: 57 additions & 0 deletions Platform/LG/sm8150/mh2lm5g.fdf.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// per-device BSP DXEs

FILE DRIVER = 8e9bd160-b184-11df-94e2-0800200c9a66 {
SECTION DXE_DEPEX = Platform/EFI_Binaries/Drivers/sm8150/DALSys/DALSys.depex
SECTION PE32 = Platform/EFI_Binaries/Drivers/Devices/mh2lm/DALSys/DALSys.efi
SECTION UI = "DALSys"
}

FILE DRIVER = 5bd181db-0487-4f1a-ae73-820e165611b3 {
SECTION DXE_DEPEX = Platform/EFI_Binaries/Drivers/sm8150/ButtonsDxe/ButtonsDxe.depex
SECTION PE32 = Platform/EFI_Binaries/Drivers/Devices/mh2lm/ButtonsDxe/ButtonsDxe.efi
SECTION UI = "ButtonsDxe"
}

FILE DRIVER = f10f76db-42c1-533f-34a8-69be24653110 {
SECTION DXE_DEPEX = Platform/EFI_Binaries/Drivers/sm8150/SdccDxe/SdccDxe.depex
SECTION PE32 = Platform/EFI_Binaries/Drivers/sm8150/SdccDxe/SdccDxe.efi
SECTION UI = "SdccDxe"
}

FILE DRIVER = 11faed4c-b21f-4d88-8e48-c4c28a1e50df {
SECTION DXE_DEPEX = Platform/EFI_Binaries/Drivers/sm8150/WP_Binaries/UsbPwrCtrlDxe/UsbPwrCtrlDxe.depex
SECTION PE32 = Platform/EFI_Binaries/Drivers/sm8150/WP_Binaries/UsbPwrCtrlDxe/UsbPwrCtrlDxe.efi
SECTION UI = "UsbPwrCtrlDxe"
}

// ACPI Tables
FILE FREEFORM = 7E374E25-8E01-4FEE-87F2-390C23C606CD {

# Customized DSDT
SECTION RAW = Platform/LG/sm8150/AcpiTables/mh2lm/DSDT.aml
# Common Tables
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/APIC.aml
# SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/BERT.aml
# SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/BGRT.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/CSRT.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/DBG2.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/FACP.aml
# SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/FPDT.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/GTDT.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/IORT.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/MCFG.aml
# SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/MSDM.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/PPTT.aml
SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/TPM2.aml
# SECTION RAW = Silicon/Qualcomm/sm8150/AcpiTables/BuiltIn/XSDT.aml
SECTION UI = "AcpiTables"
}

// Mainline device tree blob


#
# Touchscreen
#
# INF Silicon/Qualcomm/QcomPkg/Drivers/SynapticsTCMDxe/SynapticsTCMDevice.inf
# INF Silicon/Qualcomm/QcomPkg/Drivers/SynapticsTCMDxe/SynapticsTCMDxe.inf
13 changes: 11 additions & 2 deletions Platform/Qualcomm/sdm845/sdm845.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ErasePolarity = 1

# This one is tricky, it must be: BlockSize * NumBlocks = Size
BlockSize = 0x00001000
NumBlocks = 0x2000
NumBlocks = 0x700

################################################################################
#
Expand All @@ -49,7 +49,7 @@ NumBlocks = 0x2000
#
################################################################################

0x00000000|0x02000000
0x00000000|0x00700000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
FV = FVMAIN_COMPACT

Expand Down Expand Up @@ -214,6 +214,15 @@ READ_LOCK_STATUS = TRUE
INF GPLDrivers/Application/SwitchSlotsApp/SwitchSlotsApp.inf
!endif

!if $(ENABLE_LINUX_UTILS) == 1
FILE FREEFORM = 4b0364cf-1c5b-47aa-9073-d7b5039ce49b {
SECTION RAW = tools/simpleinit.static.uefi.cfg
SECTION UI = "simpleinit.static.uefi.cfg"
}

INF Platform/RenegadePkg/Application/Reboot2PayloadApp/Reboot2PayloadApp.inf
!endif

# Device specific fdf
!include $(DEVICE_DXE_FV_COMPONENTS)

Expand Down
13 changes: 11 additions & 2 deletions Platform/Qualcomm/sm7125/sm7125.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ErasePolarity = 1

# This one is tricky, it must be: BlockSize * NumBlocks = Size
BlockSize = 0x00001000
NumBlocks = 0x2000
NumBlocks = 0x700

################################################################################
#
Expand All @@ -49,7 +49,7 @@ NumBlocks = 0x2000
#
################################################################################

0x00000000|0x02000000
0x00000000|0x00700000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
FV = FVMAIN_COMPACT

Expand Down Expand Up @@ -208,6 +208,15 @@ READ_LOCK_STATUS = TRUE
INF GPLDrivers/Application/SwitchSlotsApp/SwitchSlotsApp.inf
!endif

!if $(ENABLE_LINUX_UTILS) == 1
FILE FREEFORM = 4b0364cf-1c5b-47aa-9073-d7b5039ce49b {
SECTION RAW = tools/simpleinit.static.uefi.cfg
SECTION UI = "simpleinit.static.uefi.cfg"
}

INF Platform/RenegadePkg/Application/Reboot2PayloadApp/Reboot2PayloadApp.inf
!endif

# Device specific fdf
!include $(DEVICE_DXE_FV_COMPONENTS)

Expand Down
Binary file added Platform/Samsung/sm7150/FdtBlob_compat/a71.dtb
Binary file not shown.
29 changes: 29 additions & 0 deletions Platform/Samsung/sm7150/a71.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[Defines]
VENDOR_NAME = Samsung
PLATFORM_NAME = a71
PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010019
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = Platform/Qualcomm/sm7150/sm7150.fdf
DEVICE_DXE_FV_COMPONENTS = Platform/Samsung/sm7150/a71.fdf.inc

!include Platform/Qualcomm/sm7150/sm7150.dsc

[BuildOptions.common]
GCC:*_*_AARCH64_CC_FLAGS = -DENABLE_SIMPLE_INIT -DENABLE_LINUX_SIMPLE_MASS_STORAGE

[PcdsFixedAtBuild.common]
gQcomTokenSpaceGuid.PcdMipiFrameBufferWidth|1080
gQcomTokenSpaceGuid.PcdMipiFrameBufferHeight|2400
# gQcomTokenSpaceGuid.PcdMipiFrameBufferAddress|0x9c400000

# Simple Init
gSimpleInitTokenSpaceGuid.PcdGuiDefaultDPI|350

gRenegadePkgTokenSpaceGuid.PcdDeviceVendor|"Samsung"
gRenegadePkgTokenSpaceGuid.PcdDeviceProduct|"Galaxy A71"
gRenegadePkgTokenSpaceGuid.PcdDeviceCodeName|"a71"
5 changes: 5 additions & 0 deletions Platform/Samsung/sm7150/a71.fdf.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// per-device BSP DXEs

//FILE FREEFORM = 25462CDA-221F-47DF-AC1D-259CFAA4E326 {
//SECTION RAW = Platform/Samsung/sm7150/FdtBlob/a71.dtb
//}
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions Platform/Xiaomi/sm7125/miatoll-huaxing.sh.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function platform_pre_acpi(){
cp Platform/Xiaomi/sm7125/AcpiTables/miatoll/DSDT_HUAXING.aml Platform/Xiaomi/sm7125/AcpiTables/miatoll/DSDT.aml
DEVICE="miatoll"
EXT="-huaxing"
}
5 changes: 5 additions & 0 deletions Platform/Xiaomi/sm7125/miatoll-tianma.sh.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function platform_pre_acpi(){
cp Platform/Xiaomi/sm7125/AcpiTables/miatoll/DSDT_TIANMA.aml Platform/Xiaomi/sm7125/AcpiTables/miatoll/DSDT.aml
DEVICE="miatoll"
EXT="-tianma"
}
21 changes: 14 additions & 7 deletions Platform/Xiaomi/sm7125/miatoll.fdf.inc
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@



// ACPI Tables
FILE FREEFORM = 7E374E25-8E01-4FEE-87F2-390C23C606CD {
# Customized DSDT
SECTION RAW = Platform/Xiaomi/sm7125/AcpiTables/miatoll/DSDT.aml
# Common Tables
# SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/DBG2.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/FACP.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/GTDT.aml
# SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/IORT.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/MADT.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/PPTT.aml
SECTION UI = "AcpiTables"
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/APIC.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/CSRT.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/DBG2.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/FACP.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/FACS.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/GTDT.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/IORT.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/MCFG.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/PPTT.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/SPCR.aml
SECTION RAW = Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/TPM2.aml
SECTION UI = "AcpiTables"
}


Expand Down
Binary file not shown.
Binary file added Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/FACS.aml
Binary file not shown.
Binary file added Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/MCFG.aml
Binary file not shown.
Binary file added Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/SPCR.aml
Binary file not shown.
Binary file added Silicon/Qualcomm/sm7125/AcpiTables/BuiltIn/TPM2.aml
Binary file not shown.
Loading