Skip to content
Draft
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
3 changes: 3 additions & 0 deletions configs/aiot-rk3588a.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DSC_FILE=edk2-rockchip/Platform/ShiMeta/AIOT-3588A/AIOT-3588A.dsc
PLATFORM_NAME=AIOT-3588A
SOC=RK3588
Binary file not shown.
Binary file added devicetree/vendor/rk3588_smdt_3588a_v12.dtb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## @file
#
# Copyright (c) 2023-2024, Mario Bălănică <mariobalanica02@gmail.com>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

# ACPI Support
INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf

# Device Tree Support
INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf

# Splash screen logo
INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf
118 changes: 118 additions & 0 deletions edk2-rockchip/Platform/ShiMeta/AIOT-3588A/AIOT-3588A.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
## @file
#
# Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
# Copyright (c) 2023, Mario Bălănică <mariobalanica02@gmail.com>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines]
PLATFORM_NAME = AIOT-3588A
PLATFORM_VENDOR = ShiMeta
PLATFORM_GUID = cb957236-be75-4077-aa31-0c3eae75c09c
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010019
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
VENDOR_DIRECTORY = Platform/$(PLATFORM_VENDOR)
PLATFORM_DIRECTORY = $(VENDOR_DIRECTORY)/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = Silicon/Rockchip/RK3588/RK3588.fdf
RK_PLATFORM_FVMAIN_MODULES = $(PLATFORM_DIRECTORY)/$(PLATFORM_NAME).Modules.fdf.inc

#
# HYM8563 RTC support
# I2C location configured by PCDs below.
#
DEFINE RK_RTC8563_ENABLE = TRUE

#
# RK3588-based platform
#
!include Silicon/Rockchip/RK3588/RK3588Platform.dsc.inc

################################################################################
#
# Library Class section - list of all Library Classes needed by this Platform.
#
################################################################################

[LibraryClasses.common]
RockchipPlatformLib|$(PLATFORM_DIRECTORY)/Library/RockchipPlatformLib/RockchipPlatformLib.inf

################################################################################
#
# Pcd Section - list of all EDK II PCD Entries defined by this Platform.
#
################################################################################

[PcdsFixedAtBuild.common]
# SMBIOS platform config
gRockchipTokenSpaceGuid.PcdPlatformName|"ShiMeta AIOT-3588A"
gRockchipTokenSpaceGuid.PcdPlatformVendorName|"ShiMeta AIOT"
gRockchipTokenSpaceGuid.PcdFamilyName|"ShiMeta AIOT"
gRockchipTokenSpaceGuid.PcdProductUrl|"https://www.shimeta.com.cn/productinfo/2669315.html"
gRockchipTokenSpaceGuid.PcdDeviceTreeName|"aiot-rk3588a"

# I2C slaves (bus6 + bus7)
gRockchipTokenSpaceGuid.PcdI2cSlaveAddresses|{ 0x20, 0x22, 0x62, 0x51, 0x11 }
gRockchipTokenSpaceGuid.PcdI2cSlaveBuses|{ 0x6, 0x6, 0x6, 0x6, 0x7 }
gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ TRUE, TRUE, TRUE, TRUE, TRUE }

# RTC
gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51
gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6



#
# PCIe/SATA/USB Combo PIPE PHY support flags and default values
# NanoPC T6 has two 2.5 GBE wired to the first two PCIE2 ports, while the third one is wired to m.2 a+e key
#
gRK3588TokenSpaceGuid.PcdComboPhy0Switchable|TRUE
gRK3588TokenSpaceGuid.PcdComboPhy1Switchable|TRUE
gRK3588TokenSpaceGuid.PcdComboPhy2Switchable|TRUE
gRK3588TokenSpaceGuid.PcdComboPhy0ModeDefault|$(COMBO_PHY_MODE_PCIE)
gRK3588TokenSpaceGuid.PcdComboPhy1ModeDefault|$(COMBO_PHY_MODE_PCIE)
gRK3588TokenSpaceGuid.PcdComboPhy2ModeDefault|$(COMBO_PHY_MODE_PCIE)

# USB2 PHY support flags
gRK3588TokenSpaceGuid.PcdUsb2Phy0Supported | TRUE
gRK3588TokenSpaceGuid.PcdUsb2Phy1Supported | TRUE
gRK3588TokenSpaceGuid.PcdUsb2Phy2Supported | TRUE

#
# I2S
#
gRK3588TokenSpaceGuid.PcdI2S0Supported|TRUE

#
# Display support flags and default values
#
gRK3588TokenSpaceGuid.PcdDisplayConnectors|{CODE({
VOP_OUTPUT_IF_HDMI0,
VOP_OUTPUT_IF_HDMI1
})}

################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform.
#
################################################################################
[Components.common]
# ACPI Support
$(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf

# Device Tree Support
$(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf

# Splash screen logo
$(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf

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/ShiMeta/AIOT-3588A/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 <pete@akeo.ie>
* Copyright (c) 2018-2020, Andrey Warkentin <andrey.warkentin@gmail.com>
* 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.I2C7"
#define BOARD_CODEC_I2C_ADDR 0x11
#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 (I2C7) {
include ("Es8388.asl")
}
}
}
17 changes: 17 additions & 0 deletions edk2-rockchip/Platform/ShiMeta/AIOT-3588A/DeviceTree/Vendor.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#/** @file
#
# Copyright (c) 2024, Mario Bălănică <mariobalanica02@gmail.com>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#**/

[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = DeviceTree-Vendor
FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0

[Binaries]
BIN|devicetree/vendor/rk3588-shimeta-aiot-rk3588a.dtb
Loading