Skip to content

Commit

Permalink
Add FriendlyElec NanoPi-R6C platform
Browse files Browse the repository at this point in the history
  • Loading branch information
S199pWa1k9r authored and MollySophia committed Aug 2, 2023
1 parent e34219f commit f9c0f21
Show file tree
Hide file tree
Showing 9 changed files with 560 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- r58x
- r58-mini
- edge2
- nanopi-r6c
- nanopi-r6s
- nanopc-t6
- blade3
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ This repository contains an UEFI firmware implementation based on EDK2 for vario
- [Mekotronics R58 Mini](https://www.mekotronics.com/h-pd-76.html)
- [Khadas Edge2](https://www.khadas.com/edge2)
- [FriendlyELEC NanoPC T6](https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T6)
- [FriendlyELEC NanoPi R6C](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6C)
- [FriendlyELEC NanoPi R6S](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S)

## Supported peripherals
Applicable to all platforms unless otherwise noted.
Expand Down
3 changes: 3 additions & 0 deletions configs/nanopi-r6c.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DSC_FILE=edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc
PLATFORM_NAME=NanoPi-R6C
SOC=RK3588
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#/** @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)/Pcie3x4.asl
$(RK_COMMON_ACPI_DIR)/Pcie3x2.asl
$(RK_COMMON_ACPI_DIR)/Pcie2x1l0.asl
$(RK_COMMON_ACPI_DIR)/Pcie2x1l1.asl
$(RK_COMMON_ACPI_DIR)/Pcie2x1l2.asl
$(RK_COMMON_ACPI_DIR)/Sata0.asl
$(RK_COMMON_ACPI_DIR)/Sata1.asl
$(RK_COMMON_ACPI_DIR)/Sata2.asl

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

[FixedPcd]
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicRedistributorsBase
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4CfgBaseAddress
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4ApbBaseAddress
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4DbiBaseAddress
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4CfgBaseAddress
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4CfgSize
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4IoBaseAddress
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4IoSize
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4MemBaseAddress
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4MemSize
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4MemBaseAddress64
gRockchipTokenSpaceGuid.PcdPcieRootPort3x4MemSize64
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
36 changes: 36 additions & 0 deletions edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/AcpiTables/Dsdt.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/** @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"

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

include ("Emmc.asl")
include ("Sdhc.asl")
include ("Gmac.asl")
//include ("Gpio.asl")
//include ("I2c.asl")
include ("Uart.asl")
//include ("Spi.asl")

// won't work on Windows, will trigger bugcheck by usbehci
//include ("Usb2Host.asl")

include ("Usb3Host0.asl")
include ("Usb3Host1.asl")
}
}
Loading

0 comments on commit f9c0f21

Please sign in to comment.