├── .github └── workflows │ ├── build.yml │ ├── nightly.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── README.md ├── build.sh ├── configs ├── RK3588.conf ├── aio-3588q.conf ├── blade3.conf ├── edge2.conf ├── fydetab-duo.conf ├── h88k.conf ├── indiedroid-nova.conf ├── itx-3588j.conf ├── nanopc-cm3588-nas.conf ├── nanopc-t6.conf ├── nanopi-m6.conf ├── nanopi-r6c.conf ├── nanopi-r6s.conf ├── orangepi-5.conf ├── orangepi-5plus.conf ├── powerstation-6.conf ├── r58-mini.conf ├── r58x.conf ├── roc-rk3588s-pc.conf ├── rock-5-itx.conf ├── rock-5a.conf ├── rock-5b.conf ├── rock-5bplus.conf └── station-m3.conf ├── devicetree ├── mainline │ ├── README.md │ ├── rk3588-buzztv-p6.dts │ ├── rk3588-friendlyelec-cm3588-nas-fixup.dts │ ├── rk3588-nanopc-t6-fixup.dts │ ├── rk3588-rock-5-itx-fixup.dts │ ├── rk3588s-indiedroid-nova-fixup.dts │ ├── rk3588s-khadas-edge2-fixup.dts │ ├── rk3588s-nanopi-r6c-fixup.dts │ ├── rk3588s-nanopi-r6s-fixup.dts │ └── rk3588s-rock-5a-fixup.dts └── vendor │ ├── README.md │ ├── itx-3588j.dtb │ ├── rk3588-blade3-v101-linux.dtb │ ├── rk3588-blueberry-edge-v12-linux.dtb │ ├── rk3588-blueberry-minipc-linux.dtb │ ├── rk3588-buzztv-p6-android.dtb │ ├── rk3588-firefly-aio-3588q.dtb │ ├── rk3588-hinlink-h88k.dtb │ ├── rk3588-nanopc-cm3588-nas.dtb │ ├── rk3588-nanopc-t6.dtb │ ├── rk3588-nanopi-m6.dtb │ ├── rk3588-orangepi-5-plus.dtb │ ├── rk3588-rock-5-itx.dtb │ ├── rk3588-rock-5b-plus.dtb │ ├── rk3588-rock-5b.dtb │ ├── rk3588s-9tripod-linux.dtb │ ├── rk3588s-fydetab-duo.dtb │ ├── rk3588s-khadas-edge2.dtb │ ├── rk3588s-nanopi-r6c.dtb │ ├── rk3588s-nanopi-r6s.dtb │ ├── rk3588s-orangepi-5.dtb │ ├── rk3588s-rock-5a.dtb │ └── roc-rk3588s-pc.dtb ├── edk2-rockchip ├── Platform │ ├── Ameridroid │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ └── IndiedroidNova │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ ├── Mainline.inf │ │ │ └── Vendor.inf │ │ │ ├── IndiedroidNova.Modules.fdf.inc │ │ │ ├── IndiedroidNova.dsc │ │ │ └── Library │ │ │ └── RockchipPlatformLib │ │ │ ├── RockchipPlatformLib.c │ │ │ └── RockchipPlatformLib.inf │ ├── BuzzTV │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ └── PowerStation6 │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ ├── Mainline.inf │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── PowerStation6.Modules.fdf.inc │ │ │ └── PowerStation6.dsc │ ├── Firefly │ │ ├── AIO-3588Q │ │ │ ├── AIO-3588Q.Modules.fdf.inc │ │ │ ├── AIO-3588Q.dsc │ │ │ ├── AIO-3588Q.dsc.inc │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ └── Vendor.inf │ │ │ └── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ ├── RockchipPlatformLib.inf │ │ │ │ └── RockchipPlatformLibPcaDepex.inf │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ ├── ITX-3588J │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ └── Vendor.inf │ │ │ ├── ITX-3588J.Modules.fdf.inc │ │ │ ├── ITX-3588J.dsc │ │ │ ├── ITX-3588J.dsc.inc │ │ │ └── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ └── ROC-RK3588S-PC │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── ROC-RK3588S-PC.Modules.fdf.inc │ │ │ ├── ROC-RK3588S-PC.dsc │ │ │ └── ROC-RK3588S-PC.dsc.inc │ ├── FriendlyElec │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ ├── NanoPC-CM3588-NAS │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── NanoPC-CM3588-NAS.Modules.fdf.inc │ │ │ └── NanoPC-CM3588-NAS.dsc │ │ ├── NanoPC-T6 │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── NanoPC-T6.Modules.fdf.inc │ │ │ └── NanoPC-T6.dsc │ │ ├── NanoPi-M6 │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── NanoPi-M6.Modules.fdf.inc │ │ │ └── NanoPi-M6.dsc │ │ ├── NanoPi-R6C │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── NanoPi-R6C.Modules.fdf.inc │ │ │ └── NanoPi-R6C.dsc │ │ └── NanoPi-R6S │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ ├── Mainline.inf │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── NanoPi-R6S.Modules.fdf.inc │ │ │ └── NanoPi-R6S.dsc │ ├── FydeInnovations │ │ └── FydetabDuo │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ └── Vendor.inf │ │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ │ ├── FydetabDuo.Modules.fdf.inc │ │ │ ├── FydetabDuo.dsc │ │ │ └── Library │ │ │ └── RockchipPlatformLib │ │ │ ├── CsotDsiPanel.c │ │ │ ├── RockchipPlatformLib.c │ │ │ └── RockchipPlatformLib.inf │ ├── Hinlink │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ └── H88K │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ └── Vendor.inf │ │ │ ├── H88K.Modules.fdf.inc │ │ │ ├── H88K.dsc │ │ │ └── Library │ │ │ └── RockchipPlatformLib │ │ │ ├── RockchipPlatformLib.c │ │ │ └── RockchipPlatformLib.inf │ ├── Khadas │ │ ├── Drivers │ │ │ ├── KhadasMcuDxe │ │ │ │ ├── KhadasMcuDxe.c │ │ │ │ ├── KhadasMcuDxe.h │ │ │ │ └── KhadasMcuDxe.inf │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ ├── Edge2 │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Edge2.Modules.fdf.inc │ │ │ ├── Edge2.dsc │ │ │ └── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ ├── Include │ │ │ └── Protocol │ │ │ │ └── KhadasMcu.h │ │ └── KhadasPkg.dec │ ├── Mekotronics │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ ├── R58-Mini │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── R58-Mini.Modules.fdf.inc │ │ │ └── R58-Mini.dsc │ │ └── R58X │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── R58X.Modules.fdf.inc │ │ │ └── R58X.dsc │ ├── Mixtile │ │ ├── Blade3 │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── Blade3.Modules.fdf.inc │ │ │ ├── Blade3.dsc │ │ │ ├── DeviceTree │ │ │ │ └── Vendor.inf │ │ │ └── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ └── Drivers │ │ │ └── LogoDxe │ │ │ ├── Logo.bmp │ │ │ ├── Logo.c │ │ │ ├── Logo.idf │ │ │ └── LogoDxe.inf │ ├── OrangePi │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ ├── OrangePi5 │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── OrangePi5.Modules.fdf.inc │ │ │ └── OrangePi5.dsc │ │ └── OrangePi5Plus │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ ├── Mainline.inf │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── OrangePi5Plus.Modules.fdf.inc │ │ │ └── OrangePi5Plus.dsc │ ├── Radxa │ │ ├── Drivers │ │ │ └── LogoDxe │ │ │ │ ├── Logo.bmp │ │ │ │ ├── Logo.c │ │ │ │ ├── Logo.idf │ │ │ │ └── LogoDxe.inf │ │ ├── ROCK5A │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── ROCK5A.Modules.fdf.inc │ │ │ └── ROCK5A.dsc │ │ ├── ROCK5B │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ ├── Mainline.inf │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── ROCK5B.Modules.fdf.inc │ │ │ └── ROCK5B.dsc │ │ ├── ROCK5BPlus │ │ │ ├── AcpiTables │ │ │ │ ├── AcpiTables.inf │ │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ │ └── RockchipPlatformLib │ │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── ROCK5BPlus.Modules.fdf.inc │ │ │ └── ROCK5BPlus.dsc │ │ └── ROCK5ITX │ │ │ ├── AcpiTables │ │ │ ├── AcpiTables.inf │ │ │ └── Dsdt.asl │ │ │ ├── DeviceTree │ │ │ ├── Mainline.inf │ │ │ └── Vendor.inf │ │ │ ├── Library │ │ │ └── RockchipPlatformLib │ │ │ │ ├── RockchipPlatformLib.c │ │ │ │ └── RockchipPlatformLib.inf │ │ │ ├── ROCK5ITX.Modules.fdf.inc │ │ │ └── ROCK5ITX.dsc │ └── StationPC │ │ ├── Drivers │ │ └── LogoDxe │ │ │ ├── Logo.bmp │ │ │ ├── Logo.c │ │ │ ├── Logo.idf │ │ │ └── LogoDxe.inf │ │ └── StationM3 │ │ └── StationM3.dsc └── Silicon │ ├── Rockchip │ ├── Applications │ │ ├── I2cDemoTest │ │ │ ├── I2cDemoTest.c │ │ │ ├── I2cDemoTest.inf │ │ │ └── I2cDemoTest.uni │ │ ├── MaskromReset │ │ │ ├── MaskromReset.c │ │ │ └── MaskromReset.inf │ │ └── SpiTool │ │ │ ├── SpiFlashCmd.c │ │ │ ├── SpiFlashCmd.inf │ │ │ └── SpiFlashCmd.uni │ ├── Drivers │ │ ├── DwcSdhciDxe │ │ │ ├── DwcSdhciDxe.c │ │ │ ├── DwcSdhciDxe.h │ │ │ └── DwcSdhciDxe.inf │ │ ├── ExitBootServicesHookDxe │ │ │ ├── ExitBootServicesHook.h │ │ │ ├── ExitBootServicesHookDxe.c │ │ │ ├── ExitBootServicesHookDxe.inf │ │ │ └── OsIdentification.c │ │ ├── I2c │ │ │ ├── I2cDemoDxe │ │ │ │ ├── I2cDemoDxe.c │ │ │ │ ├── I2cDemoDxe.h │ │ │ │ └── I2cDemoDxe.inf │ │ │ ├── I2cDxe │ │ │ │ ├── I2cDxe.c │ │ │ │ ├── I2cDxe.h │ │ │ │ └── I2cDxe.inf │ │ │ └── Rk860xRegulatorDxe │ │ │ │ ├── Rk860xRegulatorDxe.c │ │ │ │ ├── Rk860xRegulatorDxe.h │ │ │ │ └── Rk860xRegulatorDxe.inf │ │ ├── LcdGraphicsOutputDxe │ │ │ ├── DisplayModes.c │ │ │ ├── Edid.c │ │ │ ├── LcdGraphicsOutputBlt.c │ │ │ ├── LcdGraphicsOutputDxe.c │ │ │ ├── LcdGraphicsOutputDxe.h │ │ │ └── LcdGraphicsOutputDxe.inf │ │ ├── NetworkStackConfigDxe │ │ │ ├── NetworkStackConfigDxe.c │ │ │ ├── NetworkStackConfigDxe.h │ │ │ ├── NetworkStackConfigDxe.inf │ │ │ ├── NetworkStackConfigDxeHii.uni │ │ │ ├── NetworkStackConfigDxeHii.vfr │ │ │ ├── NetworkStackEnabledLib.c │ │ │ ├── NetworkStackEnabledLib.inf │ │ │ ├── NetworkStackHttpBootEnabledLib.inf │ │ │ ├── NetworkStackIpv4EnabledLib.inf │ │ │ ├── NetworkStackIpv6EnabledLib.inf │ │ │ └── NetworkStackPxeBootEnabledLib.inf │ │ ├── NorFlashDxe │ │ │ ├── NorFlashDxe.c │ │ │ └── NorFlashDxe.inf │ │ ├── OhciDxe │ │ │ ├── ComponentName.c │ │ │ ├── ComponentName.h │ │ │ ├── Descriptor.h │ │ │ ├── Ohci.c │ │ │ ├── Ohci.h │ │ │ ├── OhciDebug.c │ │ │ ├── OhciDebug.h │ │ │ ├── OhciDxe.inf │ │ │ ├── OhciReg.c │ │ │ ├── OhciReg.h │ │ │ ├── OhciSched.c │ │ │ ├── OhciSched.h │ │ │ ├── OhciUrb.c │ │ │ ├── OhciUrb.h │ │ │ ├── UsbHcMem.c │ │ │ └── UsbHcMem.h │ │ ├── Pca9555Dxe │ │ │ ├── Pca9555Dxe.c │ │ │ ├── Pca9555Dxe.h │ │ │ └── Pca9555Dxe.inf │ │ ├── PlatformSmbiosDxe │ │ │ ├── Crc32Table.h │ │ │ ├── PlatformSmbiosDxe.c │ │ │ └── PlatformSmbiosDxe.inf │ │ ├── RkFvbDxe │ │ │ ├── RkFvbDxe.c │ │ │ ├── RkFvbDxe.h │ │ │ └── RkFvbDxe.inf │ │ ├── RkSdmmcDxe │ │ │ ├── RkSdmmcDxe.c │ │ │ └── RkSdmmcDxe.inf │ │ ├── Rtc8563PlatformDxe │ │ │ ├── Rtc8563PlatformDxe.c │ │ │ └── Rtc8563PlatformDxe.inf │ │ ├── RuntimeServicesManagerDxe │ │ │ ├── RuntimeServicesManagerDxe.c │ │ │ └── RuntimeServicesManagerDxe.inf │ │ ├── StatusLedDxe │ │ │ ├── StatusLedDxe.c │ │ │ └── StatusLedDxe.inf │ │ ├── UsbHcdInitDxe │ │ │ ├── UsbHcd.c │ │ │ ├── UsbHcd.h │ │ │ └── UsbHcd.inf │ │ └── Vop2Dxe │ │ │ ├── Vop2Dxe.c │ │ │ ├── Vop2Dxe.h │ │ │ └── Vop2Dxe.inf │ ├── FvCompactModules.fdf.inc │ ├── FvMainAprioriDxe.fdf.inc │ ├── FvMainModules.fdf.inc │ ├── FvRules.fdf.inc │ ├── Include │ │ ├── Guid │ │ │ └── NetworkStackConfigFormSet.h │ │ ├── IndustryStandard │ │ │ └── Edid.h │ │ ├── Library │ │ │ ├── AcpiNextLib.h │ │ │ ├── AnalogixDpLib.h │ │ │ ├── BaseVariableLib.h │ │ │ ├── CruLib.h │ │ │ ├── DrmModes.h │ │ │ ├── DwHdmiQpLib.h │ │ │ ├── DwcSdhciPlatformLib.h │ │ │ ├── Fspi.h │ │ │ ├── HalDef.h │ │ │ ├── MediaBusFormat.h │ │ │ ├── OtpLib.h │ │ │ ├── PWMLib.h │ │ │ ├── RK806.h │ │ │ ├── RkAtagsLib.h │ │ │ ├── RkSdmmcPlatformLib.h │ │ │ ├── RockchipDisplayLib.h │ │ │ ├── RockchipPlatformLib.h │ │ │ ├── SaradcLib.h │ │ │ ├── SdramLib.h │ │ │ ├── Snor.h │ │ │ ├── SpiLib.h │ │ │ ├── SpiMem.h │ │ │ ├── Vop2Regs.h │ │ │ ├── drm_dp_helper.h │ │ │ ├── drm_dsc.h │ │ │ ├── drm_mipi_dsi.h │ │ │ ├── errno.h │ │ │ ├── mipi_display.h │ │ │ └── uboot-env.h │ │ ├── Protocol │ │ │ ├── DpPhy.h │ │ │ ├── ExitBootServicesOsNotify.h │ │ │ ├── I2c.h │ │ │ ├── I2cDemo.h │ │ │ ├── NorFlashProtocol.h │ │ │ ├── OhciDeviceProtocol.h │ │ │ ├── Pca9555.h │ │ │ ├── Rk860xRegulator.h │ │ │ ├── RockchipConnectorProtocol.h │ │ │ ├── RockchipCrtcProtocol.h │ │ │ ├── RockchipDsiPanel.h │ │ │ └── RockchipI2cMasterProtocol.h │ │ └── RockchipDisplay.h │ ├── Library │ │ ├── BaseVariableLib │ │ │ ├── BaseVariableLib.c │ │ │ ├── BaseVariableLib.inf │ │ │ └── Variable.h │ │ ├── CruLib │ │ │ ├── CruLib.c │ │ │ └── CruLib.inf │ │ ├── DisplayLib │ │ │ ├── AnalogixDpLib.c │ │ │ ├── AnalogixDpLib.inf │ │ │ ├── AnalogixDpReg.c │ │ │ ├── DwDpLib.c │ │ │ ├── DwDpLib.inf │ │ │ ├── DwHdmiQpLib.c │ │ │ ├── DwHdmiQpLib.inf │ │ │ ├── DwMipiDsi2Lib.c │ │ │ ├── DwMipiDsi2Lib.inf │ │ │ ├── PhyRockchipSamsungHdptx.c │ │ │ ├── PhyRockchipSamsungHdptxHdmi.c │ │ │ ├── RockchipDisplayLib.c │ │ │ ├── RockchipDisplayLib.inf │ │ │ ├── drm_dp_helper.c │ │ │ ├── drm_dsc.c │ │ │ ├── drm_mipi_dsi.c │ │ │ ├── rockchip_phy.c │ │ │ ├── rockchip_phy.h │ │ │ └── samsung_mipi_dcphy.c │ │ ├── Dw8250SerialPortLib │ │ │ ├── DebugDw8250SerialPortLib.c │ │ │ ├── DebugDw8250SerialPortLib.inf │ │ │ ├── Dw8250SerialPortLib.c │ │ │ ├── Dw8250SerialPortLib.h │ │ │ ├── Dw8250SerialPortLib.inf │ │ │ └── Dw8250SerialPortLibCommon.c │ │ ├── DwcSdhciPlatformLibNull │ │ │ ├── DwcSdhciPlatformLibNull.c │ │ │ └── DwcSdhciPlatformLibNull.inf │ │ ├── FspiLib │ │ │ ├── FspiLib.c │ │ │ └── FspiLib.inf │ │ ├── PWMLib │ │ │ ├── PWMLib.c │ │ │ └── PWMLib.inf │ │ ├── Pcf8563RealTimeClockLib │ │ │ ├── Pcf8563RealTimeClockLib.c │ │ │ ├── Pcf8563RealTimeClockLib.dec │ │ │ └── Pcf8563RealTimeClockLib.inf │ │ ├── PlatformBootDescriptionLib │ │ │ ├── PlatformBootDescriptionLib.c │ │ │ └── PlatformBootDescriptionLib.inf │ │ ├── PlatformBootManagerLib │ │ │ ├── PlatformBm.c │ │ │ ├── PlatformBm.h │ │ │ └── PlatformBootManagerLib.inf │ │ ├── PlatformFlashAccessLib │ │ │ ├── PlatformFlashAccessLibDxe.c │ │ │ └── PlatformFlashAccessLibDxe.inf │ │ ├── RkAtagsLib │ │ │ ├── RkAtagsLib.c │ │ │ └── RkAtagsLib.inf │ │ ├── RkMtlLib │ │ │ ├── RkMtlLib.c │ │ │ ├── RkMtlLib.inf │ │ │ ├── RkMtlPrivateLib.h │ │ │ └── source.txt │ │ ├── RkSdmmcPlatformLibNull │ │ │ ├── RkSdmmcPlatformLibNull.c │ │ │ └── RkSdmmcPlatformLibNull.inf │ │ ├── SdramLib │ │ │ ├── SdramLib.c │ │ │ └── SdramLib.inf │ │ └── SpiLib │ │ │ ├── RK806.c │ │ │ ├── RK806.inf │ │ │ ├── SpiLib.c │ │ │ └── SpiLib.inf │ ├── RK3588 │ │ ├── AcpiTables │ │ │ ├── Cpu.asl │ │ │ ├── Dbg2.aslc │ │ │ ├── Dma.asl │ │ │ ├── DsdtCommon.asl │ │ │ ├── Emmc.asl │ │ │ ├── Es8388.asl │ │ │ ├── Fadt.aslc │ │ │ ├── Gmac0.asl │ │ │ ├── Gmac1.asl │ │ │ ├── Gpio.asl │ │ │ ├── Gtdt.aslc │ │ │ ├── I2c.asl │ │ │ ├── I2s.asl │ │ │ ├── Madt.aslc │ │ │ ├── Mcfg.aslc │ │ │ ├── Pcie.asl │ │ │ ├── Pptt.aslc │ │ │ ├── RK3588PcieIort.aslc │ │ │ ├── Sata.asl │ │ │ ├── Scmi.asl │ │ │ ├── Sdhc.asl │ │ │ ├── Spcr.aslc │ │ │ ├── Spi.asl │ │ │ ├── Uart.asl │ │ │ ├── Usb2Host.asl │ │ │ ├── Usb3Host0.asl │ │ │ ├── Usb3Host1.asl │ │ │ └── Usb3Host2.asl │ │ ├── Drivers │ │ │ ├── AcpiPlatformDxe │ │ │ │ ├── AcpiPlatformDxe.c │ │ │ │ └── AcpiPlatformDxe.inf │ │ │ ├── FdtPlatformDxe │ │ │ │ ├── FdtPlatformDxe.c │ │ │ │ └── FdtPlatformDxe.inf │ │ │ ├── GmacPlatformDxe │ │ │ │ ├── EthernetPhy.h │ │ │ │ ├── GmacPlatformDxe.c │ │ │ │ ├── GmacPlatformDxe.inf │ │ │ │ ├── MotorcommPhy.c │ │ │ │ └── RealtekPhy.c │ │ │ ├── RK3588Dxe │ │ │ │ ├── ComboPhy.c │ │ │ │ ├── ComboPhy.h │ │ │ │ ├── ConfigTable.c │ │ │ │ ├── ConfigTable.h │ │ │ │ ├── CpuPerformance.c │ │ │ │ ├── CpuPerformance.h │ │ │ │ ├── DebugSerialPort.c │ │ │ │ ├── DebugSerialPort.h │ │ │ │ ├── Display.c │ │ │ │ ├── Display.h │ │ │ │ ├── FanControl.c │ │ │ │ ├── FanControl.h │ │ │ │ ├── PciExpress30.c │ │ │ │ ├── PciExpress30.h │ │ │ │ ├── RK3588Dxe.c │ │ │ │ ├── RK3588Dxe.h │ │ │ │ ├── RK3588Dxe.inf │ │ │ │ ├── RK3588DxeFormSetGuid.h │ │ │ │ ├── RK3588DxeHii.uni │ │ │ │ ├── RK3588DxeHii.vfr │ │ │ │ ├── UsbDpPhy.c │ │ │ │ └── UsbDpPhy.h │ │ │ └── UsbDpPhyDxe │ │ │ │ ├── UsbDpPhy.h │ │ │ │ ├── UsbDpPhyDxe.c │ │ │ │ ├── UsbDpPhyDxe.inf │ │ │ │ ├── errno.h │ │ │ │ └── uboot-env.h │ │ ├── Include │ │ │ ├── AcpiTables.h │ │ │ ├── Library │ │ │ │ ├── GpioLib.h │ │ │ │ ├── Pcie30PhyLib.h │ │ │ │ ├── Rk3588Mem.h │ │ │ │ └── Rk3588Pcie.h │ │ │ ├── RK3588.h │ │ │ ├── RK3588RegsPeri.h │ │ │ ├── ScmiDefinitions.h │ │ │ ├── Soc.h │ │ │ └── VarStoreData.h │ │ ├── Library │ │ │ ├── DwcSdhciPlatformLib │ │ │ │ ├── DwcSdhciPlatformLib.c │ │ │ │ └── DwcSdhciPlatformLib.inf │ │ │ ├── GpioLib │ │ │ │ ├── GpioLib.c │ │ │ │ └── GpioLib.inf │ │ │ ├── MemoryInitPeiLib │ │ │ │ ├── MemoryInitPeiLib.c │ │ │ │ └── MemoryInitPeiLib.inf │ │ │ ├── OtpLib │ │ │ │ ├── OtpLib.c │ │ │ │ └── OtpLib.inf │ │ │ ├── Pcie30PhyLib │ │ │ │ ├── Pcie30PhyLib.c │ │ │ │ └── Pcie30PhyLib.inf │ │ │ ├── PlatformLib │ │ │ │ ├── PlatformLib.inf │ │ │ │ ├── Rk3588.c │ │ │ │ ├── Rk3588Helper.S │ │ │ │ └── Rk3588Mem.c │ │ │ ├── ResetSystemLib │ │ │ │ ├── ResetSystemLib.c │ │ │ │ └── ResetSystemLib.inf │ │ │ ├── Rk3588CruLib │ │ │ │ ├── Rk3588CruLib.c │ │ │ │ └── Rk3588CruLib.inf │ │ │ ├── Rk3588PciHostBridgeLib │ │ │ │ ├── PciHostBridgeInit.c │ │ │ │ ├── PciHostBridgeInit.h │ │ │ │ ├── PciHostBridgeLib.c │ │ │ │ └── Rk3588PciHostBridgeLib.inf │ │ │ ├── Rk3588PciSegmentLib │ │ │ │ ├── PciSegmentLib.c │ │ │ │ ├── Rk3588PciSegmentLib.inf │ │ │ │ └── Rk3588PciSegmentLib.uni │ │ │ ├── RkSdmmcPlatformLib │ │ │ │ ├── RkSdmmcPlatformLib.c │ │ │ │ └── RkSdmmcPlatformLib.inf │ │ │ └── SaradcLib │ │ │ │ ├── SaradcLib.c │ │ │ │ └── SaradcLib.inf │ │ ├── RK3588.dec │ │ ├── RK3588.fdf │ │ ├── RK3588Base.dsc.inc │ │ ├── RK3588Platform.dsc.inc │ │ └── RK3588SPlatform.dsc.inc │ ├── Rockchip.dsc.inc │ └── RockchipPkg.dec │ └── Synopsys │ └── DesignWare │ ├── DesignWarePkg.dec │ ├── Drivers │ ├── DwMmcHcDxe │ │ ├── ComponentName.c │ │ ├── DwMmcHcDxe.c │ │ ├── DwMmcHcDxe.h │ │ ├── DwMmcHcDxe.inf │ │ ├── DwMmcHci.c │ │ ├── DwMmcHci.h │ │ ├── EmmcDevice.c │ │ └── SdDevice.c │ └── DwcEqosSnpDxe │ │ ├── AdapterInfo.c │ │ ├── ComponentName.c │ │ ├── DwcEqosSnpDxe.c │ │ ├── DwcEqosSnpDxe.inf │ │ ├── Eqos.h │ │ ├── EqosHw.h │ │ ├── EqosUtil.c │ │ └── SimpleNetwork.c │ └── Include │ └── Protocol │ ├── DwcEqosPlatformDevice.h │ └── PlatformDwMmc.h ├── images └── edk2-frontpage.png └── misc ├── extractbl31.py ├── repack.sh ├── rk3588_spi_nor_gpt.img ├── rk3588_spi_nor_gpt.txt ├── rk3588_spl.dtb ├── rk3588_spl_v1.12.bin ├── tools ├── aarch64 │ └── mkimage └── x86_64 │ └── mkimage └── uefi_rk3588.its /.github/workflows/nightly.yml: -------------------------------------------------------------------------------- 1 | name: Nightly 2 | run-name: Nightly build 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | 7 | jobs: 8 | prepare: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | actions: write 12 | steps: 13 | - name: Delete previous cancelled runs 14 | uses: Mattraks/delete-workflow-runs@v2 15 | with: 16 | retain_days: 0 17 | keep_minimum_runs: 0 18 | delete_workflow_pattern: ${{ github.workflow }} 19 | delete_run_by_conclusion_pattern: cancelled 20 | 21 | - name: Check for new commits 22 | id: check-new-commits 23 | uses: adriangl/check-new-commits-action@v1 24 | with: 25 | seconds: 86400 # One day in seconds 26 | branch: 'master' 27 | 28 | - name: Cancel action if no new commits 29 | if: ${{ steps.check-new-commits.outputs.has-new-commits != 'true' }} 30 | uses: andymckay/cancel-action@0.3 31 | 32 | - name: Wait for cancellation 33 | if: ${{ steps.check-new-commits.outputs.has-new-commits != 'true' }} 34 | shell: bash 35 | run: while true; do echo "Waiting for job to be cancelled"; sleep 5; done 36 | 37 | build_for_nightly: 38 | needs: prepare 39 | uses: ./.github/workflows/build.yml 40 | with: 41 | build-configs: '"Debug", "Release"' 42 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | tags: 5 | - '*' 6 | 7 | jobs: 8 | build_for_release: 9 | uses: ./.github/workflows/build.yml 10 | with: 11 | build-configs: '"Debug", "Release"' 12 | 13 | release: 14 | runs-on: ubuntu-latest 15 | needs: build_for_release 16 | permissions: 17 | contents: write 18 | steps: 19 | - name: Download all workflow run artifacts 20 | uses: actions/download-artifact@v4 21 | 22 | - name: Create release 23 | uses: softprops/action-gh-release@v2 24 | with: 25 | draft: true 26 | prerelease: false 27 | files: "*/*Release*.img" 28 | fail_on_unmatched_files: true 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | boot-*.img 2 | uefi-*.img 3 | uefi-*.img.gz 4 | workspace 5 | *.dll 6 | ramdisk 7 | .cache 8 | .vscode 9 | *.swp 10 | *.rej 11 | *.orig 12 | *_FLASH.img 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "edk2"] 2 | path = edk2 3 | url = https://github.com/tianocore/edk2.git 4 | [submodule "edk2-non-osi"] 5 | path = edk2-non-osi 6 | url = https://github.com/tianocore/edk2-non-osi.git 7 | [submodule "misc/rkbin"] 8 | path = misc/rkbin 9 | url = https://github.com/rockchip-linux/rkbin.git 10 | [submodule "arm-trusted-firmware"] 11 | path = arm-trusted-firmware 12 | url = https://github.com/worproject/arm-trusted-firmware 13 | branch = rk3588 14 | [submodule "devicetree/mainline/upstream"] 15 | path = devicetree/mainline/upstream 16 | url = https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git 17 | [submodule "edk2-platforms"] 18 | path = edk2-platforms 19 | url = https://github.com/tianocore/edk2-platforms.git 20 | -------------------------------------------------------------------------------- /configs/RK3588.conf: -------------------------------------------------------------------------------- 1 | MINIALL_INI=RK3588MINIALL.ini 2 | TRUST_INI=RK3588TRUST.ini 3 | TFA_PLAT=rk3588_reference_pmic 4 | -------------------------------------------------------------------------------- /configs/aio-3588q.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Firefly/AIO-3588Q/AIO-3588Q.dsc 2 | PLATFORM_NAME=AIO-3588Q 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/blade3.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Mixtile/Blade3/Blade3.dsc 2 | PLATFORM_NAME=Blade3 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/edge2.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Khadas/Edge2/Edge2.dsc 2 | PLATFORM_NAME=Edge2 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/fydetab-duo.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.dsc 2 | PLATFORM_NAME=FydetabDuo 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/h88k.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Hinlink/H88K/H88K.dsc 2 | PLATFORM_NAME=H88K 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/indiedroid-nova.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Ameridroid/IndiedroidNova/IndiedroidNova.dsc 2 | PLATFORM_NAME=IndiedroidNova 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/itx-3588j.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Firefly/ITX-3588J/ITX-3588J.dsc 2 | PLATFORM_NAME=ITX-3588J 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/nanopc-cm3588-nas.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/FriendlyElec/NanoPC-CM3588-NAS/NanoPC-CM3588-NAS.dsc 2 | PLATFORM_NAME=NanoPC-CM3588-NAS 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/nanopc-t6.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.dsc 2 | PLATFORM_NAME=NanoPC-T6 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/nanopi-m6.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/FriendlyElec/NanoPi-M6/NanoPi-M6.dsc 2 | PLATFORM_NAME=NanoPi-M6 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/nanopi-r6c.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc 2 | PLATFORM_NAME=NanoPi-R6C 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/nanopi-r6s.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/NanoPi-R6S.dsc 2 | PLATFORM_NAME=NanoPi-R6S 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/orangepi-5.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/OrangePi/OrangePi5/OrangePi5.dsc 2 | PLATFORM_NAME=OrangePi5 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/orangepi-5plus.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/OrangePi/OrangePi5Plus/OrangePi5Plus.dsc 2 | PLATFORM_NAME=OrangePi5Plus 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/powerstation-6.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/BuzzTV/PowerStation6/PowerStation6.dsc 2 | PLATFORM_NAME=PowerStation6 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/r58-mini.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Mekotronics/R58-Mini/R58-Mini.dsc 2 | PLATFORM_NAME=R58-Mini 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/r58x.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Mekotronics/R58X/R58X.dsc 2 | PLATFORM_NAME=R58X 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/roc-rk3588s-pc.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.dsc 2 | PLATFORM_NAME=ROC-RK3588S-PC 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/rock-5-itx.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Radxa/ROCK5ITX/ROCK5ITX.dsc 2 | PLATFORM_NAME=ROCK5ITX 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/rock-5a.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.dsc 2 | PLATFORM_NAME=ROCK5A 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/rock-5b.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.dsc 2 | PLATFORM_NAME=ROCK5B 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/rock-5bplus.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/Radxa/ROCK5BPlus/ROCK5BPlus.dsc 2 | PLATFORM_NAME=ROCK5BPlus 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /configs/station-m3.conf: -------------------------------------------------------------------------------- 1 | DSC_FILE=edk2-rockchip/Platform/StationPC/StationM3/StationM3.dsc 2 | PLATFORM_NAME=StationM3 3 | SOC=RK3588 4 | -------------------------------------------------------------------------------- /devicetree/mainline/README.md: -------------------------------------------------------------------------------- 1 | # Rockchip Mainline Device Trees 2 | New board files, small additions and fixes reusing existing bindings are accepted here, but only as a stopgap until they get merged upstream. 3 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588-friendlyelec-cm3588-nas-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588-friendlyelec-cm3588-nas.dts" 4 | 5 | &hdmi0_sound { 6 | status = "okay"; 7 | }; 8 | 9 | &hdmi1_sound { 10 | status = "okay"; 11 | }; 12 | 13 | &i2s5_8ch { 14 | status = "okay"; 15 | }; 16 | 17 | &i2s6_8ch { 18 | status = "okay"; 19 | }; 20 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588-nanopc-t6-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588-nanopc-t6.dts" 4 | 5 | &hdmi0_sound { 6 | status = "okay"; 7 | }; 8 | 9 | &hdmi1_sound { 10 | status = "okay"; 11 | }; 12 | 13 | &i2s5_8ch { 14 | status = "okay"; 15 | }; 16 | 17 | &i2s6_8ch { 18 | status = "okay"; 19 | }; 20 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588-rock-5-itx-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588-rock-5-itx.dts" 4 | 5 | / { 6 | /delete-node/ pcie-oscillator; 7 | }; 8 | 9 | &hdmi1_sound { 10 | status = "okay"; 11 | }; 12 | 13 | &i2s6_8ch { 14 | status = "okay"; 15 | }; 16 | 17 | /* 18 | * Remove the "pcie30_refclk" gated-fixed-clock to maintain compatibility 19 | * with kernels older than v6.13-rc1. It is backed by a GPIO regulator 20 | * anyway, so simply referencing it in vpcie3v3-supply also addresses 21 | * the potential issue where pcie3x2 might probe earlier than pcie3x4 and 22 | * hang on DBI access because the clock didn't have a chance to be enabled. 23 | */ 24 | &pcie3x2 { 25 | clocks = <&cru ACLK_PCIE_2L_MSTR>, <&cru ACLK_PCIE_2L_SLV>, 26 | <&cru ACLK_PCIE_2L_DBI>, <&cru PCLK_PCIE_2L>, 27 | <&cru CLK_PCIE_AUX1>, <&cru CLK_PCIE2L_PIPE>; 28 | clock-names = "aclk_mst", "aclk_slv", 29 | "aclk_dbi", "pclk", 30 | "aux", "pipe"; 31 | vpcie3v3-supply = <&vcc3v3_pi6c_05>; 32 | }; 33 | 34 | &pcie3x4 { 35 | clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>, 36 | <&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>, 37 | <&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>; 38 | clock-names = "aclk_mst", "aclk_slv", 39 | "aclk_dbi", "pclk", 40 | "aux", "pipe"; 41 | }; 42 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588s-indiedroid-nova-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588s-indiedroid-nova.dts" 4 | 5 | &hdmi0_sound { 6 | status = "okay"; 7 | }; 8 | 9 | &i2s5_8ch { 10 | status = "okay"; 11 | }; 12 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588s-nanopi-r6c-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588s-nanopi-r6c.dts" 4 | 5 | &hdmi0_sound { 6 | status = "okay"; 7 | }; 8 | 9 | &i2s5_8ch { 10 | status = "okay"; 11 | }; 12 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588s-nanopi-r6s-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588s-nanopi-r6s.dts" 4 | 5 | &hdmi0_sound { 6 | status = "okay"; 7 | }; 8 | 9 | &i2s5_8ch { 10 | status = "okay"; 11 | }; 12 | -------------------------------------------------------------------------------- /devicetree/mainline/rk3588s-rock-5a-fixup.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | 3 | #include "rk3588s-rock-5a.dts" 4 | 5 | &hdmi0_sound { 6 | status = "okay"; 7 | }; 8 | 9 | &i2s5_8ch { 10 | status = "okay"; 11 | }; 12 | -------------------------------------------------------------------------------- /devicetree/vendor/README.md: -------------------------------------------------------------------------------- 1 | # Rockchip Vendor BSP Device Trees 2 | ## Sources 3 | * 4 | * Updated to `rk-6.1-rkr1` branch, currently called `vendor` branch in armbian/build 5 | 6 | * roc-rk3588s-pc: 7 | 8 | * itx-3588j: 9 | (note: in the dtb given here, the builtin bootargs in the source above were commented out 10 | before building. Not sure if that was a necessary step - SS) 11 | 12 | * rk3588-firefly-aio-3588q: 13 | 14 | * rk3588-rock-5b-plus: 15 | 16 | * rk3588s-fydetab-duo: 17 | (note: dtb taken from the `noble` branch which is based on the rockchip 6.1 rkr3 bsp kernel) 18 | 19 | ## License 20 | SPDX-License-Identifier: GPL-2.0-only 21 | -------------------------------------------------------------------------------- /devicetree/vendor/itx-3588j.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/itx-3588j.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-blade3-v101-linux.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-blade3-v101-linux.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-blueberry-edge-v12-linux.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-blueberry-edge-v12-linux.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-blueberry-minipc-linux.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-blueberry-minipc-linux.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-buzztv-p6-android.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-buzztv-p6-android.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-firefly-aio-3588q.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-firefly-aio-3588q.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-hinlink-h88k.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-hinlink-h88k.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-nanopc-cm3588-nas.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-nanopc-cm3588-nas.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-nanopc-t6.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-nanopc-t6.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-nanopi-m6.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-nanopi-m6.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-orangepi-5-plus.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-orangepi-5-plus.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-rock-5-itx.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-rock-5-itx.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-rock-5b-plus.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-rock-5b-plus.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588-rock-5b.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588-rock-5b.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-9tripod-linux.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-9tripod-linux.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-fydetab-duo.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-fydetab-duo.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-khadas-edge2.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-khadas-edge2.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-nanopi-r6c.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-nanopi-r6c.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-nanopi-r6s.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-nanopi-r6s.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-orangepi-5.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-orangepi-5.dtb -------------------------------------------------------------------------------- /devicetree/vendor/rk3588s-rock-5a.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/rk3588s-rock-5a.dtb -------------------------------------------------------------------------------- /devicetree/vendor/roc-rk3588s-pc.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/devicetree/vendor/roc-rk3588s-pc.dtb -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Ameridroid/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Ameridroid/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Ameridroid/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Ameridroid/IndiedroidNova/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588s-indiedroid-nova-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Ameridroid/IndiedroidNova/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-9tripod-linux.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Ameridroid/IndiedroidNova/IndiedroidNova.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Ameridroid/IndiedroidNova/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/BuzzTV/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/Drivers/LogoDxe/LogoDxe.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The default logo bitmap picture shown on setup screen. 3 | # 4 | # Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
5 | # Copyright (c) 2018, Linaro, Ltd. All rights reserved.
6 | # Copyright (c) 2022 Rockchip Electronics Co. Ltd. 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | # 11 | ## 12 | 13 | [Defines] 14 | INF_VERSION = 0x0001001A 15 | BASE_NAME = LogoDxe 16 | FILE_GUID = 4b55f0bc-8b1a-11ec-bd4b-f42a7dcb925d 17 | MODULE_TYPE = DXE_DRIVER 18 | VERSION_STRING = 1.0 19 | 20 | ENTRY_POINT = InitializeLogo 21 | # 22 | # This flag specifies whether HII resource section is generated into PE image. 23 | # 24 | UEFI_HII_RESOURCE_SECTION = TRUE 25 | 26 | [Sources] 27 | Logo.bmp 28 | Logo.c 29 | Logo.idf 30 | 31 | [Packages] 32 | MdeModulePkg/MdeModulePkg.dec 33 | MdePkg/MdePkg.dec 34 | 35 | [LibraryClasses] 36 | UefiBootServicesTableLib 37 | UefiDriverEntryPoint 38 | DebugLib 39 | 40 | [Protocols] 41 | gEfiHiiDatabaseProtocolGuid ## CONSUMES 42 | gEfiHiiImageExProtocolGuid ## CONSUMES 43 | gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES 44 | gEdkiiPlatformLogoProtocolGuid ## PRODUCES 45 | 46 | [Depex] 47 | gEfiHiiDatabaseProtocolGuid AND 48 | gEfiHiiImageExProtocolGuid 49 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/PowerStation6/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | include ("Gmac1.asl") 30 | include ("Gpio.asl") 31 | include ("I2c.asl") 32 | include ("Uart.asl") 33 | 34 | include ("Usb2Host.asl") 35 | include ("Usb3Host0.asl") 36 | include ("Usb3Host1.asl") 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/PowerStation6/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588-buzztv-p6.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/PowerStation6/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-buzztv-p6-android.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/PowerStation6/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/BuzzTV/PowerStation6/PowerStation6.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/AIO-3588Q/AIO-3588Q.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE Platform/Firefly/AIO-3588Q/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB Platform/Firefly/AIO-3588Q/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/AIO-3588Q/AIO-3588Q.dsc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2014-2018, Linaro Limited. All rights reserved. 4 | # Copyright (c) 2023, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | ## 9 | 10 | ################################################################################ 11 | # 12 | # Defines Section - statements that will be processed to create a Makefile. 13 | # 14 | ################################################################################ 15 | [Defines] 16 | PLATFORM_NAME = AIO-3588Q 17 | PLATFORM_VENDOR = Firefly 18 | PLATFORM_GUID = 400f8259-7664-47df-b375-8ba262e4867e 19 | PLATFORM_VERSION = 0.2 20 | DSC_SPECIFICATION = 0x00010019 21 | OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) 22 | VENDOR_DIRECTORY = Platform/$(PLATFORM_VENDOR) 23 | PLATFORM_DIRECTORY = $(VENDOR_DIRECTORY)/$(PLATFORM_NAME) 24 | SUPPORTED_ARCHITECTURES = AARCH64 25 | BUILD_TARGETS = DEBUG|RELEASE 26 | SKUID_IDENTIFIER = DEFAULT 27 | 28 | # 29 | # Platform based on AIO-3588Q board 30 | # 31 | !include Platform/Firefly/AIO-3588Q/AIO-3588Q.dsc.inc 32 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/AIO-3588Q/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-firefly-aio-3588q.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/AIO-3588Q/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Protocols] 36 | gPca95xxProtocolGuid 37 | 38 | [Sources.common] 39 | RockchipPlatformLib.c 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/AIO-3588Q/Library/RockchipPlatformLib/RockchipPlatformLibPcaDepex.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Protocols] 36 | gPca95xxProtocolGuid 37 | 38 | [Sources.common] 39 | RockchipPlatformLib.c 40 | 41 | # Hack to enable use of PCA9555 during PCIe initialization. 42 | [Depex] 43 | gPca95xxProtocolGuid 44 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Firefly/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/Drivers/LogoDxe/LogoDxe.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The default logo bitmap picture shown on setup screen. 3 | # 4 | # Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
5 | # Copyright (c) 2018, Linaro, Ltd. All rights reserved.
6 | # Copyright (c) 2022 Rockchip Electronics Co. Ltd. 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | # 11 | ## 12 | 13 | [Defines] 14 | INF_VERSION = 0x0001001A 15 | BASE_NAME = LogoDxe 16 | FILE_GUID = 4b55f0bc-8b1a-11ec-bd4b-f42a7dcb925d 17 | MODULE_TYPE = DXE_DRIVER 18 | VERSION_STRING = 1.0 19 | 20 | ENTRY_POINT = InitializeLogo 21 | # 22 | # This flag specifies whether HII resource section is generated into PE image. 23 | # 24 | UEFI_HII_RESOURCE_SECTION = TRUE 25 | 26 | [Sources] 27 | Logo.bmp 28 | Logo.c 29 | Logo.idf 30 | 31 | [Packages] 32 | MdeModulePkg/MdeModulePkg.dec 33 | MdePkg/MdePkg.dec 34 | 35 | [LibraryClasses] 36 | UefiBootServicesTableLib 37 | UefiDriverEntryPoint 38 | DebugLib 39 | 40 | [Protocols] 41 | gEfiHiiDatabaseProtocolGuid ## CONSUMES 42 | gEfiHiiImageExProtocolGuid ## CONSUMES 43 | gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES 44 | gEdkiiPlatformLogoProtocolGuid ## PRODUCES 45 | 46 | [Depex] 47 | gEfiHiiDatabaseProtocolGuid AND 48 | gEfiHiiImageExProtocolGuid 49 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ITX-3588J/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | include ("Gmac0.asl") 30 | include ("Gmac1.asl") 31 | include ("Gpio.asl") 32 | include ("I2c.asl") 33 | include ("Uart.asl") 34 | // include ("Spi.asl") 35 | 36 | include ("Usb2Host.asl") 37 | include ("Usb3Host0.asl") 38 | include ("Usb3Host1.asl") 39 | include ("Usb3Host2.asl") 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ITX-3588J/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/itx-3588j.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ITX-3588J/ITX-3588J.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # Copyright (c) 2023, Shimrra Shai 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | ## 9 | 10 | # ACPI Support 11 | INF RuleOverride = ACPITABLE Platform/Firefly/ITX-3588J/AcpiTables/AcpiTables.inf 12 | 13 | # Device Tree Support 14 | INF RuleOverride = DTB Platform/Firefly/ITX-3588J/DeviceTree/Vendor.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ITX-3588J/ITX-3588J.dsc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2014-2018, Linaro Limited. All rights reserved. 4 | # Copyright (c) 2023, Mario Bălănică 5 | # Copyright (c) 2023, Shimrra Shai 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | ## 10 | 11 | ################################################################################ 12 | # 13 | # Defines Section - statements that will be processed to create a Makefile. 14 | # 15 | ################################################################################ 16 | [Defines] 17 | PLATFORM_NAME = ITX-3588J 18 | PLATFORM_VENDOR = Firefly 19 | PLATFORM_GUID = db88a604-ec99-4d39-84d4-af4fa5b5e757 20 | PLATFORM_VERSION = 0.2 21 | DSC_SPECIFICATION = 0x00010019 22 | OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) 23 | VENDOR_DIRECTORY = Platform/$(PLATFORM_VENDOR) 24 | PLATFORM_DIRECTORY = $(VENDOR_DIRECTORY)/$(PLATFORM_NAME) 25 | SUPPORTED_ARCHITECTURES = AARCH64 26 | BUILD_TARGETS = DEBUG|RELEASE 27 | SKUID_IDENTIFIER = DEFAULT 28 | 29 | # 30 | # Platform based on ITX-3588J board 31 | # 32 | !include Platform/Firefly/ITX-3588J/ITX-3588J.dsc.inc 33 | 34 | 35 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ITX-3588J/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Protocols] 36 | gPca95xxProtocolGuid 37 | 38 | [Sources.common] 39 | RockchipPlatformLib.c 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/roc-rk3588s-pc.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE Platform/Firefly/ROC-RK3588S-PC/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB Platform/Firefly/ROC-RK3588S-PC/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/FriendlyElec/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-CM3588-NAS/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | #define BOARD_I2S0_TPLG "i2s-jack" 17 | 18 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 19 | { 20 | Scope (\_SB_) 21 | { 22 | include ("DsdtCommon.asl") 23 | 24 | include ("Cpu.asl") 25 | 26 | include ("Pcie.asl") 27 | include ("Sata.asl") 28 | include ("Emmc.asl") 29 | include ("Sdhc.asl") 30 | include ("Dma.asl") 31 | // include ("Gmac.asl") 32 | include ("Gpio.asl") 33 | include ("I2c.asl") 34 | include ("Uart.asl") 35 | // include ("Spi.asl") 36 | 37 | include ("I2s.asl") 38 | 39 | include ("Usb2Host.asl") 40 | include ("Usb3Host0.asl") 41 | include ("Usb3Host1.asl") 42 | // include ("Usb3Host2.asl") 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-CM3588-NAS/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588-friendlyelec-cm3588-nas-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-CM3588-NAS/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-nanopc-cm3588-nas.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-CM3588-NAS/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-CM3588-NAS/NanoPC-CM3588-NAS.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | #define BOARD_I2S0_TPLG "i2s-jack" 17 | 18 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 19 | { 20 | Scope (\_SB_) 21 | { 22 | include ("DsdtCommon.asl") 23 | 24 | include ("Cpu.asl") 25 | 26 | include ("Pcie.asl") 27 | include ("Sata.asl") 28 | include ("Emmc.asl") 29 | include ("Sdhc.asl") 30 | include ("Dma.asl") 31 | // include ("Gmac.asl") 32 | include ("Gpio.asl") 33 | include ("I2c.asl") 34 | include ("Uart.asl") 35 | // include ("Spi.asl") 36 | 37 | include ("I2s.asl") 38 | 39 | include ("Usb2Host.asl") 40 | include ("Usb3Host0.asl") 41 | include ("Usb3Host1.asl") 42 | // include ("Usb3Host2.asl") 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588-nanopc-t6-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-nanopc-t6.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-M6/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588S", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | include ("Gmac0.asl") 30 | include ("Gpio.asl") 31 | include ("I2c.asl") 32 | include ("Uart.asl") 33 | //include ("Spi.asl") 34 | 35 | include ("Usb2Host.asl") 36 | include ("Usb3Host0.asl") 37 | include ("Usb3Host1.asl") 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-M6/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-nanopi-m6.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-M6/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-M6/NanoPi-M6.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # Copyright (c) 2023, Sergey Tyuryukanov 5 | # Copyright (c) 2024, LokiSharp 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | ## 10 | 11 | # ACPI Support 12 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 13 | 14 | # Device Tree Support 15 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 16 | 17 | # Splash screen logo 18 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 19 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588S", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | include ("Gmac1.asl") 30 | include ("Gpio.asl") 31 | include ("I2c.asl") 32 | include ("Uart.asl") 33 | //include ("Spi.asl") 34 | 35 | include ("Usb2Host.asl") 36 | include ("Usb3Host0.asl") 37 | include ("Usb3Host1.asl") 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588s-nanopi-r6c-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-nanopi-r6c.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # Copyright (c) 2023, Sergey Tyuryukanov 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | ## 9 | 10 | # ACPI Support 11 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 12 | 13 | # Device Tree Support 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 15 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 16 | 17 | # Splash screen logo 18 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 19 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | include ("Gmac1.asl") 30 | include ("Gpio.asl") 31 | include ("I2c.asl") 32 | include ("Uart.asl") 33 | // include ("Spi.asl") 34 | 35 | include ("Usb2Host.asl") 36 | include ("Usb3Host0.asl") 37 | include ("Usb3Host2.asl") 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588s-nanopi-r6s-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-nanopi-r6s.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/NanoPi-R6S.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FydeInnovations/FydetabDuo/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-fydetab-duo.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FydeInnovations/FydetabDuo/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/FydeInnovations/FydetabDuo/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FydeInnovations/FydetabDuo/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FydeInnovations/FydetabDuo/FydetabDuo.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(PLATFORM_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/FydeInnovations/FydetabDuo/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | TimerLib 35 | UefiBootServicesTableLib 36 | 37 | [Protocols] 38 | gRockchipDsiPanelProtocolGuid 39 | 40 | [Sources.common] 41 | RockchipPlatformLib.c 42 | CsotDsiPanel.c 43 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Hinlink/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Hinlink/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Hinlink/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Hinlink/Drivers/LogoDxe/LogoDxe.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The default logo bitmap picture shown on setup screen. 3 | # 4 | # Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
5 | # Copyright (c) 2018, Linaro, Ltd. All rights reserved.
6 | # Copyright (c) 2022 Rockchip Electronics Co. Ltd. 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | # 11 | ## 12 | 13 | [Defines] 14 | INF_VERSION = 0x0001001A 15 | BASE_NAME = LogoDxe 16 | FILE_GUID = 4b55f0bc-8b1a-11ec-bd4b-f42a7dcb925d 17 | MODULE_TYPE = DXE_DRIVER 18 | VERSION_STRING = 1.0 19 | 20 | ENTRY_POINT = InitializeLogo 21 | # 22 | # This flag specifies whether HII resource section is generated into PE image. 23 | # 24 | UEFI_HII_RESOURCE_SECTION = TRUE 25 | 26 | [Sources] 27 | Logo.bmp 28 | Logo.c 29 | Logo.idf 30 | 31 | [Packages] 32 | MdeModulePkg/MdeModulePkg.dec 33 | MdePkg/MdePkg.dec 34 | 35 | [LibraryClasses] 36 | UefiBootServicesTableLib 37 | UefiDriverEntryPoint 38 | DebugLib 39 | 40 | [Protocols] 41 | gEfiHiiDatabaseProtocolGuid ## CONSUMES 42 | gEfiHiiImageExProtocolGuid ## CONSUMES 43 | gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES 44 | gEdkiiPlatformLogoProtocolGuid ## PRODUCES 45 | 46 | [Depex] 47 | gEfiHiiDatabaseProtocolGuid AND 48 | gEfiHiiImageExProtocolGuid 49 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Hinlink/H88K/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-hinlink-h88k.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Hinlink/H88K/H88K.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Hinlink/H88K/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | TimerLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Drivers/KhadasMcuDxe/KhadasMcuDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Khadas MCU platform driver 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010005 13 | BASE_NAME = KhadasMcuDxe 14 | FILE_GUID = a9d195e1-85a0-426f-b364-413e6d2350a7 15 | MODULE_TYPE = DXE_DRIVER 16 | VERSION_STRING = 1.0 17 | ENTRY_POINT = KhadasMcuDxeInitialize 18 | 19 | [Sources.common] 20 | KhadasMcuDxe.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | MdeModulePkg/MdeModulePkg.dec 25 | Platform/Khadas/KhadasPkg.dec 26 | Silicon/Rockchip/RockchipPkg.dec 27 | 28 | [LibraryClasses] 29 | BaseLib 30 | BaseMemoryLib 31 | MemoryAllocationLib 32 | DebugLib 33 | PcdLib 34 | UefiLib 35 | UefiBootServicesTableLib 36 | UefiDriverEntryPoint 37 | 38 | [Protocols] 39 | gEfiI2cIoProtocolGuid ## CONSUMES 40 | gEfiDriverBindingProtocolGuid ## PRODUCES 41 | gKhadasMcuProtocolGuid ## PRODUCES 42 | 43 | [Pcd] 44 | gKhadasTokenSpaceGuid.PcdKhadasMcuAddress 45 | gKhadasTokenSpaceGuid.PcdKhadasMcuBus 46 | 47 | [Depex] 48 | TRUE 49 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Khadas/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Edge2/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588s-khadas-edge2-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Edge2/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-khadas-edge2.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Edge2/Edge2.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | 19 | # Khadas MCU Support 20 | INF $(VENDOR_DIRECTORY)/Drivers/KhadasMcuDxe/KhadasMcuDxe.inf 21 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Edge2/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | Platform/Khadas/KhadasPkg.dec 25 | 26 | [LibraryClasses] 27 | ArmLib 28 | HobLib 29 | IoLib 30 | MemoryAllocationLib 31 | SerialPortLib 32 | CruLib 33 | GpioLib 34 | UefiLib 35 | UefiBootServicesTableLib 36 | 37 | [Sources.common] 38 | RockchipPlatformLib.c 39 | 40 | [Protocols] 41 | gKhadasMcuProtocolGuid 42 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/Include/Protocol/KhadasMcu.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __KHADAS_MCU_H__ 10 | #define __KHADAS_MCU_H__ 11 | 12 | #define KHADAS_MCU_PROTOCOL_GUID \ 13 | { 0x162d2a6e, 0x33af, 0x4ca5, { 0xaa, 0x68, 0xbc, 0xd3, 0xb2, 0x4c, 0xca, 0xf5 } } 14 | 15 | typedef struct _KHADAS_MCU_PROTOCOL KHADAS_MCU_PROTOCOL; 16 | 17 | typedef 18 | EFI_STATUS 19 | (EFIAPI *KHADAS_MCU_SET_FAN_SPEED_PERCENTAGE)( 20 | IN KHADAS_MCU_PROTOCOL *This, 21 | IN UINT8 Percentage 22 | ); 23 | 24 | struct _KHADAS_MCU_PROTOCOL { 25 | KHADAS_MCU_SET_FAN_SPEED_PERCENTAGE SetFanSpeedPercentage; 26 | }; 27 | 28 | extern EFI_GUID gKhadasMcuProtocolGuid; 29 | 30 | #endif // __KHADAS_MCU_H__ 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Khadas/KhadasPkg.dec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | [Defines] 10 | DEC_SPECIFICATION = 0x00010005 11 | PACKAGE_NAME = KhadasPkg 12 | PACKAGE_GUID = 7a5b60db-89a8-4749-b4e7-e093197595c2 13 | PACKAGE_VERSION = 0.1 14 | 15 | [Includes] 16 | Include 17 | 18 | [Protocols] 19 | gKhadasMcuProtocolGuid = { 0x162d2a6e, 0x33af, 0x4ca5, { 0xaa, 0x68, 0xbc, 0xd3, 0xb2, 0x4c, 0xca, 0xf5 } } 20 | 21 | [Guids] 22 | gKhadasTokenSpaceGuid = { 0x2f92c2cf, 0x0e93, 0x45c9, { 0xae, 0x30, 0x38, 0x46, 0x4d, 0x3f, 0xde, 0x8a } } 23 | 24 | [PcdsFixedAtBuild] 25 | gKhadasTokenSpaceGuid.PcdKhadasMcuAddress|0|UINT8|0x00000001 26 | gKhadasTokenSpaceGuid.PcdKhadasMcuBus|0|UINT8|0x00000002 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Mekotronics/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58-Mini/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | include ("Gmac0.asl") 30 | include ("Gpio.asl") 31 | include ("I2c.asl") 32 | include ("Uart.asl") 33 | // include ("Spi.asl") 34 | 35 | include ("Usb2Host.asl") 36 | include ("Usb3Host0.asl") 37 | include ("Usb3Host1.asl") 38 | include ("Usb3Host2.asl") 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58-Mini/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-blueberry-minipc-linux.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58-Mini/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58-Mini/R58-Mini.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58X/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-blueberry-edge-v12-linux.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58X/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | 34 | [Sources.common] 35 | RockchipPlatformLib.c 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mekotronics/R58X/R58X.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mixtile/Blade3/AcpiTables/Dsdt.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Differentiated System Definition Table (DSDT) 4 | * 5 | * Copyright (c) 2020, Pete Batard 6 | * Copyright (c) 2018-2020, Andrey Warkentin 7 | * Copyright (c) Microsoft Corporation. All rights reserved. 8 | * Copyright (c) 2021, ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) 17 | { 18 | Scope (\_SB_) 19 | { 20 | include ("DsdtCommon.asl") 21 | 22 | include ("Cpu.asl") 23 | 24 | include ("Pcie.asl") 25 | include ("Sata.asl") 26 | include ("Emmc.asl") 27 | include ("Sdhc.asl") 28 | include ("Dma.asl") 29 | // include ("Gmac.asl") 30 | include ("Gpio.asl") 31 | include ("I2c.asl") 32 | include ("Uart.asl") 33 | // include ("Spi.asl") 34 | 35 | include ("Usb2Host.asl") 36 | include ("Usb3Host0.asl") 37 | include ("Usb3Host1.asl") 38 | include ("Usb3Host2.asl") 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mixtile/Blade3/Blade3.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mixtile/Blade3/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-blade3-v101-linux.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mixtile/Blade3/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mixtile/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Mixtile/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Mixtile/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/OrangePi/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/upstream/src/arm64/rockchip/rk3588s-orangepi-5.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-orangepi-5.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5/OrangePi5.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5Plus/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/upstream/src/arm64/rockchip/rk3588-orangepi-5-plus.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5Plus/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-orangepi-5-plus.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5Plus/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/OrangePi/OrangePi5Plus/OrangePi5Plus.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/Radxa/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5A/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588s-rock-5a-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5A/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588s-rock-5a.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5A/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5B/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/upstream/src/arm64/rockchip/rk3588-rock-5b.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5B/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-rock-5b.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5B/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5BPlus/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-rock-5b-plus.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5BPlus/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5BPlus/ROCK5BPlus.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | 15 | # Splash screen logo 16 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5ITX/DeviceTree/Mainline.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Mainline 12 | FILE_GUID = 84492e97-a10f-49a7-85e9-025d1966b343 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Sources] 17 | devicetree/mainline/rk3588-rock-5-itx-fixup.dts 18 | 19 | [Packages] 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5ITX/DeviceTree/Vendor.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = DeviceTree-Vendor 12 | FILE_GUID = d58b4028-43d8-4e97-87d4-4e3716136580 13 | MODULE_TYPE = USER_DEFINED 14 | VERSION_STRING = 1.0 15 | 16 | [Binaries] 17 | BIN|devicetree/vendor/rk3588-rock-5-itx.dtb 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5ITX/Library/RockchipPlatformLib/RockchipPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Rockchip Limited. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010019 12 | BASE_NAME = RockchipPlatformLib 13 | FILE_GUID = 5178fa86-2fec-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = RockchipPlatformLib 17 | 18 | [Packages] 19 | EmbeddedPkg/EmbeddedPkg.dec 20 | MdePkg/MdePkg.dec 21 | MdeModulePkg/MdeModulePkg.dec 22 | Silicon/Rockchip/RK3588/RK3588.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | HobLib 28 | IoLib 29 | MemoryAllocationLib 30 | SerialPortLib 31 | CruLib 32 | GpioLib 33 | PWMLib 34 | 35 | [Sources.common] 36 | RockchipPlatformLib.c 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/Radxa/ROCK5ITX/ROCK5ITX.Modules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | # ACPI Support 10 | INF RuleOverride = ACPITABLE $(PLATFORM_DIRECTORY)/AcpiTables/AcpiTables.inf 11 | 12 | # Device Tree Support 13 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Vendor.inf 14 | INF RuleOverride = DTB $(PLATFORM_DIRECTORY)/DeviceTree/Mainline.inf 15 | 16 | # Splash screen logo 17 | INF $(VENDOR_DIRECTORY)/Drivers/LogoDxe/LogoDxe.inf 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Platform/StationPC/Drivers/LogoDxe/Logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/edk2-rockchip/Platform/StationPC/Drivers/LogoDxe/Logo.bmp -------------------------------------------------------------------------------- /edk2-rockchip/Platform/StationPC/Drivers/LogoDxe/Logo.idf: -------------------------------------------------------------------------------- 1 | // @file 2 | // Platform Logo image definition file. 3 | // 4 | // Copyright (c) 2018, Linaro, Ltd. All rights reserved.
5 | // Copyright (c) 2022 Rockchip Electronics Co. Ltd. 6 | // 7 | // SPDX-License-Identifier: BSD-2-Clause-Patent 8 | // 9 | 10 | #image IMG_LOGO Logo.bmp 11 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Applications/I2cDemoTest/I2cDemoTest.inf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2021-2022, Rockchip Limited. All rights reserved. 3 | # SPDX-License-Identifier: BSD-2-Clause-Patent 4 | # 5 | 6 | [Defines] 7 | INF_VERSION = 0x00010006 8 | BASE_NAME = UefiShellI2cDemoLib 9 | FILE_GUID = adf4b61c-2ca3-4e1a-9597-99282f5a4aa2 10 | MODULE_TYPE = UEFI_APPLICATION 11 | VERSION_STRING = 0.1 12 | LIBRARY_CLASS = NULL|UEFI_APPLICATION UEFI_DRIVER 13 | CONSTRUCTOR = ShellI2cDemoTestLibConstructor 14 | DESTRUCTOR = ShellI2cDemoTestLibDestructor 15 | 16 | [Sources] 17 | I2cDemoTest.c 18 | I2cDemoTest.uni 19 | 20 | [Packages] 21 | MdePkg/MdePkg.dec 22 | ShellPkg/ShellPkg.dec 23 | MdeModulePkg/MdeModulePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | Silicon/Rockchip/RK3588/RK3588.dec 26 | 27 | [LibraryClasses] 28 | UefiLib 29 | UefiBootServicesTableLib 30 | MemoryAllocationLib 31 | BaseLib 32 | BaseMemoryLib 33 | DebugLib 34 | ShellCommandLib 35 | ShellLib 36 | UefiLib 37 | UefiRuntimeServicesTableLib 38 | PcdLib 39 | 40 | [Protocols] 41 | gRockchipI2cDemoProtocolGuid 42 | gEfiI2cMasterProtocolGuid 43 | 44 | [Guids] 45 | gShellI2cDemoHiiGuid 46 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Applications/MaskromReset/MaskromReset.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x00010005 11 | BASE_NAME = MaskromReset 12 | FILE_GUID = 1f64e768-9f2c-4b39-a54a-f84a31ed6d6b 13 | MODULE_TYPE = UEFI_APPLICATION 14 | VERSION_STRING = 1.0 15 | ENTRY_POINT = UefiMain 16 | 17 | [Sources] 18 | MaskromReset.c 19 | 20 | [Packages] 21 | MdePkg/MdePkg.dec 22 | Silicon/Rockchip/RockchipPkg.dec 23 | 24 | [LibraryClasses] 25 | BaseMemoryLib 26 | DebugLib 27 | MemoryAllocationLib 28 | UefiApplicationEntryPoint 29 | UefiLib 30 | UefiRuntimeServicesTableLib 31 | 32 | [Guids] 33 | gRockchipResetTypeMaskromGuid 34 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Applications/SpiTool/SpiFlashCmd.inf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2022, Rockchip Limited. All rights reserved. 3 | # SPDX-License-Identifier: BSD-2-Clause-Patent 4 | # 5 | 6 | [Defines] 7 | INF_VERSION = 0x00010006 8 | BASE_NAME = UefiShellSpiFlashLib 9 | FILE_GUID = 2f2dd8c9-221f-4acf-afe5-5897264c5774 10 | MODULE_TYPE = UEFI_APPLICATION 11 | VERSION_STRING = 0.1 12 | LIBRARY_CLASS = NULL|UEFI_APPLICATION UEFI_DRIVER 13 | CONSTRUCTOR = ShellSpiFlashLibConstructor 14 | DESTRUCTOR = ShellSpiFlashLibDestructor 15 | 16 | [Sources] 17 | SpiFlashCmd.c 18 | SpiFlashCmd.uni 19 | 20 | [Packages] 21 | EmbeddedPkg/EmbeddedPkg.dec 22 | MdePkg/MdePkg.dec 23 | ShellPkg/ShellPkg.dec 24 | MdeModulePkg/MdeModulePkg.dec 25 | Silicon/Rockchip/RockchipPkg.dec 26 | 27 | [LibraryClasses] 28 | UefiLib 29 | UefiBootServicesTableLib 30 | MemoryAllocationLib 31 | BaseLib 32 | BaseMemoryLib 33 | DebugLib 34 | ShellCommandLib 35 | ShellLib 36 | UefiLib 37 | UefiRuntimeServicesTableLib 38 | PcdLib 39 | HiiLib 40 | FileHandleLib 41 | 42 | [Protocols] 43 | gUniNorFlashProtocolGuid 44 | 45 | [Guids] 46 | gShellSfHiiGuid 47 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/ExitBootServicesHookDxe/ExitBootServicesHookDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024-2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x00010005 11 | BASE_NAME = ExitBootServicesHookDxe 12 | FILE_GUID = 6fd64e41-870c-44cd-b8b1-6752255fb399 13 | MODULE_TYPE = DXE_DRIVER 14 | VERSION_STRING = 1.0 15 | ENTRY_POINT = ExitBootServicesHookDxeInitialize 16 | 17 | [Sources] 18 | ExitBootServicesHookDxe.c 19 | OsIdentification.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | BaseLib 27 | DebugLib 28 | MemoryAllocationLib 29 | PeCoffGetEntryPointLib 30 | UefiBootServicesTableLib 31 | UefiDriverEntryPoint 32 | UefiLib 33 | 34 | [Protocols] 35 | gExitBootServicesOsNotifyProtocolGuid ## PRODUCES 36 | 37 | [Depex] 38 | TRUE 39 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/I2c/I2cDemoDxe/I2cDemoDxe.inf: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: BSD-2-Clause-Patent 3 | # 4 | 5 | [Defines] 6 | INF_VERSION = 0x00010005 7 | BASE_NAME = I2cDemoDxe 8 | FILE_GUID = 59fc3843-d8d4-40aa-ae07-38967138509c 9 | MODULE_TYPE = DXE_DRIVER 10 | VERSION_STRING = 1.0 11 | ENTRY_POINT = I2cDemoInitialise 12 | 13 | [Sources.common] 14 | I2cDemoDxe.c 15 | 16 | [Packages] 17 | ArmPkg/ArmPkg.dec 18 | ArmPlatformPkg/ArmPlatformPkg.dec 19 | MdeModulePkg/MdeModulePkg.dec 20 | MdePkg/MdePkg.dec 21 | Silicon/Rockchip/RockchipPkg.dec 22 | 23 | [LibraryClasses] 24 | BaseLib 25 | BaseMemoryLib 26 | DebugLib 27 | IoLib 28 | PcdLib 29 | UefiBootServicesTableLib 30 | UefiDriverEntryPoint 31 | UefiLib 32 | 33 | [Protocols] 34 | gEfiDriverBindingProtocolGuid 35 | gEfiI2cIoProtocolGuid 36 | gRockchipI2cDemoProtocolGuid 37 | 38 | [Pcd] 39 | gRockchipTokenSpaceGuid.PcdI2cDemoAddresses 40 | gRockchipTokenSpaceGuid.PcdI2cDemoBuses 41 | 42 | [Depex] 43 | TRUE 44 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackConfigDxe.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright (c) 2025, Mario Bălănică 4 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent 6 | 7 | **/ 8 | 9 | #ifndef NETWORK_STACK_CONFIG_DXE_H_ 10 | #define NETWORK_STACK_CONFIG_DXE_H_ 11 | 12 | #include 13 | 14 | #define NETWORK_STACK_ENABLED_DEFAULT FixedPcdGetBool(PcdNetworkStackEnabledDefault) 15 | #define NETWORK_STACK_IPV4_ENABLED_DEFAULT FixedPcdGetBool(PcdNetworkStackIpv4EnabledDefault) 16 | #define NETWORK_STACK_IPV6_ENABLED_DEFAULT FixedPcdGetBool(PcdNetworkStackIpv6EnabledDefault) 17 | #define NETWORK_STACK_PXE_BOOT_ENABLED_DEFAULT FixedPcdGetBool(PcdNetworkStackPxeBootEnabledDefault) 18 | #define NETWORK_STACK_HTTP_BOOT_ENABLED_DEFAULT FixedPcdGetBool(PcdNetworkStackHttpBootEnabledDefault) 19 | 20 | #define NETWORK_STACK_CONFIG_DATA_VAR_NAME L"NetworkStackConfigData" 21 | 22 | #pragma pack (1) 23 | 24 | typedef struct { 25 | BOOLEAN Enabled; 26 | BOOLEAN Ipv4Enabled; 27 | BOOLEAN Ipv6Enabled; 28 | BOOLEAN PxeBootEnabled; 29 | BOOLEAN HttpBootEnabled; 30 | } NETWORK_STACK_CONFIG_VARSTORE_DATA; 31 | 32 | #pragma pack () 33 | 34 | #endif // __NETWORK_STACK_CONFIG_DXE_H__ 35 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackEnabledLib.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright (c) 2025, Mario Bălănică 4 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent 6 | 7 | **/ 8 | 9 | #include 10 | 11 | RETURN_STATUS 12 | EFIAPI 13 | NetworkStackEnabledLibInitialize ( 14 | VOID 15 | ) 16 | { 17 | return RETURN_SUCCESS; 18 | } 19 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackEnabledLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001B 11 | BASE_NAME = NetworkStackEnabledLib 12 | FILE_GUID = 5c8672a9-aa5e-48e7-8337-8c69d8cadb82 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = NetworkStackEnabledLib|DXE_DRIVER 16 | CONSTRUCTOR = NetworkStackEnabledLibInitialize 17 | 18 | [Sources] 19 | NetworkStackEnabledLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [Depex] 26 | gNetworkStackEnabledProtocolGuid 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackHttpBootEnabledLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001B 11 | BASE_NAME = NetworkStackHttpBootEnabledLib 12 | FILE_GUID = dd043385-aef9-45b2-8547-57ef986840fb 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = NetworkStackHttpBootEnabledLib|DXE_DRIVER 16 | CONSTRUCTOR = NetworkStackEnabledLibInitialize 17 | 18 | [Sources] 19 | NetworkStackEnabledLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [Depex] 26 | gNetworkStackHttpBootEnabledProtocolGuid 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackIpv4EnabledLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001B 11 | BASE_NAME = NetworkStackIpv4EnabledLib 12 | FILE_GUID = 1f1e1253-5f10-4811-b6b1-52c8845a67ad 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = NetworkStackIpv4EnabledLib|DXE_DRIVER 16 | CONSTRUCTOR = NetworkStackEnabledLibInitialize 17 | 18 | [Sources] 19 | NetworkStackEnabledLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [Depex] 26 | gNetworkStackIpv4EnabledProtocolGuid 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackIpv6EnabledLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001B 11 | BASE_NAME = NetworkStackIpv6EnabledLib 12 | FILE_GUID = a0defbf9-abfa-43b3-93e1-8aeda39fd044 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = NetworkStackIpv6EnabledLib|DXE_DRIVER 16 | CONSTRUCTOR = NetworkStackEnabledLibInitialize 17 | 18 | [Sources] 19 | NetworkStackEnabledLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [Depex] 26 | gNetworkStackIpv6EnabledProtocolGuid 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/NetworkStackConfigDxe/NetworkStackPxeBootEnabledLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001B 11 | BASE_NAME = NetworkStackPxeBootEnabledLib 12 | FILE_GUID = 942c4990-e0ab-48c6-9f74-9b523252dbe5 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = NetworkStackPxeBootEnabledLib|DXE_DRIVER 16 | CONSTRUCTOR = NetworkStackEnabledLibInitialize 17 | 18 | [Sources] 19 | NetworkStackEnabledLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [Depex] 26 | gNetworkStackPxeBootEnabledProtocolGuid 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/OhciDxe/OhciDebug.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file contains the definination for host controller 3 | debug support routines. 4 | 5 | Copyright (c) 2013-2015 Intel Corporation. 6 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent 8 | 9 | **/ 10 | 11 | /*++ 12 | 13 | Routine Description: 14 | 15 | Print the data of ED and the TDs attached to the ED 16 | 17 | @param Uhc Pointer to OHCI private data 18 | @param Ed Pointer to a ED to free 19 | @param Td Pointer to the Td head 20 | 21 | @retval EFI_SUCCESS ED 22 | 23 | **/ 24 | EFI_STATUS 25 | OhciDumpEdTdInfo ( 26 | IN USB_OHCI_HC_DEV *Ohc, 27 | IN ED_DESCRIPTOR *Ed, 28 | IN TD_DESCRIPTOR *Td, 29 | BOOLEAN Stage 30 | ); 31 | 32 | /*++ 33 | 34 | Print the register data of ohci host controller 35 | 36 | @param Ohc Pointer to OHCI private data 37 | 38 | **/ 39 | 40 | VOID 41 | OhciDumpReg ( 42 | IN USB_OHCI_HC_DEV *Ohc 43 | ); 44 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/Pca9555Dxe/Pca9555Dxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # PCA9555 GPIO initializer for Rockchip platforms. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # Copyright (c) 2023, Shimrra Shai 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | #**/ 11 | 12 | [Defines] 13 | INF_VERSION = 0x00010019 14 | BASE_NAME = Pca9555Dxe 15 | FILE_GUID = 2ee8d685-8066-4f37-ae0e-5235730b9cc7 16 | MODULE_TYPE = DXE_DRIVER 17 | VERSION_STRING = 1.0 18 | ENTRY_POINT = Pca9555DxeInitialize 19 | 20 | [Sources.common] 21 | Pca9555Dxe.c 22 | 23 | [Packages] 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | EmbeddedPkg/EmbeddedPkg.dec 27 | Silicon/Rockchip/RockchipPkg.dec 28 | 29 | [LibraryClasses] 30 | UefiDriverEntryPoint 31 | UefiLib 32 | UefiBootServicesTableLib 33 | MemoryAllocationLib 34 | DebugLib 35 | 36 | [Protocols] 37 | gEfiDriverBindingProtocolGuid 38 | gEfiI2cIoProtocolGuid ## CONSUMES 39 | gPca95xxProtocolGuid ## PRODUCES 40 | gRockchipI2cMasterProtocolGuid 41 | 42 | [Pcd] 43 | gRockchipTokenSpaceGuid.PcdPca9555Address 44 | gRockchipTokenSpaceGuid.PcdPca9555Bus 45 | 46 | [Depex] 47 | TRUE 48 | 49 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/RkSdmmcDxe/RkSdmmcDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Synopsys DesignWare MSHC platform driver for Rockchip SDMMC 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010019 13 | BASE_NAME = RkSdmmcDxe 14 | FILE_GUID = b6c84293-d505-4e5c-84ba-c7ff183fa566 15 | MODULE_TYPE = UEFI_DRIVER 16 | VERSION_STRING = 1.0 17 | 18 | ENTRY_POINT = RkSdmmcDxeInitialize 19 | 20 | [Sources.common] 21 | RkSdmmcDxe.c 22 | 23 | [Packages] 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | Silicon/Rockchip/RockchipPkg.dec 27 | Silicon/Synopsys/DesignWare/DesignWarePkg.dec 28 | 29 | [LibraryClasses] 30 | UefiDriverEntryPoint 31 | BaseMemoryLib 32 | DebugLib 33 | UefiBootServicesTableLib 34 | RkSdmmcPlatformLib 35 | 36 | [Protocols] 37 | gEfiDevicePathProtocolGuid ## PRODUCES 38 | gEdkiiNonDiscoverableDeviceProtocolGuid ## PRODUCES 39 | gPlatformDwMmcProtocolGuid ## PRODUCES 40 | 41 | [Guids] 42 | gDwMmcHcNonDiscoverableDeviceGuid 43 | 44 | [Pcd] 45 | gRockchipTokenSpaceGuid.PcdRkSdmmcBaseAddress 46 | gRockchipTokenSpaceGuid.PcdRkSdmmcCardDetectBroken 47 | 48 | [Depex] 49 | TRUE 50 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/Rtc8563PlatformDxe/Rtc8563PlatformDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Pcf8563RealTimeClockLib initializer for Rockchip platforms. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010019 13 | BASE_NAME = RtcPlatformDxe 14 | FILE_GUID = b4d6e6b1-b2a0-4c79-8bf1-3af8c485ec3d 15 | MODULE_TYPE = DXE_DRIVER 16 | VERSION_STRING = 1.0 17 | ENTRY_POINT = Rtc8563PlatformDxeInitialize 18 | 19 | [Sources.common] 20 | Rtc8563PlatformDxe.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | Silicon/Rockchip/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec 26 | 27 | [LibraryClasses] 28 | UefiDriverEntryPoint 29 | UefiLib 30 | UefiBootServicesTableLib 31 | MemoryAllocationLib 32 | DebugLib 33 | 34 | [Protocols] 35 | gRockchipI2cMasterProtocolGuid ## CONSUMES 36 | gPcf8563RealTimeClockLibI2cMasterProtocolGuid ## PRODUCES 37 | 38 | [Pcd] 39 | gRockchipTokenSpaceGuid.PcdRtc8563Bus 40 | 41 | [Depex] 42 | TRUE 43 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/RuntimeServicesManagerDxe/RuntimeServicesManagerDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2025, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = RuntimeServicesManagerDxe 12 | FILE_GUID = e83cd2ea-e435-48fd-94a8-97005d6296ec 13 | MODULE_TYPE = DXE_RUNTIME_DRIVER 14 | VERSION_STRING = 1.0 15 | ENTRY_POINT = RuntimeServicesManagerDxeInitialize 16 | 17 | [Sources] 18 | RuntimeServicesManagerDxe.c 19 | 20 | [Packages] 21 | EmbeddedPkg/EmbeddedPkg.dec 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | DebugLib 27 | UefiBootServicesTableLib 28 | UefiRuntimeServicesTableLib 29 | UefiLib 30 | UefiDriverEntryPoint 31 | 32 | [Guids] 33 | gFdtTableGuid 34 | 35 | [Protocols] 36 | gExitBootServicesOsNotifyProtocolGuid 37 | 38 | [Depex] 39 | gExitBootServicesOsNotifyProtocolGuid 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/StatusLedDxe/StatusLedDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Platform Status LED controller 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010005 13 | BASE_NAME = StatusLedDxe 14 | FILE_GUID = b1f3fd14-9bd1-48cc-9258-e2807ecb1b84 15 | MODULE_TYPE = DXE_DRIVER 16 | VERSION_STRING = 1.0 17 | ENTRY_POINT = StatusLedDxeInitialize 18 | 19 | [Sources.common] 20 | StatusLedDxe.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | 26 | [LibraryClasses] 27 | UefiDriverEntryPoint 28 | UefiLib 29 | UefiBootServicesTableLib 30 | RockchipPlatformLib 31 | 32 | [Pcd] 33 | 34 | [Protocols] 35 | 36 | [Guids] 37 | gEfiEventExitBootServicesGuid 38 | gRockchipEventPlatformBmAfterConsoleGuid 39 | 40 | [Depex] 41 | TRUE 42 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/UsbHcdInitDxe/UsbHcd.inf: -------------------------------------------------------------------------------- 1 | # UsbHcd.inf 2 | # 3 | # Copyright 2017, 2020 NXP 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | # 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = UsbHcdDxe 12 | FILE_GUID = 196e7c2a-37b2-4b85-8683-718588952449 13 | MODULE_TYPE = DXE_DRIVER 14 | VERSION_STRING = 1.0 15 | ENTRY_POINT = InitializeUsbHcd 16 | 17 | [Sources.common] 18 | UsbHcd.c 19 | UsbHcd.h 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | MdeModulePkg/MdeModulePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | 26 | [LibraryClasses] 27 | BaseLib 28 | BaseMemoryLib 29 | DebugLib 30 | IoLib 31 | MemoryAllocationLib 32 | NonDiscoverableDeviceRegistrationLib 33 | UefiBootServicesTableLib 34 | UefiDriverEntryPoint 35 | RockchipPlatformLib 36 | DevicePathLib 37 | 38 | [FixedPcd] 39 | gRockchipTokenSpaceGuid.PcdOhciSize 40 | gRockchipTokenSpaceGuid.PcdEhciBaseAddress 41 | gRockchipTokenSpaceGuid.PcdNumEhciController 42 | gRockchipTokenSpaceGuid.PcdEhciSize 43 | gRockchipTokenSpaceGuid.PcdDwc3BaseAddresses 44 | gRockchipTokenSpaceGuid.PcdDwc3Size 45 | 46 | [Protocols] 47 | gOhciDeviceProtocolGuid ## PRODUCES 48 | 49 | [Guids] 50 | gEfiEndOfDxeEventGroupGuid 51 | 52 | [Depex] 53 | TRUE 54 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Drivers/Vop2Dxe/Vop2Dxe.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # The Vop2 driver file. 3 | # 4 | # Copyright (c) 2022 Rockchip Electronics Co. Ltd. 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | ## 9 | 10 | [Defines] 11 | INF_VERSION = 0x0001001A 12 | BASE_NAME = Vop2Dxe 13 | FILE_GUID = 1cbb3666-99fe-11ec-9927-f42a7dcb925d 14 | MODULE_TYPE = DXE_DRIVER 15 | VERSION_STRING = 1.0 16 | 17 | ENTRY_POINT = Vop2DxeInitialize 18 | 19 | [Sources] 20 | Vop2Dxe.c 21 | 22 | [Packages] 23 | EmbeddedPkg/EmbeddedPkg.dec 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | Silicon/Rockchip/RockchipPkg.dec 27 | Silicon/Rockchip/RK3588/RK3588.dec 28 | 29 | [LibraryClasses] 30 | TimerLib 31 | IoLib 32 | DebugLib 33 | BaseLib 34 | BaseMemoryLib 35 | MemoryAllocationLib 36 | RockchipDisplayLib 37 | UefiDriverEntryPoint 38 | CruLib 39 | 40 | [Protocols] 41 | gRockchipCrtcProtocolGuid 42 | 43 | [Depex] 44 | TRUE 45 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/FvCompactModules.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023-2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | INF ArmPlatformPkg/PeilessSec/PeilessSec.inf 10 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/FvMainAprioriDxe.fdf.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | !if $(RK_STATUS_LED_ENABLE) == TRUE 10 | INF Silicon/Rockchip/Drivers/StatusLedDxe/StatusLedDxe.inf 11 | !endif 12 | 13 | INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf 14 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Guid/NetworkStackConfigFormSet.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright (c) 2025, Mario Bălănică 4 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent 6 | 7 | **/ 8 | 9 | #ifndef NETWORK_STACK_CONFIG_FORMSET_H_ 10 | #define NETWORK_STACK_CONFIG_FORMSET_H_ 11 | 12 | #define NETWORK_STACK_CONFIG_FORMSET_GUID \ 13 | { 0x663413e7, 0xed00, 0x41f6, { 0xa8, 0x24, 0xa9, 0x88, 0xd0, 0x45, 0x9d, 0xc8 } } 14 | 15 | extern EFI_GUID gNetworkStackConfigFormSetGuid; 16 | 17 | #endif // __NETWORK_STACK_CONFIG_FORMSET_H__ 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Library/DwcSdhciPlatformLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * DwcSdhciDxe platform helper library. 4 | * 5 | * Copyright (c) 2023, Mario Bălănică 6 | * 7 | * SPDX-License-Identifier: BSD-2-Clause-Patent 8 | * 9 | **/ 10 | 11 | EFI_STATUS 12 | EFIAPI 13 | DwcSdhciSetClockRate ( 14 | IN UINTN Frequency 15 | ); 16 | 17 | VOID 18 | EFIAPI 19 | DwcSdhciSetIoMux ( 20 | VOID 21 | ); 22 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Library/OtpLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2022, Jared McNeill 4 | * Copyright (c) 2023, Mario Bălănică 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | * 8 | **/ 9 | 10 | #ifndef OTPLIB_H__ 11 | #define OTPLIB_H__ 12 | 13 | VOID 14 | OtpRead ( 15 | IN UINT16 Offset, 16 | IN UINT16 Length, 17 | OUT UINT8 *Data 18 | ); 19 | 20 | VOID 21 | OtpReadCpuCode ( 22 | OUT UINT16 *CpuCode 23 | ); 24 | 25 | VOID 26 | OtpReadId ( 27 | OUT UINT8 Id[16] 28 | ); 29 | 30 | VOID 31 | OtpReadCpuVersion ( 32 | OUT UINT8 *Version 33 | ); 34 | 35 | #endif /* OTPLIB_H__ */ 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Library/RkSdmmcPlatformLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * RkSdmmcDxe platform helper library. 4 | * 5 | * Copyright (c) 2023, Mario Bălănică 6 | * 7 | * SPDX-License-Identifier: BSD-2-Clause-Patent 8 | * 9 | **/ 10 | 11 | typedef enum { 12 | RkSdmmcCardPresenceUnsupported = 0, 13 | RkSdmmcCardPresent, 14 | RkSdmmcCardNotPresent 15 | } RKSDMMC_CARD_PRESENCE_STATE; 16 | 17 | EFI_STATUS 18 | EFIAPI 19 | RkSdmmcSetClockRate ( 20 | IN UINTN Frequency 21 | ); 22 | 23 | VOID 24 | EFIAPI 25 | RkSdmmcSetIoMux ( 26 | VOID 27 | ); 28 | 29 | RKSDMMC_CARD_PRESENCE_STATE 30 | EFIAPI 31 | RkSdmmcGetCardPresenceState ( 32 | VOID 33 | ); 34 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Library/SaradcLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2024, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef SARADC_LIB_H__ 10 | #define SARADC_LIB_H__ 11 | 12 | RETURN_STATUS 13 | SaradcReadChannel ( 14 | IN UINT32 Channel, 15 | OUT UINT32 *Data 16 | ); 17 | 18 | #endif /* SARADC_LIB_H__ */ 19 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Library/SdramLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2022, Jared McNeill 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef SDRAMLIB_H__ 10 | #define SDRAMLIB_H__ 11 | 12 | UINT64 13 | SdramGetMemorySize ( 14 | VOID 15 | ); 16 | 17 | #endif /* SDRAMLIB_H__ */ 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Protocol/I2c.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2021, Rockchip Inc. All rights reserved. 4 | * 5 | * This program and the accompanying materials 6 | * are licensed and made available under the terms and conditions of the BSD License 7 | * which accompanies this distribution. The full text of the license may be found at 8 | * http://opensource.org/licenses/bsd-license.php 9 | * 10 | * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | * 13 | **/ 14 | 15 | #ifndef _RK_I2C_H__ 16 | #define _RK_I2C_H__ 17 | 18 | /* 19 | * I2C_FLAG_NORESTART is not part of PI spec, it allows to continue 20 | * transmission without repeated start operation. 21 | */ 22 | #define I2C_FLAG_NORESTART 0x00000002 23 | 24 | /* 25 | * Helper macros for maintaining multiple I2C buses 26 | * and devices defined via EFI_I2C_DEVICE. 27 | */ 28 | #define I2C_DEVICE_ADDRESS(Index) ((Index) & MAX_UINT16) 29 | #define I2C_DEVICE_BUS(Index) ((Index) >> 16) 30 | #define I2C_DEVICE_INDEX(Bus, Address) (((Address) & MAX_UINT16) | (Bus) << 16) 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Protocol/I2cDemo.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | Copyright (C) 2016 Marvell International Ltd. 3 | 4 | SPDX-License-Identifier: BSD-2-Clause-Patent 5 | 6 | *******************************************************************************/ 7 | 8 | #ifndef __ROCKCHIP_I2CDEMO_H__ 9 | #define __ROCKCHIP_I2CDEMO_H__ 10 | 11 | #define ROCKCHIP_I2CDEMO_PROTOCOL_GUID { 0x71954bda, 0x60d3, 0x4ef8, { 0x8e, 0x3c, 0x0e, 0x33, 0x9f, 0x3b, 0xc2, 0x2b }} 12 | 13 | typedef struct _ROCKCHIP_I2CDEMO_PROTOCOL ROCKCHIP_I2CDEMO_PROTOCOL; 14 | 15 | typedef 16 | EFI_STATUS 17 | (EFIAPI *EFI_I2CDEMO_TRANSFER)( 18 | IN CONST ROCKCHIP_I2CDEMO_PROTOCOL *This, 19 | IN UINT8 *RegAddress, 20 | IN UINT16 RegAddressLength, 21 | IN UINT8 *Buffer, 22 | IN UINT16 Length 23 | ); 24 | 25 | struct _ROCKCHIP_I2CDEMO_PROTOCOL { 26 | EFI_I2CDEMO_TRANSFER Read; 27 | EFI_I2CDEMO_TRANSFER Write; 28 | UINT32 Identifier; 29 | }; 30 | 31 | extern EFI_GUID gRockchipI2cDemoProtocolGuid; 32 | #endif 33 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Protocol/OhciDeviceProtocol.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright (c) 2023, Mario Bălănică 4 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent 6 | 7 | **/ 8 | 9 | #ifndef _OHCI_DEVICE_PROTOCOL_H_ 10 | #define _OHCI_DEVICE_PROTOCOL_H_ 11 | 12 | #include 13 | 14 | #define OHCI_DEVICE_PROTOCOL_GUID \ 15 | {0x54bce5e6, 0xbaae, 0x488a, {0x82, 0x67, 0xc0, 0x85, 0x7f, 0xb4, 0xe8, 0x05}} 16 | 17 | typedef struct { 18 | UINT32 BaseAddress; 19 | } OHCI_DEVICE_PROTOCOL; 20 | 21 | extern EFI_GUID gOhciDeviceProtocolGuid; 22 | 23 | #endif // _OHCI_DEVICE_PROTOCOL_H_ 24 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Protocol/Pca9555.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * Copyright (c) 2023, Shimrra Shai 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | * 8 | **/ 9 | 10 | #ifndef __PCA9555_H__ 11 | #define __PCA9555_H__ 12 | 13 | #include 14 | 15 | #include 16 | 17 | #define PCA95XX_PROTOCOL_GUID \ 18 | { 0x7e91391b, 0xa23c, 0x4a51, { 0x9d, 0xf7, 0xf6, 0x74, 0xef, 0x1d, 0x51, 0x1b } } 19 | 20 | typedef struct _PCA95XX_PROTOCOL PCA95XX_PROTOCOL; 21 | 22 | struct _PCA95XX_PROTOCOL { 23 | EMBEDDED_GPIO GpioProtocol; 24 | }; 25 | 26 | extern EFI_GUID gPca95xxProtocolGuid; 27 | 28 | #endif // __PCA9555_H__ 29 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Include/Protocol/RockchipI2cMasterProtocol.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright (c) 2023, Mario Bălănică 4 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent 6 | 7 | **/ 8 | 9 | #ifndef _ROCKCHIP_I2C_MASTER_PROTOCOL_H_ 10 | #define _ROCKCHIP_I2C_MASTER_PROTOCOL_H_ 11 | 12 | #include 13 | 14 | #define ROCKCHIP_I2C_MASTER_PROTOCOL_GUID \ 15 | { 0x7b4af789, 0x43d2, 0x44a5, { 0xa0, 0xb3, 0x3f, 0xa5, 0xde, 0xd7, 0xa1, 0x27 } } 16 | 17 | typedef struct { 18 | UINT8 Bus; 19 | } ROCKCHIP_I2C_MASTER_PROTOCOL; 20 | 21 | extern EFI_GUID gRockchipI2cMasterProtocolGuid; 22 | 23 | #endif // _ROCKCHIP_I2C_MASTER_PROTOCOL_H_ 24 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/BaseVariableLib/Variable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2024, Mario Bălănică 4 | * Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | * 8 | **/ 9 | 10 | #ifndef _BASE_VARIABLE_H_ 11 | #define _BASE_VARIABLE_H_ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | typedef enum { 28 | VariableStoreTypeHob, 29 | VariableStoreTypeNv, 30 | VariableStoreTypeMax 31 | } VARIABLE_STORE_TYPE; 32 | 33 | typedef struct { 34 | VARIABLE_STORE_HEADER *VariableStoreHeader; 35 | VARIABLE_INDEX_TABLE *IndexTable; 36 | // 37 | // If it is not NULL, it means there may be an inconsecutive variable whose 38 | // partial content is still in NV storage, but another partial content is backed up 39 | // in spare block. 40 | // 41 | FAULT_TOLERANT_WRITE_LAST_WRITE_DATA *FtwLastWriteData; 42 | BOOLEAN AuthFlag; 43 | } VARIABLE_STORE_INFO; 44 | 45 | #endif // _BASE_VARIABLE_H_ 46 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/CruLib/CruLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2017, Rockchip Inc. All rights reserved. 4 | # Copyright (c) 2023-2024, Mario Bălănică 5 | # 6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010005 12 | BASE_NAME = CruLib 13 | FILE_GUID = e4457c4c-2cca-11ec-95b4-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = CruLib 17 | 18 | [Sources.common] 19 | CruLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | MdeModulePkg/MdeModulePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | 26 | [LibraryClasses] 27 | DebugLib 28 | IoLib 29 | PlatformCruLib 30 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/DisplayLib/RockchipDisplayLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2022 Rockchip Electronics Co. Ltd. 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010005 12 | BASE_NAME = RockchipDisplayLib 13 | FILE_GUID = 967dc52a-7cfa-11ec-b45f-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = DisplayLib 17 | 18 | [Sources.common] 19 | RockchipDisplayLib.c 20 | 21 | [LibraryClasses] 22 | IoLib 23 | DebugLib 24 | UefiBootServicesTableLib 25 | MemoryAllocationLib 26 | BaseLib 27 | BaseMemoryLib 28 | 29 | [Packages] 30 | ArmPlatformPkg/ArmPlatformPkg.dec 31 | ArmPkg/ArmPkg.dec 32 | MdeModulePkg/MdeModulePkg.dec 33 | MdePkg/MdePkg.dec 34 | Silicon/Rockchip/RockchipPkg.dec 35 | Silicon/Rockchip/RK3588/RK3588.dec 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/Dw8250SerialPortLib/DebugDw8250SerialPortLib.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | UART Serial Port library functions 3 | 4 | Copyright (c) 2006 - 2009, Intel Corporation 5 | Copyright (c) 2015 - 2016, Hisilicon Limited. All rights reserved. 6 | Copyright (c) 2015 - 2016, Linaro Limited. All rights reserved. 7 | SPDX-License-Identifier: BSD-2-Clause-Patent 8 | 9 | Based on the files under ArmPlatformPkg/Library/PL011SerialPortLib/ 10 | **/ 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "Dw8250SerialPortLib.h" 18 | 19 | /** 20 | Initialize the serial device hardware. 21 | 22 | If no initialization is required, then return RETURN_SUCCESS. 23 | If the serial device was successfuly initialized, then return RETURN_SUCCESS. 24 | If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. 25 | 26 | @retval RETURN_SUCCESS The serial device was initialized. 27 | @retval RETURN_DEVICE_ERROR The serail device could not be initialized. 28 | 29 | **/ 30 | RETURN_STATUS 31 | EFIAPI 32 | SerialPortInitialize ( 33 | VOID 34 | ) 35 | { 36 | // 37 | // Assume already initialized. 38 | // 39 | return RETURN_SUCCESS; 40 | } 41 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/Dw8250SerialPortLib/DebugDw8250SerialPortLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2011, ARM Ltd. All rights reserved.
4 | # Copyright (c) 2015-2016, Hisilicon Limited. All rights reserved.
5 | # Copyright (c) 2015-2016, Linaro Limited. All rights reserved.
6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | # Based on the files under ArmPlatformPkg/Library/PL011SerialPortLib/ 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010005 13 | BASE_NAME = Dw8250SerialPortLib 14 | FILE_GUID = e9b88aa0-16a5-447b-9c05-a77521db1a9e 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = SerialPortLib 18 | 19 | [Sources.common] 20 | DebugDw8250SerialPortLib.c 21 | Dw8250SerialPortLibCommon.c 22 | 23 | [Packages] 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | ArmPlatformPkg/ArmPlatformPkg.dec 27 | Silicon/Rockchip/RockchipPkg.dec 28 | 29 | [LibraryClasses] 30 | BaseLib 31 | IoLib 32 | 33 | [Pcd] 34 | gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase 35 | gRockchipTokenSpaceGuid.PcdSerialPortSendDelay 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/Dw8250SerialPortLib/Dw8250SerialPortLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2011, ARM Ltd. All rights reserved.
4 | # Copyright (c) 2015-2016, Hisilicon Limited. All rights reserved.
5 | # Copyright (c) 2015-2016, Linaro Limited. All rights reserved.
6 | # SPDX-License-Identifier: BSD-2-Clause-Patent 7 | # 8 | # Based on the files under ArmPlatformPkg/Library/PL011SerialPortLib/ 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010005 13 | BASE_NAME = Dw8250SerialPortLib 14 | FILE_GUID = e7016ad2-40dd-406f-81ef-535da603c8e1 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = SerialPortLib 18 | 19 | [Sources.common] 20 | Dw8250SerialPortLib.c 21 | Dw8250SerialPortLibCommon.c 22 | 23 | [Packages] 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | ArmPlatformPkg/ArmPlatformPkg.dec 27 | Silicon/Rockchip/RockchipPkg.dec 28 | 29 | [LibraryClasses] 30 | BaseLib 31 | IoLib 32 | 33 | [Pcd] 34 | gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase 35 | gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate 36 | gRockchipTokenSpaceGuid.PcdSerialPortSendDelay 37 | gRockchipTokenSpaceGuid.PcdUartClkInHz 38 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/DwcSdhciPlatformLibNull/DwcSdhciPlatformLibNull.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * DwcSdhciDxe platform helper library. 4 | * 5 | * Copyright (c) 2023, Mario Bălănică 6 | * 7 | * SPDX-License-Identifier: BSD-2-Clause-Patent 8 | * 9 | **/ 10 | 11 | #include 12 | #include 13 | 14 | EFI_STATUS 15 | EFIAPI 16 | DwcSdhciSetClockRate ( 17 | IN UINTN Frequency 18 | ) 19 | { 20 | return EFI_UNSUPPORTED; 21 | } 22 | 23 | VOID 24 | EFIAPI 25 | DwcSdhciSetIoMux ( 26 | VOID 27 | ) 28 | { 29 | return; 30 | } 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/DwcSdhciPlatformLibNull/DwcSdhciPlatformLibNull.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # DwcSdhciDxe platform helper library. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = DwcSdhciPlatformLibNull 14 | FILE_GUID = 98fc1cd7-aeca-4b8d-894f-5d2f9899a47d 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = DwcSdhciPlatformLib 18 | 19 | [Sources] 20 | DwcSdhciPlatformLibNull.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/FspiLib/FspiLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Component description file for Uart module 4 | # 5 | # Copyright (c) 2022, Rockchip Inc. All rights reserved.
6 | # 7 | # This program and the accompanying materials 8 | # are licensed and made available under the terms and conditions of the BSD License 9 | # which accompanies this distribution. The full text of the license may be found at 10 | # http://opensource.org/licenses/bsd-license.php 11 | # 12 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | # 15 | #**/ 16 | 17 | [Defines] 18 | INF_VERSION = 0x00010005 19 | BASE_NAME = FspiLib 20 | FILE_GUID = b1bbeb92-9df6-11ec-9573-f42a7dcb925d 21 | MODULE_TYPE = BASE 22 | VERSION_STRING = 1.0 23 | LIBRARY_CLASS = FspiLib 24 | 25 | [Sources.common] 26 | FspiLib.c 27 | 28 | [LibraryClasses] 29 | DebugLib 30 | IoLib 31 | TimerLib 32 | 33 | [Packages] 34 | MdePkg/MdePkg.dec 35 | MdeModulePkg/MdeModulePkg.dec 36 | Silicon/Rockchip/RockchipPkg.dec 37 | 38 | [Pcd] 39 | 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/PWMLib/PWMLib.inf: -------------------------------------------------------------------------------- 1 | /** @file 2 | Component description file for Rockchip PWM Driver. 3 | 4 | Copyright (c) 2022 Rockchip Electronics Co. Ltd. 5 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent 7 | 8 | **/ 9 | 10 | [Defines] 11 | INF_VERSION = 0x00010005 12 | BASE_NAME = PWMLib 13 | FILE_GUID = 2f34109a-6f62-11ec-ac42-f42a7dcb925d 14 | MODULE_TYPE = BASE 15 | VERSION_STRING = 1.0 16 | LIBRARY_CLASS = PWMLib 17 | 18 | [Sources.common] 19 | PWMLib.c 20 | 21 | [LibraryClasses] 22 | DebugLib 23 | IoLib 24 | TimerLib 25 | 26 | [Packages] 27 | EmbeddedPkg/EmbeddedPkg.dec 28 | MdePkg/MdePkg.dec 29 | MdeModulePkg/MdeModulePkg.dec 30 | Silicon/Rockchip/RockchipPkg.dec 31 | 32 | [BuildOptions] 33 | 34 | [Pcd] 35 | 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2017, Linaro, Ltd. All rights reserved.
4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | # 8 | #**/ 9 | 10 | [Defines] 11 | DEC_SPECIFICATION = 0x0001001A 12 | PACKAGE_NAME = Pcf8563RealTimeClockLib 13 | PACKAGE_GUID = 44d63668-c86b-446a-b303-f3a5176702aa 14 | PACKAGE_VERSION = 0.1 15 | 16 | [Guids] 17 | gPcf8563RealTimeClockLibTokenSpaceGuid = { 0xaaf5b169, 0x93a0, 0x4d60, { 0xba, 0xe4, 0x06, 0x07, 0x92, 0x8e, 0x63, 0xdd }} 18 | 19 | [Protocols] 20 | gPcf8563RealTimeClockLibI2cMasterProtocolGuid = { 0xa6af18ae, 0x3bd5, 0x4af9, { 0xbb, 0x6a, 0xdb, 0x85, 0x07, 0x62, 0x81, 0x38 }} 21 | 22 | [PcdsFixedAtBuild] 23 | gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51|UINT8|0x00000001 24 | 25 | # preferred/max I2C bus frequency in Hz for the PCF8563 26 | gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cBusFrequency|400000|UINT32|0x00000002 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/PlatformBootDescriptionLib/PlatformBootDescriptionLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Boot Manager device description handler. 4 | # 5 | # Copyright (c) 2023-2024, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = PlatformBootDescriptionLib 14 | FILE_GUID = 8d63c2d3-b621-41f1-80fe-037c46d23790 15 | MODULE_TYPE = DXE_DRIVER 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = NULL|DXE_DRIVER UEFI_APPLICATION 18 | CONSTRUCTOR = PlatformBootDescriptionLibConstructor 19 | 20 | [Sources] 21 | PlatformBootDescriptionLib.c 22 | 23 | [Packages] 24 | MdePkg/MdePkg.dec 25 | MdeModulePkg/MdeModulePkg.dec 26 | Silicon/Rockchip/RockchipPkg.dec 27 | 28 | [LibraryClasses] 29 | UefiLib 30 | UefiBootServicesTableLib 31 | UefiBootManagerLib 32 | MemoryAllocationLib 33 | DevicePathLib 34 | 35 | [Protocols] 36 | gRockchipFirmwareBootDeviceProtocolGuid ## SOMETIMES_CONSUMES 37 | 38 | [Pcd] 39 | gRockchipTokenSpaceGuid.PcdDwcSdhciBaseAddress 40 | gRockchipTokenSpaceGuid.PcdRkSdmmcBaseAddress 41 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/PlatformFlashAccessLib/PlatformFlashAccessLibDxe.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Platform Flash Access library. 3 | # 4 | # Copyright (c) 2018, Hisilicon Limited. All rights reserved. 5 | # Copyright (c) 2018, Linaro Limited. All rights reserved. 6 | # Copyright (c) 2016, Intel Corporation. All rights reserved.
7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | ## 11 | 12 | [Defines] 13 | INF_VERSION = 0x0001001A 14 | BASE_NAME = PlatformFlashAccessLibDxe 15 | FILE_GUID = a6f6d6ea-3177-11ec-95b4-f42a7dcb925d 16 | MODULE_TYPE = DXE_DRIVER 17 | VERSION_STRING = 1.0 18 | LIBRARY_CLASS = PlatformFlashAccessLib|DXE_DRIVER 19 | CONSTRUCTOR = PerformFlashAccessLibConstructor 20 | 21 | [Sources] 22 | PlatformFlashAccessLibDxe.c 23 | 24 | [Packages] 25 | ArmPkg/ArmPkg.dec 26 | MdeModulePkg/MdeModulePkg.dec 27 | MdePkg/MdePkg.dec 28 | SignedCapsulePkg/SignedCapsulePkg.dec 29 | Silicon/Rockchip/RockchipPkg.dec 30 | 31 | [LibraryClasses] 32 | BaseMemoryLib 33 | DebugLib 34 | PcdLib 35 | UefiBootServicesTableLib 36 | 37 | [Protocols] 38 | gUniNorFlashProtocolGuid 39 | 40 | [FixedPcd] 41 | gArmTokenSpaceGuid.PcdFdBaseAddress 42 | gRockchipTokenSpaceGuid.PcdSFCMEM0BaseAddress 43 | 44 | [Depex] 45 | gUniNorFlashProtocolGuid 46 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/RkAtagsLib/RkAtagsLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Rockchip ATAGS library. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = RkAtagsLib 14 | FILE_GUID = EEA8B68F-1262-44D6-9D89-2AE700B969F3 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = RkAtagsLib 18 | 19 | [Sources] 20 | RkAtagsLib.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | 26 | [LibraryClasses] 27 | BaseLib 28 | DebugLib 29 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/RkMtlLib/RkMtlLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # Copyright (c) 2021, Jared McNeill 3 | # Copyright (c) 2017-2018, Arm Limited. All rights reserved. 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | #**/ 7 | 8 | [Defines] 9 | INF_VERSION = 0x00010019 10 | BASE_NAME = RkMtlLib 11 | FILE_GUID = 8C4393C9-3012-4862-A19C-259477D6F518 12 | MODULE_TYPE = BASE 13 | VERSION_STRING = 1.0 14 | LIBRARY_CLASS = ArmMtlLib 15 | 16 | [Sources.common] 17 | RkMtlLib.c 18 | 19 | [Packages] 20 | ArmPkg/ArmPkg.dec 21 | ArmPlatformPkg/ArmPlatformPkg.dec 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RockchipPkg.dec 24 | 25 | [LibraryClasses] 26 | ArmLib 27 | ArmSmcLib 28 | DebugLib 29 | IoLib 30 | UefiBootServicesTableLib 31 | 32 | [FixedPcd.common] 33 | gRockchipTokenSpaceGuid.PcdRkMtlMailBoxBase 34 | gRockchipTokenSpaceGuid.PcdRkMtlMailBoxSize 35 | gRockchipTokenSpaceGuid.PcdRkMtlMailBoxSmcId -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/RkMtlLib/RkMtlPrivateLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright (c) 2017-2018, Arm Limited. All rights reserved. 4 | Copyright (c) 2021, Jared McNeill 5 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent 7 | 8 | System Control and Management Interface V1.0 9 | http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/ 10 | DEN0056A_System_Control_and_Management_Interface.pdf 11 | **/ 12 | 13 | #ifndef RK_MTL_PRIVATE_LIB_H_ 14 | #define RK_MTL_PRIVATE_LIB_H_ 15 | 16 | // Mailbox transport layer. 17 | #define MTL_MAILBOX_BASE (FixedPcdGet64 (PcdRkMtlMailBoxBase)) 18 | #define MTL_MAILBOX_SIZE (FixedPcdGet32 (PcdRkMtlMailBoxSize)) 19 | 20 | #define MTL_POLL 0 21 | 22 | #define MTL_CHANNEL_BUSY 0 23 | #define MTL_CHANNEL_FREE 1 24 | 25 | // Response time out value on a channel 1s. 26 | #define RESPONSE_TIMEOUT 1000000 27 | #define NUM_CHANNELS 1 28 | 29 | // Arbitarary poll time. 30 | #define MTL_POLL_WAIT_TIME 100000 31 | 32 | #endif /* RK_MTL_PRIVATE_LIB_H_ */ 33 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/RkMtlLib/source.txt: -------------------------------------------------------------------------------- 1 | Source: https://github.com/jaredmcneill/quartz64_uefi 2 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/RkSdmmcPlatformLibNull/RkSdmmcPlatformLibNull.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * RkSdmmcDxe platform helper library. 4 | * 5 | * Copyright (c) 2023, Mario Bălănică 6 | * 7 | * SPDX-License-Identifier: BSD-2-Clause-Patent 8 | * 9 | **/ 10 | 11 | #include 12 | #include 13 | 14 | EFI_STATUS 15 | EFIAPI 16 | RkSdmmcSetClockRate ( 17 | IN UINTN Frequency 18 | ) 19 | { 20 | return EFI_UNSUPPORTED; 21 | } 22 | 23 | VOID 24 | EFIAPI 25 | RkSdmmcSetIoMux ( 26 | VOID 27 | ) 28 | { 29 | return; 30 | } 31 | 32 | RKSDMMC_CARD_PRESENCE_STATE 33 | EFIAPI 34 | RkSdmmcGetCardPresenceState ( 35 | VOID 36 | ) 37 | { 38 | return RkSdmmcCardPresenceUnsupported; 39 | } 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/RkSdmmcPlatformLibNull/RkSdmmcPlatformLibNull.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # RkSdmmcDxe platform helper library. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = RkSdmmcPlatformLibNull 14 | FILE_GUID = 3e414bfa-0637-4e2a-a272-eb3767cc5061 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = RkSdmmcPlatformLib 18 | 19 | [Sources] 20 | RkSdmmcPlatformLibNull.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/SdramLib/SdramLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Rockchip SDRAM Library. 4 | # 5 | # Copyright (c) 2022, Jared McNeill 6 | # Copyright (c) 2023, Gábor Stefanik 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | #**/ 11 | 12 | [Defines] 13 | INF_VERSION = 0x0001001A 14 | BASE_NAME = SdramLib 15 | FILE_GUID = F1722CDD-AB5E-4341-8E98-C04CA151D5FB 16 | MODULE_TYPE = BASE 17 | VERSION_STRING = 1.0 18 | LIBRARY_CLASS = SdramLib 19 | 20 | [Sources] 21 | SdramLib.c 22 | 23 | [Packages] 24 | ArmPkg/ArmPkg.dec 25 | MdePkg/MdePkg.dec 26 | EmbeddedPkg/EmbeddedPkg.dec 27 | Silicon/Rockchip/RK3588/RK3588.dec 28 | 29 | [LibraryClasses] 30 | BaseLib 31 | DebugLib 32 | IoLib 33 | 34 | [FixedPcd] 35 | 36 | [Guids] 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/SpiLib/RK806.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Component description file for Uart module 4 | # 5 | # Copyright (c) 2011-2016, ARM Ltd. All rights reserved.
6 | # Copyright (c) 2017, Rockchip Inc. All rights reserved.
7 | # 8 | # This program and the accompanying materials 9 | # are licensed and made available under the terms and conditions of the BSD License 10 | # which accompanies this distribution. The full text of the license may be found at 11 | # http://opensource.org/licenses/bsd-license.php 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | # 16 | #**/ 17 | 18 | [Defines] 19 | INF_VERSION = 0x00010005 20 | BASE_NAME = RK806Lib 21 | FILE_GUID = b90498c8-728a-11ec-ac42-f42a7dcb925d 22 | MODULE_TYPE = BASE 23 | VERSION_STRING = 1.0 24 | LIBRARY_CLASS = RK806Lib 25 | 26 | [Sources.common] 27 | RK806.c 28 | 29 | [LibraryClasses] 30 | BaseLib 31 | DebugLib 32 | IoLib 33 | SpiLib 34 | RockchipPlatformLib 35 | 36 | [Packages] 37 | MdePkg/MdePkg.dec 38 | MdeModulePkg/MdeModulePkg.dec 39 | Silicon/Rockchip/RockchipPkg.dec 40 | 41 | [Pcd] 42 | gRockchipTokenSpaceGuid.SpiRK806BaseAddr 43 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/Library/SpiLib/SpiLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Component description file for Uart module 4 | # 5 | # Copyright (c) 2011-2016, ARM Ltd. All rights reserved.
6 | # Copyright (c) 2017, Rockchip Inc. All rights reserved.
7 | # 8 | # This program and the accompanying materials 9 | # are licensed and made available under the terms and conditions of the BSD License 10 | # which accompanies this distribution. The full text of the license may be found at 11 | # http://opensource.org/licenses/bsd-license.php 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | # 16 | #**/ 17 | 18 | [Defines] 19 | INF_VERSION = 0x00010005 20 | BASE_NAME = SpiLib 21 | FILE_GUID = b90498c8-728a-11ec-ac42-f42a7dcb925d 22 | MODULE_TYPE = BASE 23 | VERSION_STRING = 1.0 24 | LIBRARY_CLASS = SpiLib 25 | 26 | [Sources.common] 27 | SpiLib.c 28 | 29 | [LibraryClasses] 30 | DebugLib 31 | IoLib 32 | 33 | [Packages] 34 | MdePkg/MdePkg.dec 35 | MdeModulePkg/MdeModulePkg.dec 36 | Silicon/Rockchip/RockchipPkg.dec 37 | 38 | [Pcd] 39 | 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/DsdtCommon.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2024, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #include "AcpiTables.h" 10 | 11 | Scope (\_SB_) { 12 | Include ("Scmi.asl") 13 | } 14 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Es8388.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2021, ARM Limited. All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | #include "AcpiTables.h" 9 | 10 | Device (JACK) { 11 | Name (_HID, BOARD_AUDIO_CODEC_HID) 12 | Name (_UID, 0) 13 | Name (_CCA, 0) 14 | 15 | Method (_CRS, 0x0, Serialized) { 16 | Name (RBUF, ResourceTemplate() { 17 | I2cSerialBusV2(BOARD_CODEC_I2C_ADDR, ControllerInitiated, 0x000186A0, 18 | AddressingMode7Bit, BOARD_CODEC_I2C, 19 | 0x00, ResourceConsumer, , Exclusive) 20 | GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x0000, 21 | BOARD_CODEC_GPIO, 0x00, ResourceConsumer) 22 | { 23 | BOARD_CODEC_GPIO_PIN 24 | } 25 | }) 26 | Return (RBUF) 27 | } 28 | } -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Uart.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * [DSDT] Serial devices (UART). 4 | * 5 | * Copyright (c) 2021, ARM Limited. All rights reserved. 6 | * Copyright (c) 2020, Pete Batard 7 | * Copyright (c) 2018, Andrey Warkentin 8 | * Copyright (c) Microsoft Corporation. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: BSD-2-Clause-Patent 11 | * 12 | **/ 13 | 14 | #include "AcpiTables.h" 15 | 16 | Device(UAR2) { 17 | Name (_HID, "HISI0031") 18 | Name (_UID, 2) 19 | Name (_CRS, ResourceTemplate() { 20 | Memory32Fixed(ReadWrite, 0xfeb50000, 0x1000) 21 | Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 365 } 22 | }) 23 | 24 | Name (_DSD, Package () { 25 | ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 26 | Package () { 27 | Package () { "reg-shift", 2 }, 28 | Package () { "reg-io-width", 4 }, 29 | Package () { "clock-frequency", 24000000 }, 30 | } 31 | }) 32 | 33 | Method (_STA, 0, NotSerialized) { 34 | Return(0x0F) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Usb3Host0.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * DWC3 XHCI controller #0 in host mode. 3 | * 4 | * Copyright (c) 2023, Mario Bălănică 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | **/ 8 | 9 | #include "AcpiTables.h" 10 | 11 | Device (XHC0) { 12 | Name (_HID, "PNP0D10") 13 | Name (_UID, Zero) 14 | Name (_CCA, Zero) 15 | 16 | Method (_CRS, 0x0, Serialized) { 17 | Name (RBUF, ResourceTemplate() { 18 | Memory32Fixed (ReadWrite, 0xfc000000, 0x400000) 19 | Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 252 } 20 | }) 21 | Return (RBUF) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Usb3Host1.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * DWC3 XHCI controller #1 in host mode. (only exposed on full RK3588) 3 | * 4 | * Copyright (c) 2023, Mario Bălănică 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | **/ 8 | 9 | #include "AcpiTables.h" 10 | 11 | Device (XHC1) { 12 | Name (_HID, "PNP0D10") 13 | Name (_UID, One) 14 | Name (_CCA, Zero) 15 | 16 | Method (_CRS, 0x0, Serialized) { 17 | Name (RBUF, ResourceTemplate() { 18 | Memory32Fixed (ReadWrite, 0xfc400000, 0x400000) 19 | Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 253 } 20 | }) 21 | Return (RBUF) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Usb3Host2.asl: -------------------------------------------------------------------------------- 1 | /** @file 2 | * DWC3 XHCI controller #2 in host mode. 3 | * 4 | * Copyright (c) 2023, Mario Bălănică 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | **/ 8 | 9 | #include "AcpiTables.h" 10 | 11 | // This only supports USB 3.0 devices. 12 | // USB2 DP / DM are connected to one of the EHCI controllers instead (EHC1 usually). 13 | 14 | Device (XHC2) { 15 | Name (_HID, "PNP0D10") 16 | Name (_UID, 2) 17 | Name (_CCA, Zero) 18 | 19 | Method (_CRS, 0x0, Serialized) { 20 | Name (RBUF, ResourceTemplate() { 21 | Memory32Fixed (ReadWrite, 0xfcd00000, 0x400000) 22 | Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 254 } 23 | }) 24 | Return (RBUF) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/GmacPlatformDxe/EthernetPhy.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2022, Jared McNeill 4 | * Copyright (c) 2023, Mario Bălănică 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | * 8 | **/ 9 | 10 | #ifndef ETHERNETPHY_H__ 11 | #define ETHERNETPHY_H__ 12 | 13 | typedef 14 | EFI_STATUS 15 | (EFIAPI *ETHERNET_PHY_INIT)( 16 | IN EFI_PHYSICAL_ADDRESS GmacBase, 17 | IN UINT32 PhyId 18 | ); 19 | 20 | VOID 21 | PhyRead ( 22 | IN EFI_PHYSICAL_ADDRESS GmacBase, 23 | IN UINT8 Phy, 24 | IN UINT16 Reg, 25 | OUT UINT16 *Value 26 | ); 27 | 28 | VOID 29 | PhyWrite ( 30 | IN EFI_PHYSICAL_ADDRESS GmacBase, 31 | IN UINT8 Phy, 32 | IN UINT16 Reg, 33 | IN UINT16 Value 34 | ); 35 | 36 | EFI_STATUS 37 | EFIAPI 38 | RealtekPhyInit ( 39 | IN EFI_PHYSICAL_ADDRESS GmacBase, 40 | IN UINT32 PhyId 41 | ); 42 | 43 | EFI_STATUS 44 | EFIAPI 45 | MotorcommPhyInit ( 46 | IN EFI_PHYSICAL_ADDRESS GmacBase, 47 | IN UINT32 PhyId 48 | ); 49 | 50 | #endif /* ETHERNETPHY_H__ */ 51 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/ComboPhy.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_COMBO_PHY_H__ 10 | #define __RK3588DXE_COMBO_PHY_H__ 11 | 12 | // 13 | // Don't declare these in the VFR file. 14 | // 15 | #ifndef VFR_FILE_INCLUDE 16 | VOID 17 | EFIAPI 18 | ApplyComboPhyVariables ( 19 | VOID 20 | ); 21 | 22 | VOID 23 | EFIAPI 24 | SetupComboPhyVariables ( 25 | VOID 26 | ); 27 | 28 | #endif // VFR_FILE_INCLUDE 29 | 30 | #endif // __RK3588DXE_COMBO_PHY_H__ 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/ConfigTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_CONFIG_TABLE_H__ 10 | #define __RK3588DXE_CONFIG_TABLE_H__ 11 | 12 | // 13 | // Don't declare these in the VFR file. 14 | // 15 | #ifndef VFR_FILE_INCLUDE 16 | VOID 17 | EFIAPI 18 | ApplyConfigTableVariables ( 19 | VOID 20 | ); 21 | 22 | VOID 23 | EFIAPI 24 | SetupConfigTableVariables ( 25 | VOID 26 | ); 27 | 28 | #endif // VFR_FILE_INCLUDE 29 | 30 | #endif // __RK3588DXE_CONFIG_TABLE_H__ 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/CpuPerformance.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_CPU_PERF_H__ 10 | #define __RK3588DXE_CPU_PERF_H__ 11 | 12 | #define CLUSTER_MICROVOLTS_MIN 500000 13 | #define CLUSTER_MICROVOLTS_MAX 1500000 14 | #define CLUSTER_MICROVOLTS_STEP 6250 15 | #define CPUL_CLUSTER_MICROVOLTS_DEFAULT 950000 16 | #define CPUB_CLUSTER_MICROVOLTS_DEFAULT 1000000 17 | 18 | // 19 | // Don't declare these in the VFR file. 20 | // 21 | #ifndef VFR_FILE_INCLUDE 22 | VOID 23 | EFIAPI 24 | ApplyCpuClockVariables ( 25 | VOID 26 | ); 27 | 28 | VOID 29 | EFIAPI 30 | ApplyCpuVoltageVariables ( 31 | VOID 32 | ); 33 | 34 | VOID 35 | EFIAPI 36 | SetupCpuPerfVariables ( 37 | VOID 38 | ); 39 | 40 | #endif 41 | 42 | #endif // __RK3588DXE_CPU_PERF_H__ 43 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/DebugSerialPort.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "RK3588DxeFormSetGuid.h" 14 | #include "DebugSerialPort.h" 15 | 16 | VOID 17 | EFIAPI 18 | ApplyDebugSerialPortVariables ( 19 | VOID 20 | ) 21 | { 22 | /* nothing to do here */ 23 | } 24 | 25 | VOID 26 | EFIAPI 27 | SetupDebugSerialPortVariables ( 28 | VOID 29 | ) 30 | { 31 | UINTN Size; 32 | UINT64 Var64; 33 | EFI_STATUS Status; 34 | 35 | Size = sizeof (UINT64); 36 | 37 | Status = gRT->GetVariable ( 38 | L"DebugSerialPortBaudRate", 39 | &gRK3588DxeFormSetGuid, 40 | NULL, 41 | &Size, 42 | &Var64 43 | ); 44 | if (EFI_ERROR (Status)) { 45 | Var64 = DEBUG_SERIAL_PORT_BAUD_RATE_DEFAULT; 46 | Status = gRT->SetVariable ( 47 | L"DebugSerialPortBaudRate", 48 | &gRK3588DxeFormSetGuid, 49 | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, 50 | Size, 51 | &Var64 52 | ); 53 | ASSERT_EFI_ERROR (Status); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/DebugSerialPort.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_DEBUG_SERIAL_PORT_H__ 10 | #define __RK3588DXE_DEBUG_SERIAL_PORT_H__ 11 | 12 | #define DEBUG_SERIAL_PORT_BAUD_RATE_MIN 0 13 | #define DEBUG_SERIAL_PORT_BAUD_RATE_MAX 1500000 14 | #define DEBUG_SERIAL_PORT_BAUD_RATE_DEFAULT 1500000 15 | 16 | // 17 | // Don't declare these in the VFR file. 18 | // 19 | #ifndef VFR_FILE_INCLUDE 20 | VOID 21 | EFIAPI 22 | ApplyDebugSerialPortVariables ( 23 | VOID 24 | ); 25 | 26 | VOID 27 | EFIAPI 28 | SetupDebugSerialPortVariables ( 29 | VOID 30 | ); 31 | 32 | #endif // VFR_FILE_INCLUDE 33 | 34 | #endif // __RK3588DXE_DEBUG_SERIAL_PORT_H__ 35 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/Display.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2025, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_DISPLAY_H__ 10 | #define __RK3588DXE_DISPLAY_H__ 11 | 12 | #include 13 | 14 | // 15 | // Don't declare these in the VFR file. 16 | // 17 | #ifndef VFR_FILE_INCLUDE 18 | VOID 19 | EFIAPI 20 | ApplyDisplayVariables ( 21 | VOID 22 | ); 23 | 24 | VOID 25 | EFIAPI 26 | SetupDisplayVariables ( 27 | VOID 28 | ); 29 | 30 | #endif // VFR_FILE_INCLUDE 31 | 32 | #endif // __RK3588DXE_DISPLAY_H__ 33 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/FanControl.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Molly Sophia 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_FANCONTROL_H__ 10 | #define __RK3588DXE_FANCONTROL_H__ 11 | 12 | #define FAN_PERCENTAGE_MIN 0 13 | #define FAN_PERCENTAGE_MAX 100 14 | #define FAN_PERCENTAGE_STEP 1 15 | #define FAN_PERCENTAGE_DEFAULT 50 16 | 17 | // 18 | // Don't declare these in the VFR file. 19 | // 20 | #ifndef VFR_FILE_INCLUDE 21 | VOID 22 | EFIAPI 23 | ApplyCoolingFanVariables ( 24 | VOID 25 | ); 26 | 27 | VOID 28 | EFIAPI 29 | SetupCoolingFanVariables ( 30 | VOID 31 | ); 32 | 33 | #endif // VFR_FILE_INCLUDE 34 | 35 | #endif // __RK3588DXE_FANCONTROL_H__ 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/PciExpress30.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_PCIE30_H__ 10 | #define __RK3588DXE_PCIE30_H__ 11 | 12 | // 13 | // Don't declare these in the VFR file. 14 | // 15 | #ifndef VFR_FILE_INCLUDE 16 | VOID 17 | EFIAPI 18 | ApplyPcie30Variables ( 19 | VOID 20 | ); 21 | 22 | VOID 23 | EFIAPI 24 | SetupPcie30Variables ( 25 | VOID 26 | ); 27 | 28 | #endif // VFR_FILE_INCLUDE 29 | 30 | #endif // __RK3588DXE_PCIE30_H__ 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/RK3588Dxe.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2018, Linaro Ltd. All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_H__ 10 | #define __RK3588DXE_H__ 11 | 12 | #endif /* __RK3588DXE_H__ */ 13 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/RK3588DxeFormSetGuid.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_FORMSET_GUID_H__ 10 | #define __RK3588DXE_FORMSET_GUID_H__ 11 | 12 | #define RK3588DXE_FORMSET_GUID \ 13 | { 0x10f41c33, 0xa468, 0x42cd, { 0x85, 0xee, 0x70, 0x43, 0x21, 0x3f, 0x73, 0xa3 } } 14 | 15 | extern EFI_GUID gRK3588DxeFormSetGuid; 16 | 17 | #endif // __RK3588DXE_FORMSET_GUID_H__ 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/UsbDpPhy.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Mario Bălănică 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588DXE_USBDP_PHY_H__ 10 | #define __RK3588DXE_USBDP_PHY_H__ 11 | 12 | // 13 | // Don't declare these in the VFR file. 14 | // 15 | #ifndef VFR_FILE_INCLUDE 16 | VOID 17 | EFIAPI 18 | ApplyUsbDpPhyVariables ( 19 | VOID 20 | ); 21 | 22 | VOID 23 | EFIAPI 24 | SetupUsbDpPhyVariables ( 25 | VOID 26 | ); 27 | 28 | #endif // VFR_FILE_INCLUDE 29 | 30 | #endif // __RK3588DXE_USBDP_PHY_H__ 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Drivers/UsbDpPhyDxe/UsbDpPhyDxe.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Rockchip USB/DP Combo PHY Driver 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x00010019 13 | BASE_NAME = UsbDpPhyDxe 14 | FILE_GUID = 6fbd6b56-e302-4560-85f4-0e78fb731922 15 | MODULE_TYPE = DXE_DRIVER 16 | VERSION_STRING = 1.0 17 | ENTRY_POINT = UsbDpPhyDxeInitialize 18 | 19 | [Sources.common] 20 | UsbDpPhyDxe.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | MdeModulePkg/MdeModulePkg.dec 25 | Silicon/Rockchip/RockchipPkg.dec 26 | Silicon/Rockchip/RK3588/RK3588.dec 27 | 28 | [LibraryClasses] 29 | UefiDriverEntryPoint 30 | UefiBootServicesTableLib 31 | DebugLib 32 | IoLib 33 | TimerLib 34 | RockchipPlatformLib 35 | 36 | [Protocols] 37 | gDpPhyProtocolGuid ## PRODUCES 38 | 39 | [Pcd] 40 | gRK3588TokenSpaceGuid.PcdUsbDpPhy0Supported 41 | gRK3588TokenSpaceGuid.PcdUsbDpPhy1Supported 42 | gRK3588TokenSpaceGuid.PcdDp0LaneMux 43 | gRK3588TokenSpaceGuid.PcdDp1LaneMux 44 | gRK3588TokenSpaceGuid.PcdUsbDpPhy0Usb3State 45 | gRK3588TokenSpaceGuid.PcdUsbDpPhy1Usb3State 46 | 47 | [Depex] 48 | gRockchipPlatformConfigAppliedProtocolGuid 49 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Include/Library/Pcie30PhyLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2023, Jared McNeill 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef PCIE30PHYLIB_H__ 10 | #define PCIE30PHYLIB_H__ 11 | 12 | EFI_STATUS 13 | Pcie30PhyInit ( 14 | VOID 15 | ); 16 | 17 | #endif /* PCIE30PHYLIB_H__ */ 18 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Include/Library/Rk3588Mem.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2021, Andrey Warkentin 4 | * Copyright (c) 2019, Pete Batard 5 | * 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent 7 | * 8 | **/ 9 | 10 | #ifndef RK3588_MEM_H__ 11 | #define RK3588_MEM_H__ 12 | 13 | #define RK3588_MEM_UNMAPPED_REGION 0 14 | #define RK3588_MEM_BASIC_REGION 1 15 | #define RK3588_MEM_RUNTIME_REGION 2 16 | #define RK3588_MEM_RESERVED_REGION 3 17 | 18 | typedef struct { 19 | CONST CHAR16 *Name; 20 | UINTN Type; 21 | } RK3588_MEMORY_REGION_INFO; 22 | 23 | VOID 24 | Rk3588PlatformGetVirtualMemoryInfo ( 25 | IN RK3588_MEMORY_REGION_INFO **MemoryInfo 26 | ); 27 | 28 | #endif /* RK3588_MEM_H__ */ 29 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Include/RK3588RegsPeri.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2021, Rockchip Ltd. All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef __RK3588_REGS_PERI_H__ 10 | #define __RK3588_REGS_PERI_H__ 11 | 12 | #endif /* __RK3588_REGS_PERI_H__ */ 13 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/DwcSdhciPlatformLib/DwcSdhciPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # DwcSdhciDxe platform helper library. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = DwcSdhciPlatformLib 14 | FILE_GUID = a3d2126b-6110-4bc5-8b96-c95ac9858b04 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = DwcSdhciPlatformLib 18 | 19 | [Sources] 20 | DwcSdhciPlatformLib.c 21 | 22 | [Packages] 23 | MdePkg/MdePkg.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | 26 | [LibraryClasses] 27 | IoLib 28 | RockchipPlatformLib 29 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/GpioLib/GpioLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # RK3566/RK3568 GPIO Library. 4 | # 5 | # Copyright (c) 2021, Jared McNeill 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = GpioLib 14 | FILE_GUID = FD6DFA94-101B-4DE3-8F55-D4CC1E1E642A 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = GpioLib 18 | 19 | [Sources] 20 | GpioLib.c 21 | 22 | [Packages] 23 | ArmPkg/ArmPkg.dec 24 | MdePkg/MdePkg.dec 25 | EmbeddedPkg/EmbeddedPkg.dec 26 | Silicon/Rockchip/RK3588/RK3588.dec 27 | 28 | [LibraryClasses] 29 | BaseLib 30 | DebugLib 31 | IoLib 32 | 33 | [FixedPcd] 34 | 35 | [Guids] 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2021, Andrei Warkentin 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = MemoryInitPeiLib 12 | FILE_GUID = 4bbc9c10-a100-43fb-8311-332ba497d1b4 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = MemoryInitPeiLib|SEC PEIM 16 | 17 | [Sources] 18 | MemoryInitPeiLib.c 19 | 20 | [Packages] 21 | MdePkg/MdePkg.dec 22 | MdeModulePkg/MdeModulePkg.dec 23 | EmbeddedPkg/EmbeddedPkg.dec 24 | ArmPkg/ArmPkg.dec 25 | ArmPlatformPkg/ArmPlatformPkg.dec 26 | Silicon/Rockchip/RK3588/RK3588.dec 27 | 28 | [LibraryClasses] 29 | DebugLib 30 | HobLib 31 | ArmMmuLib 32 | ArmPlatformLib 33 | 34 | [Guids] 35 | gEfiMemoryTypeInformationGuid 36 | 37 | [FeaturePcd] 38 | gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob 39 | 40 | [Pcd] 41 | gArmTokenSpaceGuid.PcdSystemMemoryBase 42 | gArmTokenSpaceGuid.PcdSystemMemorySize 43 | 44 | [Depex] 45 | TRUE 46 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/OtpLib/OtpLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # RK3588 OTP Library. 4 | # 5 | # Copyright (c) 2022, Jared McNeill 6 | # Copyright (c) 2023, Mario Bălănică 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | #**/ 11 | 12 | [Defines] 13 | INF_VERSION = 0x0001001A 14 | BASE_NAME = OtpLib 15 | FILE_GUID = 412C6116-58A9-4512-B98E-0EF837D1D622 16 | MODULE_TYPE = BASE 17 | VERSION_STRING = 1.0 18 | LIBRARY_CLASS = OtpLib 19 | 20 | [Sources] 21 | OtpLib.c 22 | 23 | [Packages] 24 | ArmPkg/ArmPkg.dec 25 | MdePkg/MdePkg.dec 26 | EmbeddedPkg/EmbeddedPkg.dec 27 | Silicon/Rockchip/RK3588/RK3588.dec 28 | 29 | [LibraryClasses] 30 | BaseLib 31 | DebugLib 32 | IoLib 33 | TimerLib 34 | 35 | [Guids] 36 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/Pcie30PhyLib/Pcie30PhyLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # RK3588 PCIe 3.0 PHY Library. 4 | # 5 | # Copyright (c) 2023, Jared McNeill 6 | # Copyright (c) 2023, Molly Sophia 7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | #**/ 11 | 12 | [Defines] 13 | INF_VERSION = 0x0001001A 14 | BASE_NAME = Pcie30PhyLib 15 | FILE_GUID = FF2358C0-1F45-4A8F-971F-891FFDE25C81 16 | MODULE_TYPE = BASE 17 | VERSION_STRING = 1.0 18 | LIBRARY_CLASS = Pcie30PhyLib 19 | 20 | [Sources] 21 | Pcie30PhyLib.c 22 | 23 | [Packages] 24 | ArmPkg/ArmPkg.dec 25 | MdePkg/MdePkg.dec 26 | EmbeddedPkg/EmbeddedPkg.dec 27 | Silicon/Rockchip/RK3588/RK3588.dec 28 | 29 | [LibraryClasses] 30 | BaseLib 31 | DebugLib 32 | IoLib 33 | TimerLib 34 | CruLib 35 | 36 | [FixedPcd] 37 | 38 | [Pcd] 39 | gRK3588TokenSpaceGuid.PcdPcie30PhyMode 40 | 41 | [Guids] 42 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/PlatformLib/Rk3588Helper.S: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2020-2021, Andrei Warkentin 4 | * Copyright (c) 2019-2020, Pete Batard 5 | * Copyright (c) 2016, Linaro Limited. All rights reserved. 6 | * Copyright (c) 2011-2020, ARM Limited. All rights reserved. 7 | * 8 | * SPDX-License-Identifier: BSD-2-Clause-Patent 9 | * 10 | **/ 11 | 12 | #include 13 | #include 14 | 15 | ASM_FUNC (ArmPlatformPeiBootAction) 16 | ret 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/ResetSystemLib/ResetSystemLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Reset System lib using PSCI hypervisor or secure monitor calls 3 | # 4 | # Copyright (c) 2008, Apple Inc. All rights reserved.
5 | # Copyright (c) 2014, Linaro Ltd. All rights reserved.
6 | # Copyright (c) 2024, Google Llc. All rights reserved.
7 | # Copyright (c) 2024, Mario Bălănică 8 | # 9 | # SPDX-License-Identifier: BSD-2-Clause-Patent 10 | # 11 | ## 12 | 13 | [Defines] 14 | INF_VERSION = 1.29 15 | BASE_NAME = ResetSystemLib 16 | FILE_GUID = b967c4de-63f5-4a70-bfee-b7994f77d81b 17 | MODULE_TYPE = BASE 18 | VERSION_STRING = 1.0 19 | LIBRARY_CLASS = ResetSystemLib 20 | CONSTRUCTOR = ResetSystemLibConstructor 21 | 22 | [Sources] 23 | ResetSystemLib.c 24 | 25 | [Packages] 26 | ArmPkg/ArmPkg.dec 27 | MdeModulePkg/MdeModulePkg.dec 28 | MdePkg/MdePkg.dec 29 | Silicon/Rockchip/RockchipPkg.dec 30 | 31 | [LibraryClasses] 32 | ArmMonitorLib 33 | BaseLib 34 | BaseMemoryLib 35 | DebugLib 36 | ResetUtilityLib 37 | 38 | [Guids] 39 | gRockchipResetTypeMaskromGuid 40 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/Rk3588CruLib/Rk3588CruLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x00010019 11 | BASE_NAME = Rk3588CruLib 12 | FILE_GUID = d98e2257-8353-445a-9336-f1f90a6a31f2 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = PlatformCruLib 16 | 17 | [Sources] 18 | Rk3588CruLib.c 19 | 20 | [Packages] 21 | MdePkg/MdePkg.dec 22 | MdeModulePkg/MdeModulePkg.dec 23 | Silicon/Rockchip/RK3588/RK3588.dec 24 | Silicon/Rockchip/RockchipPkg.dec 25 | 26 | [LibraryClasses] 27 | BaseLib 28 | CruLib 29 | DebugLib 30 | IoLib 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/Rk3588PciHostBridgeLib/PciHostBridgeInit.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Copyright 2021-2023, Jared McNeill 4 | Copyright 2023, Molly Sophia 5 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent 7 | 8 | **/ 9 | 10 | #ifndef PCIHOSTBRIDGEINIT_H__ 11 | #define PCIHOSTBRIDGEINIT_H__ 12 | 13 | EFI_STATUS 14 | InitializePciHost ( 15 | UINT32 Segment 16 | ); 17 | 18 | #endif /* PCIHOSTBRIDGEINIT_H__ */ 19 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/Rk3588PciSegmentLib/Rk3588PciSegmentLib.inf: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Instance of PCI Segment Library based on PCI Library. 3 | # 4 | # PCI Segment Library that layers on top of the PCI Library 5 | # 6 | # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
7 | # 8 | # SPDX-License-Identifier: BSD-2-Clause-Patent 9 | # 10 | # 11 | ## 12 | 13 | [Defines] 14 | INF_VERSION = 0x00010005 15 | BASE_NAME = Rk3588PciSegmentLib 16 | MODULE_UNI_FILE = Rk3588PciSegmentLib.uni 17 | FILE_GUID = 5EDF4444-F65F-4CE8-9CC6-25CBFD488FAD 18 | MODULE_TYPE = BASE 19 | VERSION_STRING = 1.0 20 | LIBRARY_CLASS = PciSegmentLib 21 | 22 | # 23 | # The following information is for reference only and not required by the build tools. 24 | # 25 | # VALID_ARCHITECTURES = IA32 X64 EBC 26 | # 27 | 28 | [Sources] 29 | PciSegmentLib.c 30 | 31 | [Packages] 32 | MdePkg/MdePkg.dec 33 | Silicon/Rockchip/RockchipPkg.dec 34 | Silicon/Rockchip/RK3588/RK3588.dec 35 | 36 | [LibraryClasses] 37 | BaseLib 38 | PciLib 39 | DebugLib 40 | 41 | [FixedPcd] 42 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/Rk3588PciSegmentLib/Rk3588PciSegmentLib.uni: -------------------------------------------------------------------------------- 1 | // /** @file 2 | // Instance of PCI Segment Library based on PCI Library. 3 | // 4 | // PCI Segment Library that layers on top of the PCI Library which only 5 | // supports segment 0 PCI configuration access. 6 | // 7 | // Copyright (c) 2016, Intel Corporation. All rights reserved.
8 | // 9 | // SPDX-License-Identifier: BSD-2-Clause-Patent 10 | // 11 | // **/ 12 | 13 | 14 | #string STR_MODULE_ABSTRACT #language en-US "Instance of PCI Segment Library based on PCI Library." 15 | 16 | #string STR_MODULE_DESCRIPTION #language en-US "PCI Segment Library that layers on top of the PCI Library." 17 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/RkSdmmcPlatformLib/RkSdmmcPlatformLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # RkSdmmcDxe platform helper library. 4 | # 5 | # Copyright (c) 2023, Mario Bălănică 6 | # 7 | # SPDX-License-Identifier: BSD-2-Clause-Patent 8 | # 9 | #**/ 10 | 11 | [Defines] 12 | INF_VERSION = 0x0001001A 13 | BASE_NAME = RkSdmmcPlatformLib 14 | FILE_GUID = b9039d6e-6d84-4f32-bfc5-9c328ed3e660 15 | MODULE_TYPE = BASE 16 | VERSION_STRING = 1.0 17 | LIBRARY_CLASS = RkSdmmcPlatformLib 18 | 19 | [Sources] 20 | RkSdmmcPlatformLib.c 21 | 22 | [Packages] 23 | ArmPkg/ArmPkg.dec 24 | MdePkg/MdePkg.dec 25 | Silicon/Rockchip/RockchipPkg.dec 26 | Silicon/Rockchip/RK3588/RK3588.dec 27 | 28 | [LibraryClasses] 29 | DebugLib 30 | UefiBootServicesTableLib 31 | GpioLib 32 | IoLib 33 | RockchipPlatformLib 34 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/Library/SaradcLib/SaradcLib.inf: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # 3 | # Copyright (c) 2024, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | #**/ 8 | 9 | [Defines] 10 | INF_VERSION = 0x0001001A 11 | BASE_NAME = SaradcLib 12 | FILE_GUID = ff2f92c7-428e-49c0-8c39-91091ee278c0 13 | MODULE_TYPE = BASE 14 | VERSION_STRING = 1.0 15 | LIBRARY_CLASS = SaradcLib 16 | CONSTRUCTOR = SaradcLibConstructor 17 | 18 | [Sources] 19 | SaradcLib.c 20 | 21 | [Packages] 22 | MdePkg/MdePkg.dec 23 | Silicon/Rockchip/RK3588/RK3588.dec 24 | 25 | [LibraryClasses] 26 | BaseLib 27 | CruLib 28 | DebugLib 29 | IoLib 30 | TimerLib 31 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/RK3588Platform.dsc.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | !include Silicon/Rockchip/RK3588/RK3588Base.dsc.inc 10 | 11 | ################################################################################ 12 | # 13 | # Pcd Section - list of all common EDK II PCD Entries used by RK3588 platforms. 14 | # 15 | ################################################################################ 16 | 17 | [PcdsFixedAtBuild.common] 18 | # SMBIOS platform config 19 | gRockchipTokenSpaceGuid.PcdProcessorName|"Rockchip RK3588" 20 | 21 | # 22 | # DWC3 controller 23 | # 24 | gRockchipTokenSpaceGuid.PcdDwc3BaseAddresses|{ UINT32(0xfc000000), UINT32(0xfc400000), UINT32(0xfcd00000) } 25 | 26 | # 27 | # PCI Express 3.0 support flags and default values 28 | # 29 | gRK3588TokenSpaceGuid.PcdPcie30Supported|TRUE 30 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Rockchip/RK3588/RK3588SPlatform.dsc.inc: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2023, Mario Bălănică 4 | # 5 | # SPDX-License-Identifier: BSD-2-Clause-Patent 6 | # 7 | ## 8 | 9 | !include Silicon/Rockchip/RK3588/RK3588Base.dsc.inc 10 | 11 | ################################################################################ 12 | # 13 | # Pcd Section - list of all common EDK II PCD Entries used by RK3588S platforms. 14 | # 15 | ################################################################################ 16 | 17 | [PcdsFixedAtBuild.common] 18 | # SMBIOS platform config 19 | gRockchipTokenSpaceGuid.PcdProcessorName|"Rockchip RK3588S" 20 | 21 | # 22 | # DWC3 controller 23 | # 24 | gRockchipTokenSpaceGuid.PcdDwc3BaseAddresses|{ UINT32(0xfc000000), UINT32(0xfcd00000) } 25 | 26 | # 27 | # PCI Express 3.0 support flags and default values 28 | # 29 | gRK3588TokenSpaceGuid.PcdPcie30Supported|FALSE 30 | -------------------------------------------------------------------------------- /edk2-rockchip/Silicon/Synopsys/DesignWare/DesignWarePkg.dec: -------------------------------------------------------------------------------- 1 | #/** @file 2 | # Framework Module Development Environment Industry Standards 3 | # 4 | # This Package provides headers and libraries that conform to EFI/PI Industry standards. 5 | # Copyright (c) 2007-2021, Intel Corporation. All rights reserved. 6 | # Copyright (c) 2012-2014, ARM Ltd. All rights reserved. 7 | # Copyright (c) 2018, Linaro. All rights reserved. 8 | # 9 | # SPDX-License-Identifier: BSD-2-Clause-Patent 10 | #**/ 11 | 12 | [Defines] 13 | DEC_SPECIFICATION = 0x00010019 14 | PACKAGE_NAME = DesignWarePkg 15 | PACKAGE_GUID = e73097ce-1fe2-41a6-a930-3136bc6d23ef 16 | PACKAGE_VERSION = 0.1 17 | 18 | [Includes] 19 | Include 20 | 21 | [Guids.common] 22 | gDwMmcHcNonDiscoverableDeviceGuid = { 0x971ab768, 0xd733, 0x41be, { 0xac, 0x9e, 0x82, 0x36, 0x10, 0x94, 0xc9, 0x3c }} 23 | 24 | [Protocols.common] 25 | gPlatformDwMmcProtocolGuid = { 0x1d6dfde5, 0x76a7, 0x4404, { 0x85, 0x74, 0x7a, 0xdf, 0x1a, 0x8a, 0xa2, 0x0d }} 26 | gDwcEqosPlatformDeviceProtocolGuid = { 0x60975136, 0x4601, 0x41b3, { 0xbf, 0x9a, 0x90, 0xe9, 0x59, 0xfc, 0xb0, 0x02 } } 27 | -------------------------------------------------------------------------------- /images/edk2-frontpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/images/edk2-frontpage.png -------------------------------------------------------------------------------- /misc/extractbl31.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Script to extract PT_LOAD segments from bl31.elf. Derived from 4 | # Rockchip's make_fit_atf.py 5 | 6 | import os 7 | import sys 8 | 9 | # pip3 install pyelftools / apt install python3-pyelftools 10 | from elftools.elf.elffile import ELFFile 11 | from elftools.elf.sections import SymbolTableSection 12 | from elftools.elf.segments import Segment, InterpSegment, NoteSegment 13 | 14 | ELF_SEG_P_TYPE='p_type' 15 | ELF_SEG_P_PADDR='p_paddr' 16 | 17 | def generate_atf_binary(bl31_file_name): 18 | with open(bl31_file_name, "rb") as bl31_file: 19 | bl31 = ELFFile(bl31_file) 20 | 21 | num = bl31.num_segments() 22 | for i in range(num): 23 | seg = bl31.get_segment(i) 24 | if ('PT_LOAD' == seg.__getitem__(ELF_SEG_P_TYPE)): 25 | paddr = seg.__getitem__(ELF_SEG_P_PADDR) 26 | file_name = 'bl31_0x%08x.bin' % paddr 27 | with open(file_name, "wb") as atf: 28 | atf.write(seg.data()); 29 | 30 | generate_atf_binary(sys.argv[1]) 31 | -------------------------------------------------------------------------------- /misc/repack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Used to pack any executable into a complete flash image 4 | 5 | function _fit_repack(){ 6 | mkdir -p ${WORKSPACE}/unpack 7 | 8 | cp ${REPACK_FILE} ${WORKSPACE}/unpack/uboot 9 | cp ${ROOTDIR}/misc/prebuilts/uboot_uefi.img ${WORKSPACE}/ 10 | 11 | pushd ${ROOTDIR}/../git/u-boot 12 | ./scripts/fit-repack.sh -f ${WORKSPACE}/uboot_uefi.img -d ${WORKSPACE}/unpack/ 13 | popd 14 | } 15 | 16 | function _pack(){ 17 | _fit_repack 18 | 19 | echo "****Build 8MB NOR FLASH IMAGE****" 20 | 21 | # FIT Image at 0x100000 22 | dd if=${WORKSPACE}/uboot_uefi.img of=${WORKSPACE}/RK3588_NOR_FLASH.img bs=1K seek=1024 23 | 24 | cp ${WORKSPACE}/RK3588_NOR_FLASH.img ${ROOTDIR}/ 25 | echo "Build done: RK3588_NOR_FLASH.img" 26 | } 27 | 28 | ROOTDIR="$(realpath "$(dirname "$0")")/.." 29 | cd "${ROOTDIR}"||exit 1 30 | REPACK_FILE=${1} 31 | export ROOTDIR REPACK_FILE 32 | WORKSPACE="${ROOTDIR}/workspace" 33 | 34 | _pack 35 | -------------------------------------------------------------------------------- /misc/rk3588_spi_nor_gpt.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/misc/rk3588_spi_nor_gpt.img -------------------------------------------------------------------------------- /misc/rk3588_spi_nor_gpt.txt: -------------------------------------------------------------------------------- 1 | FIRMWARE_VER: 12.0 2 | MACHINE_MODEL: rk3588_s 3 | MACHINE_ID: 007 4 | MANUFACTURER: rockchip 5 | MAGIC: 0x5041524B 6 | ATAG: 0x00200800 7 | MACHINE: rk3588_s 8 | CHECK_MASK: 0x80 9 | PWR_HLD: 0,0,A,0,1 10 | TYPE: GPT 11 | CMDLINE:mtdparts=rk29xxnand:0x00004000@0x00000800(uboot) 12 | -------------------------------------------------------------------------------- /misc/rk3588_spl.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/misc/rk3588_spl.dtb -------------------------------------------------------------------------------- /misc/rk3588_spl_v1.12.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/misc/rk3588_spl_v1.12.bin -------------------------------------------------------------------------------- /misc/tools/aarch64/mkimage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/misc/tools/aarch64/mkimage -------------------------------------------------------------------------------- /misc/tools/x86_64/mkimage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariobalanica/edk2-rk35xx/6a682c0ef3ed74feb8b0d98f1c2aa771ddfbae18/misc/tools/x86_64/mkimage --------------------------------------------------------------------------------