Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/aspeed-dev' into aspeed-master
Browse files Browse the repository at this point in the history
Signed-off-by: Kane-Chen-AS <[email protected]>
Change-Id: I220a7cf5c256d93f5dcf022420b443ebba04cf2d
  • Loading branch information
Kane-Chen-AS committed Aug 9, 2024
2 parents d81b3ef + 4b4208f commit 8e1f856
Show file tree
Hide file tree
Showing 134 changed files with 3,002 additions and 3,149 deletions.
8 changes: 6 additions & 2 deletions apps/aspeed-pfr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.13.1)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(aspeed-pfr VERSION 02.01 LANGUAGES C)
project(aspeed-pfr VERSION 02.02 LANGUAGES C)

set(PROJECT_VERSION_MAJOR ${CMAKE_PROJECT_VERSION_MAJOR})
set(PROJECT_VERSION_MINOR ${CMAKE_PROJECT_VERSION_MINOR})
Expand All @@ -19,7 +19,11 @@ set(CERBERUS_ROOT $ENV{ZEPHYR_BASE}/../middlewares/cerberus)
zephyr_link_libraries(hrot_hal)
zephyr_link_libraries(hrot_wrapper)
zephyr_link_libraries(smf)
zephyr_link_libraries(lms)

if (MBEDTLS_LMS_C)
zephyr_link_libraries(lms)
endif()

zephyr_link_libraries(cerberus)
zephyr_link_libraries(mbedTLS)
zephyr_include_directories(mbedTLS)
Expand Down
25 changes: 22 additions & 3 deletions apps/aspeed-pfr/Kconfig.spdm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ config PFR_MCTP_I3C
help
Enable MCTP over I3C support

config PFR_MCTP_I3C_5_0
depends on PFR_MCTP_I3C
default n
bool "PFR 5.0 MCTP over I3C support"
help
Enable MCTP over I3C support for PFR 5.0

config PFR_SPDM_RESPONDER
depends on PFR_MCTP
default n
Expand Down Expand Up @@ -60,13 +67,25 @@ config PFR_SPDM_I3C_BUS
default 2
int "I3C bus for attestation"

config PFR_SPDM_CPU_I3C_BUS
default 0
int "CPU I3C bus for attestation"

config PFR_SPDM_I3C_BMC_DEV_PID
default 0x7ec05031000
hex "I3C device pid for BMC"

config PFR_SPDM_I3C_CPU_DEV_PID
default 0x7ec05032000
hex "I3C device pid for CPU"
config PFR_SPDM_I3C_HUB_DEV_PID
default 0x4cd7515a106
hex "I3C device pid for i3c hub"

config PFR_SPDM_I3C_CPU0_DEV_PID
default 0x20a0000000f
hex "I3C device pid for CPU0"

config PFR_SPDM_I3C_CPU1_DEV_PID
default 0x20a0000100f
hex "I3C device pid for CPU1"

config AFM_SPEC_VERSION
range 3 4
Expand Down
7 changes: 6 additions & 1 deletion apps/aspeed-pfr/boards/ast1060_dcscm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ CONFIG_PROVISION_SHELL=y
# AFM version settings
CONFIG_AFM_SPEC_VERSION=4
CONFIG_PFR_SPDM_ATTESTATION_DEVICE_OFFSET=0x2000
CONFIG_PFR_SPDM_ATTESTATION_MAX_DEVICES=33
CONFIG_PFR_SPDM_ATTESTATION_MAX_DEVICES=33

# Intel PFR 5.0
CONFIG_PFR_MCTP_I3C_5_0=n
CONFIG_I3C_TARGET=n
CONFIG_I3C_TARGET_MQUEUE=n
76 changes: 73 additions & 3 deletions apps/aspeed-pfr/boards/ast1060_dcscm.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,36 @@
status = "okay";
};

#if 1
&i3c0 {
status = "okay";
sda-tx-hold-ns = <20>;
i3c-pp-scl-hi-period-ns = <380>;
i3c-pp-scl-lo-period-ns = <620>;
pinctrl-0 = <pinctrl_i3c0_default>;

// i3chub
i3cdev@4cd7515a106 {
compatible = "i3c-dummy-device";
reg = <0x0 0x4cd 0x7515a106>;
status = "okay";
};

// cpu0
i3cdev@20a0000000f {
compatible = "i3c-dummy-device";
reg = <0x0 0x20a 0x0000000f>;
status = "okay";
};

// cpu1
i3cdev@20a0000100f {
compatible = "i3c-dummy-device";
reg = <0x0 0x20a 0x0000100f>;
status = "okay";
};
};

// For mctp over i3c
// AST2600 i3c-1 -> AST1060 i3c-2
&i3c2 {
Expand All @@ -72,6 +102,46 @@
status = "okay";
};
};
#else
// For testing PFR 5.0 it requires following modification on dcscm card:
// - TP313 connected to R187
// - TP314 connected to R188
// AST1060 i3c0 -> AST2600 i3c0 (LV)
// AST1060 i3c2 -> AST2600 i3c1 (LV)
&i3c0 {
status = "okay";
dcr = <0xcc>;
secondary;

pinctrl-0 = < pinctrl_i3c0_default >;

i3c0_tmq:i3c-tmq@7eca0030000 {
compatible = "i3c-target-mqueue";
reg = <0x0 0x7ec 0xa0030000>;
msg-size = <256>;
num-of-msgs = <4>;
mandatory-data-byte = <0xae>;
status = "okay";
};
};

&i3c2 {
status = "okay";
dcr = <0xcc>;
secondary;

pinctrl-0 = < pinctrl_i3c2_default >;

i3c2_tmq:i3c-tmq@7eca0032000 {
compatible = "i3c-target-mqueue";
reg = <0x0 0x7ec 0xa0032000>;
msg-size = <256>;
num-of-msgs = <4>;
mandatory-data-byte = <0xae>;
status = "okay";
};
};
#endif

&wdt0 {
status = "okay";
Expand Down Expand Up @@ -203,18 +273,21 @@
&spi1_cs0 {
spi-max-buswidth = <4>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim1>;
status = "okay";
};

&spi2_cs0 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim3>;
status = "okay";
};

&spi2_cs1 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim4>;
status = "okay";
};

Expand All @@ -239,7 +312,6 @@
log-ram-size = <0x200>;
pinctrl-0 = <pinctrl_spim1_quad_default>;
pinctrl-names = "default";
flash-device = <&spi1_cs0>;
ext-mux-sel = <1>;
status = "okay";

Expand All @@ -256,7 +328,6 @@
&pin_spim3misoout &pin_spim3mosiout &pin_spim3io2out &pin_spim3io3out
&pin_spim3muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs0>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand All @@ -272,7 +343,6 @@
&pin_spim4misoout &pin_spim4mosiout &pin_spim4io2out &pin_spim4io3out
&pin_spim4muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs1>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand Down
6 changes: 3 additions & 3 deletions apps/aspeed-pfr/boards/ast1060_dcscm_amd.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,21 @@
&spi1_cs0 {
spi-max-buswidth = <4>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim1>;
status = "okay";
};

&spi2_cs0 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim3>;
status = "okay";
};

&spi2_cs1 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim4>;
status = "okay";
};

Expand All @@ -173,7 +176,6 @@
log-ram-size = <0x200>;
pinctrl-0 = <pinctrl_spim1_quad_default>;
pinctrl-names = "default";
flash-device = <&spi1_cs0>;
ext-mux-sel = <1>;
status = "okay";

Expand All @@ -190,7 +192,6 @@
&pin_spim3misoout &pin_spim3mosiout &pin_spim3io2out &pin_spim3io3out
&pin_spim3muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs0>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand All @@ -206,7 +207,6 @@
&pin_spim4misoout &pin_spim4mosiout &pin_spim4io2out &pin_spim4io3out
&pin_spim4muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs1>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand Down
6 changes: 3 additions & 3 deletions apps/aspeed-pfr/boards/ast1060_dcscm_dice.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,21 @@
&spi1_cs0 {
spi-max-buswidth = <4>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim1>;
status = "okay";
};

&spi2_cs0 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim3>;
status = "okay";
};

&spi2_cs1 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim4>;
status = "okay";
};

Expand All @@ -235,7 +238,6 @@
log-ram-size = <0x200>;
pinctrl-0 = <pinctrl_spim1_quad_default>;
pinctrl-names = "default";
flash-device = <&spi1_cs0>;
ext-mux-sel = <1>;
status = "okay";

Expand All @@ -252,7 +254,6 @@
&pin_spim3misoout &pin_spim3mosiout &pin_spim3io2out &pin_spim3io3out
&pin_spim3muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs0>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand All @@ -268,7 +269,6 @@
&pin_spim4misoout &pin_spim4mosiout &pin_spim4io2out &pin_spim4io3out
&pin_spim4muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs1>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand Down
8 changes: 4 additions & 4 deletions apps/aspeed-pfr/boards/ast1060_dual_flash.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -143,24 +143,28 @@
&spi1_cs0 {
spi-max-buswidth = <4>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim1>;
status = "okay";
};

&spi1_cs1 {
spi-max-buswidth = <4>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim2>;
status = "okay";
};

&spi2_cs0 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim3>;
status = "okay";
};

&spi2_cs1 {
spi-max-buswidth = <1>;
spi-max-frequency = <50000000>;
spi-monitor-ctrl = <&spim4>;
status = "okay";
};

Expand All @@ -185,7 +189,6 @@
log-ram-size = <0x200>;
pinctrl-0 = <pinctrl_spim1_quad_default>;
pinctrl-names = "default";
flash-device = <&spi1_cs0>;
ext-mux-sel = <1>;
status = "okay";

Expand All @@ -199,7 +202,6 @@
log-ram-size = <0x200>;
pinctrl-0 = <pinctrl_spim2_quad_default>;
pinctrl-names = "default";
flash-device = <&spi1_cs1>;
ext-mux-sel = <1>;
status = "okay";

Expand All @@ -216,7 +218,6 @@
&pin_spim3misoout &pin_spim3mosiout &pin_spim3io2out &pin_spim3io3out
&pin_spim3muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs0>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand All @@ -232,7 +233,6 @@
&pin_spim4misoout &pin_spim4mosiout &pin_spim4io2out &pin_spim4io3out
&pin_spim4muxsel>;
pinctrl-names = "default";
flash-device = <&spi2_cs1>;
ext-mux-sel = <1>;
status = "okay";
write-forbidden-regions = <
Expand Down
Loading

0 comments on commit 8e1f856

Please sign in to comment.