Skip to content

Commit

Permalink
feat: OrangePi 5 Pro
Browse files Browse the repository at this point in the history
Add initial support for the OrangePi 5 Pro.
  • Loading branch information
MAHDTech committed Sep 26, 2024
1 parent e7c4ff5 commit 5e760fe
Show file tree
Hide file tree
Showing 9 changed files with 635 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This repository contains an UEFI firmware implementation based on EDK2 for vario
- [Radxa ROCK 5A](https://radxa.com/products/rock5/5a/)
- [Radxa ROCK 5 ITX](https://radxa.com/products/rock5/5itx/)
- [Orange Pi 5](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5.html)
- [Orange Pi 5 Pro](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-Pro.html)
- [Orange Pi 5 Plus](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-plus.html)
- [ameriDroid Indiedroid Nova](https://indiedroid.us)
- [Fydetab Duo](https://fydetabduo.com/)
Expand Down Expand Up @@ -146,6 +147,7 @@ The paths above are relative to the root of the file system. That is, the `dtb`
| `rk3588s-rock-5a` | ROCK 5A |
| `rk3588-rock-5-itx` | ROCK 5 ITX |
| `rk3588s-orangepi-5` | Orange Pi 5 |
| `rk3588s-orangepi-5-pro` | Orange Pi 5 Pro |
| `rk3588-orangepi-5-plus` | Orange Pi 5 Plus |
| `rk3588s-9tripod-linux` | Indiedroid Nova |
| `rk3588s-fydetab-duo` | Fydetab Duo |
Expand Down Expand Up @@ -306,7 +308,18 @@ The firmware can only be built on Linux currently. For Windows use WSL.
For Ubuntu/Debian:
```bash
sudo apt install git gcc g++ build-essential gcc-aarch64-linux-gnu iasl python3-pyelftools uuid-dev
sudo apt install --yes \
build-essential \
device-tree-compiler \
g++ \
gcc \
gcc-aarch64-linux-gnu \
git \
iasl \
python-is-python3 \
python3 \
python3-pyelftools \
uuid-dev
```
For Arch Linux:
```bash
Expand Down
3 changes: 3 additions & 0 deletions configs/orangepi-5pro.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DSC_FILE=edk2-rockchip/Platform/OrangePi/OrangePi5Pro/OrangePi5Pro.dsc
PLATFORM_NAME=OrangePi5Pro
SOC=RK3588
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#/** @file
#
# ACPI table data and ASL sources required to boot the platform.
#
# Copyright (c) 2019-2021, ARM Limited. All rights reserved.
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#**/

[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = AcpiTables
FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
RK_COMMON_ACPI_DIR = Silicon/Rockchip/RK3588/AcpiTables

#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = AARCH64
#

[Sources]
Dsdt.asl
$(RK_COMMON_ACPI_DIR)/Madt.aslc
$(RK_COMMON_ACPI_DIR)/Fadt.aslc
$(RK_COMMON_ACPI_DIR)/Gtdt.aslc
$(RK_COMMON_ACPI_DIR)/Spcr.aslc
$(RK_COMMON_ACPI_DIR)/Mcfg.aslc
$(RK_COMMON_ACPI_DIR)/Dbg2.aslc
$(RK_COMMON_ACPI_DIR)/Pptt.aslc

[Packages]
ArmPkg/ArmPkg.dec
ArmPlatformPkg/ArmPlatformPkg.dec
EmbeddedPkg/EmbeddedPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
Silicon/Rockchip/RockchipPkg.dec
Silicon/Rockchip/RK3588/RK3588.dec

[FixedPcd]
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicRedistributorsBase
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
gRK3588TokenSpaceGuid.PcdI2S0Supported
gRK3588TokenSpaceGuid.PcdI2S1Supported
gRockchipTokenSpaceGuid.PcdRkMtlMailBoxBase
gRockchipTokenSpaceGuid.PcdRkMtlMailBoxSize
gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken
53 changes: 53 additions & 0 deletions edk2-rockchip/Platform/OrangePi/OrangePi5Pro/AcpiTables/Dsdt.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/** @file
*
* Differentiated System Definition Table (DSDT)
*
* Copyright (c) 2020, Pete Batard <[email protected]>
* Copyright (c) 2018-2020, Andrey Warkentin <[email protected]>
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) 2021, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
**/

#include "AcpiTables.h"

#define BOARD_I2S1_TPLG "i2s-jack"

#define BOARD_AUDIO_CODEC_HID "ESSX8388"
#define BOARD_CODEC_I2C "\\_SB.I2C6"
#define BOARD_CODEC_I2C_ADDR 0x10
#define BOARD_CODEC_GPIO "\\_SB.GPI1"
#define BOARD_CODEC_GPIO_PIN GPIO_PIN_PD5

DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2)
{
Scope (\_SB_)
{
include ("DsdtCommon.asl")

include ("Cpu.asl")

include ("Pcie.asl")
include ("Sata.asl")
// include ("Emmc.asl")
include ("Sdhc.asl")
include ("Dma.asl")
include ("Gmac1.asl")
include ("Gpio.asl")
include ("I2c.asl")
include ("Uart.asl")
// include ("Spi.asl")

include ("I2s.asl")

include ("Usb2Host.asl")
include ("Usb3Host0.asl")
include ("Usb3Host2.asl")

Scope (I2C6) {
include ("Es8388.asl")
}
}
}
Loading

0 comments on commit 5e760fe

Please sign in to comment.