diff --git a/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/AcpiTables/Dsdt.asl index 31968164f..c8a1a77f5 100644 --- a/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") // include ("Gmac.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/AcpiTables/Dsdt.asl index a3def8d4d..d0d6d2087 100644 --- a/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac1.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/AcpiTables/Dsdt.asl index 5dca8135c..cceede197 100755 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") // include ("Gmac.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/AcpiTables/Dsdt.asl index 775543aa3..66cad83dc 100644 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588S", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac1.asl") include ("Gpio.asl") - //include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") //include ("Spi.asl") diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/AcpiTables/Dsdt.asl index a3def8d4d..d0d6d2087 100755 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac1.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Hinlink/H88K/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Hinlink/H88K/AcpiTables/Dsdt.asl index 663a26cf2..a409b7cda 100755 --- a/edk2-rockchip/Platform/Hinlink/H88K/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Hinlink/H88K/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac0.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Khadas/Edge2/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Khadas/Edge2/AcpiTables/Dsdt.asl index 31968164f..c8a1a77f5 100644 --- a/edk2-rockchip/Platform/Khadas/Edge2/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Khadas/Edge2/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") // include ("Gmac.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Mekotronics/R58-Mini/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Mekotronics/R58-Mini/AcpiTables/Dsdt.asl index 663a26cf2..a409b7cda 100644 --- a/edk2-rockchip/Platform/Mekotronics/R58-Mini/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Mekotronics/R58-Mini/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac0.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Mekotronics/R58X/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Mekotronics/R58X/AcpiTables/Dsdt.asl index f02cc4991..09f00fea6 100644 --- a/edk2-rockchip/Platform/Mekotronics/R58X/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Mekotronics/R58X/AcpiTables/Dsdt.asl @@ -21,10 +21,11 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac0.asl") include ("Gmac1.asl") // include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Mixtile/Blade3/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Mixtile/Blade3/AcpiTables/Dsdt.asl index db21414bc..3ac4dbb1d 100644 --- a/edk2-rockchip/Platform/Mixtile/Blade3/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Mixtile/Blade3/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") // include ("Gmac.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/OrangePi/OrangePi5/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/OrangePi/OrangePi5/AcpiTables/Dsdt.asl index f56922694..6e5452067 100755 --- a/edk2-rockchip/Platform/OrangePi/OrangePi5/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/OrangePi/OrangePi5/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) // include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac1.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/AcpiTables/Dsdt.asl index 6b8081b98..48cfa9c8b 100644 --- a/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") // include ("Gmac.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Radxa/ROCK5A/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Radxa/ROCK5A/AcpiTables/Dsdt.asl index a3def8d4d..d0d6d2087 100755 --- a/edk2-rockchip/Platform/Radxa/ROCK5A/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Radxa/ROCK5A/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") include ("Gmac1.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Platform/Radxa/ROCK5B/AcpiTables/Dsdt.asl b/edk2-rockchip/Platform/Radxa/ROCK5B/AcpiTables/Dsdt.asl index db21414bc..3ac4dbb1d 100755 --- a/edk2-rockchip/Platform/Radxa/ROCK5B/AcpiTables/Dsdt.asl +++ b/edk2-rockchip/Platform/Radxa/ROCK5B/AcpiTables/Dsdt.asl @@ -21,9 +21,10 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2) include ("Emmc.asl") include ("Sdhc.asl") + include ("Dma.asl") // include ("Gmac.asl") include ("Gpio.asl") - // include ("I2c.asl") + include ("I2c.asl") include ("Uart.asl") // include ("Spi.asl") diff --git a/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Dma.asl b/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Dma.asl new file mode 100644 index 000000000..53a69b78f --- /dev/null +++ b/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Dma.asl @@ -0,0 +1,104 @@ +/** @file + * + * Copyright (c) 2022, Rockchip Electronics Co. Ltd. + * + * SPDX-License-Identifier: BSD-2-Clause-Patent + * + **/ +#include "AcpiTables.h" + +// +// Description: DMA +// + Device (DMA0) + { + Name (_HID, "ARMH0330") + Name (_UID, 0) + Method (_CRS, 0, Serialized) + { + Name (RBUF, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0xFEA10000, // Address Base + 0x00004000, // Address Length + ) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) + { + 0x00000076, + } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) + { + 0x00000077, + } + }) + Return (RBUF) /* \_SB_.DMA0._CRS.RBUF */ + } + Name (_DSD, Package() { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) {"ctlrName", "DMA0"} + } + }) + } + + Device (DMA1) + { + Name (_HID, "ARMH0330") + Name (_UID, 1) + Method (_CRS, 0, Serialized) + { + Name (RBUF, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0xFEA30000, // Address Base + 0x00004000, // Address Length + ) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) + { + 0x00000078, + } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) + { + 0x00000079, + } + }) + Return (RBUF) /* \_SB_.DMA0._CRS.RBUF */ + } + Name (_DSD, Package() { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) {"ctlrName", "DMA1"} + } + }) + } + + Device (DMA2) + { + Name (_HID, "ARMH0330") + Name (_UID, 2) + Method (_CRS, 0, Serialized) + { + Name (RBUF, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + 0xFED10000, // Address Base + 0x00004000, // Address Length + ) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) + { + 0x0000007A, + } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) + { + 0x0000007B, + } + }) + Return (RBUF) /* \_SB_.DMA0._CRS.RBUF */ + } + Name (_DSD, Package() { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) {"ctlrName", "DMA2"} + } + }) + } \ No newline at end of file diff --git a/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/I2c.asl b/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/I2c.asl index 0db5f64ef..4fc8e6737 100644 --- a/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/I2c.asl +++ b/edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/I2c.asl @@ -7,8 +7,34 @@ **/ #include "AcpiTables.h" + Device (I2C1) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 1) + Name (_CCA, 0) + + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfea90000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 350 } + }) + Return (RBUF) + } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) + } + Device (I2C2) { - Name (_HID, "PRP0001") + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") Name (_UID, 2) Name (_CCA, 0) @@ -23,33 +49,160 @@ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, Package (2) { "compatible", "rockchip,rk3399-i2c" }, Package (2) { "#address-cells", 1 }, Package (2) { "#size-cells", 0 }, } }) + } - OperationRegion(I2PC, SystemMemory, 0xFD7C0828, 0x4) - Field(I2PC, DWordAcc, Lock, WriteAsZeros) { - CG10, 32, + Device (I2C3) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 3) + Name (_CCA, 0) + + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfeab0000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 352 } + }) + Return (RBUF) } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) + } + + Device (I2C4) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 4) + Name (_CCA, 0) - OperationRegion(I2SC, SystemMemory, 0xFD7C082c, 0x4) - Field(I2SC, DWordAcc, Lock, WriteAsZeros) { - CG11, 32, + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfeac0000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 353 } + }) + Return (RBUF) } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) + } - Method(_PS3) { - Store (0x02000200, CG10) - Store (0x00020002, CG11) + Device (I2C5) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 5) + Name (_CCA, 0) + + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfead0000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 354 } + }) + Return (RBUF) } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) + } + + Device (I2C6) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 6) + Name (_CCA, 0) - Method(_PS0) { - Store (0x02000000, CG10) - Store (0x00020000, CG11) + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfec80000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 355 } + }) + Return (RBUF) } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) + } - Method(_PSC) { - Return(0x01) + Device (I2C7) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 7) + Name (_CCA, 0) + + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfec90000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 356 } + }) + Return (RBUF) } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) } + + Device (I2C8) { + Name (_HID, "RKCP3001") + Name (_CID, "PRP0001") + Name (_UID, 8) + Name (_CCA, 0) + + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0xfeca0000, 0x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 357 } + }) + Return (RBUF) + } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "i2c,clk-rate", 198000000 }, + Package (2) { "rockchip,bclk", 198000000 }, + Package (2) { "compatible", "rockchip,rk3399-i2c" }, + Package (2) { "#address-cells", 1 }, + Package (2) { "#size-cells", 0 }, + } + }) + } \ No newline at end of file