Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- rock-5b
- rock-5bplus
- station-m3
- vicharak-axon
CONFIGURATION: ${{ fromJSON(format('[{0}]', inputs.build-configs || '"Debug"')) }}
steps:
- name: Checkout
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Note that this list is subject to change at any time as devices gain better supp
- [Mixtile Blade 3](https://www.mixtile.com/blade-3)
- [FriendlyELEC NanoPi M6](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_M6)
- [Hinlink H88K](http://www.hinlink.com)
- [Vicharak Axon](https://vicharak.in/axon)

# Supported OSes
## In ACPI mode
Expand Down Expand Up @@ -222,6 +223,7 @@ In addition to the default paths above, it is possible to specify custom ones vi
| `rk3588s-nanopi-r6s` | NanoPi R6S |
| `rk3588s-nanopi-m6` | NanoPi M6 |
| `rk3588-hinlink-h88k` | H88K |
| `rk3588-axon-linux` | Vicharak Axon |

**Notes:**
* The firmware applies some fix-ups to the DTB depending on the user settings (e.g. PCIe/SATA/USB selection, making SATA overlays redundant). These fix-ups are not applied when providing overrides by other means, such as the Grub `devicetree` command.
Expand Down
3 changes: 3 additions & 0 deletions configs/vicharak-axon.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DSC_FILE=edk2-rockchip/Platform/Vicharak/Axon/Axon.dsc
PLATFORM_NAME=Axon
SOC=RK3588
2 changes: 2 additions & 0 deletions devicetree/vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
* rk3588s-fydetab-duo: <https://github.com/Linux-for-Fydetab-Duo/linux-rockchip/tree/14294048d2a0deb7f38c890329aded87038d3299/arch/arm64/boot/dts/rockchip>
(note: dtb taken from the `noble` branch which is based on the rockchip 6.1 rkr3 bsp kernel)

* rk3588-axon: <https://github.com/vicharak-in/vicharak-linux-kernel/tree/6.1/arch/arm64/boot/dts/rockchip>

## License
SPDX-License-Identifier: GPL-2.0-only
Binary file added devicetree/vendor/rk3588-axon-linux.dtb
Binary file not shown.
58 changes: 58 additions & 0 deletions edk2-rockchip/Platform/Vicharak/Axon/AcpiTables/AcpiTables.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
55 changes: 55 additions & 0 deletions edk2-rockchip/Platform/Vicharak/Axon/AcpiTables/Dsdt.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/** @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_I2S0_TPLG "i2s-jack"

#define BOARD_AUDIO_CODEC_HID "ESSX8388"
#define BOARD_CODEC_I2C "\\_SB.I2C3"
#define BOARD_CODEC_I2C_ADDR 0x11
#define BOARD_CODEC_GPIO "\\_SB.GPI1"
#define BOARD_CODEC_GPIO_PIN GPIO_PIN_PC4

DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RPIFDN", "RPI", 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 ("Usb3Host1.asl")
include ("Usb3Host2.asl")

Scope (I2C3) {
include ("Es8388.asl")
}
}
}

17 changes: 17 additions & 0 deletions edk2-rockchip/Platform/Vicharak/Axon/Axon.Modules.fdf.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## @file
#
# Copyright (c) 2023, Mario Bălănică <[email protected]>
# Copyright (c) 2023, Utsav Balar <[email protected]>
#
# 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
148 changes: 148 additions & 0 deletions edk2-rockchip/Platform/Vicharak/Axon/Axon.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
## @file
#
# Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
# Copyright (c) 2023, Mario Bălănică <[email protected]>
# Copyright (c) 2023, Utsav Balar <[email protected]>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines]
PLATFORM_NAME = Axon
PLATFORM_VENDOR = Vicharak
PLATFORM_GUID = 9c75d879-067d-4b8b-89f6-ea717829ea23
PLATFORM_VERSION = 0.2
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

#
# PCA95XX GPIO extender support
# I2C location configured by PCDs below.
#
DEFINE RK_PCA95XX_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|"Axon"
gRockchipTokenSpaceGuid.PcdPlatformVendorName|"Vicharak"
gRockchipTokenSpaceGuid.PcdFamilyName|"Axon"
gRockchipTokenSpaceGuid.PcdProductUrl|"https://vicharak.in/"
gRockchipTokenSpaceGuid.PcdDeviceTreeName|"rk3588-axon-linux.dtb"

# I2C
gRockchipTokenSpaceGuid.PcdI2cSlaveAddresses|{ 0x42, 0x43, 0x51, 0x24, 0x11 }
gRockchipTokenSpaceGuid.PcdI2cSlaveBuses|{ 0x0, 0x0, 0x0, 0x6, 0x3 }
gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE, FALSE, FALSE }
gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 }
gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 }
gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) }
gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51
gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x0
gRockchipTokenSpaceGuid.PcdPca95xxAddress|0x24
gRockchipTokenSpaceGuid.PcdPca95xxBus|0x6
gRockchipTokenSpaceGuid.PcdPca95xxType|"PCA9554"

#
# CPU Performance default values
#
gRK3588TokenSpaceGuid.PcdCPULClusterClockPresetDefault|$(CPU_PERF_CLUSTER_CLOCK_PRESET_BOOTDEFAULT)
gRK3588TokenSpaceGuid.PcdCPUB01ClusterClockPresetDefault|$(CPU_PERF_CLUSTER_CLOCK_PRESET_BOOTDEFAULT)
gRK3588TokenSpaceGuid.PcdCPUB23ClusterClockPresetDefault|$(CPU_PERF_CLUSTER_CLOCK_PRESET_BOOTDEFAULT)

#
# PCIe/SATA/USB Combo PIPE PHY support flags and default values
#
gRK3588TokenSpaceGuid.PcdComboPhy0Switchable|FALSE
gRK3588TokenSpaceGuid.PcdComboPhy1Switchable|TRUE
gRK3588TokenSpaceGuid.PcdComboPhy2Switchable|TRUE
gRK3588TokenSpaceGuid.PcdComboPhy0ModeDefault|$(COMBO_PHY_MODE_SATA)
gRK3588TokenSpaceGuid.PcdComboPhy1ModeDefault|$(COMBO_PHY_MODE_PCIE)
gRK3588TokenSpaceGuid.PcdComboPhy2ModeDefault|$(COMBO_PHY_MODE_PCIE)

#
# USB/DP Combo PHY support flags and default values
#
gRK3588TokenSpaceGuid.PcdUsbDpPhy0Supported|TRUE
gRK3588TokenSpaceGuid.PcdUsbDpPhy1Supported|TRUE
gRK3588TokenSpaceGuid.PcdDp0LaneMux|{ 0x2, 0x3 }
gRK3588TokenSpaceGuid.PcdDp1LaneMux|{ 0x0 }

#
# On-Board fan output
#
gRK3588TokenSpaceGuid.PcdHasOnBoardFanOutput|FALSE

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

#
# GMAC
#
gRK3588TokenSpaceGuid.PcdGmac1Supported|TRUE
gRK3588TokenSpaceGuid.PcdGmac1TxDelay|0x43

#
# I2S
#
gRK3588TokenSpaceGuid.PcdI2S0Supported|TRUE

################################################################################
#
# 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
17 changes: 17 additions & 0 deletions edk2-rockchip/Platform/Vicharak/Axon/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ă <[email protected]>
#
# 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-axon-linux.dtb
Loading