From aad224ef28257236706b554d71c8d8f4c6800ab0 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Tue, 20 Aug 2024 14:02:54 +0200 Subject: [PATCH] bootcount: add support to ccmp25 platform on external RTC on I2C1 Signed-off-by: Hector Palacios --- .../recipes-digi/bootcount/bootcount/bootcount-bin/bootcount.c | 3 ++- .../bootcount/bootcount/bootcount-bin/bootcount_nvmem.c | 3 ++- .../bootcount/bootcount/bootcount-bin/include/platform_utils.h | 3 ++- .../bootcount/bootcount/bootcount-bin/platform_utils.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount.c b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount.c index 8b2335212..55dc5fe76 100644 --- a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount.c +++ b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Digi International Inc. + * Copyright (c) 2023-2024 Digi International Inc. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -60,6 +60,7 @@ struct platform_functions platforms_functions[] = { [PLATFORM_CC93] = {read_bootcount_nvmem, write_bootcount_nvmem}, [PLATFORM_CCMP13] = {read_bootcount_nvmem, write_bootcount_nvmem}, [PLATFORM_CCMP15] = {read_bootcount_nvmem, write_bootcount_nvmem}, + [PLATFORM_CCMP25] = {read_bootcount_nvmem, write_bootcount_nvmem}, [PLATFORM_UNKNOWN] = {NULL, NULL} }; diff --git a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount_nvmem.c b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount_nvmem.c index d58ee8090..fa4d7568e 100644 --- a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount_nvmem.c +++ b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/bootcount_nvmem.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Digi International Inc. + * Copyright (c) 2023-2024 Digi International Inc. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -41,6 +41,7 @@ struct platform_nvmem platforms_nvmem[] = { [PLATFORM_CC93] = {"/sys/bus/i2c/devices/2-0052/rv3028_nvram0/nvmem", 0, 1}, [PLATFORM_CCMP13] = {"/sys/bus/i2c/devices/2-0052/rv3028_nvram0/nvmem", 0, 1}, [PLATFORM_CCMP15] = {"/sys/bus/i2c/devices/6-0052/rv3028_nvram0/nvmem", 0, 1}, + [PLATFORM_CCMP25] = {"/sys/bus/i2c/devices/0-0052/rv3028_nvram0/nvmem", 0, 1}, [PLATFORM_UNKNOWN] = {NULL, 0, 0}, }; diff --git a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/include/platform_utils.h b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/include/platform_utils.h index d453630ce..b4e453f51 100644 --- a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/include/platform_utils.h +++ b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/include/platform_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Digi International Inc. + * Copyright (c) 2023-2024 Digi International Inc. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -31,6 +31,7 @@ typedef enum { PLATFORM_CC93, PLATFORM_CCMP13, PLATFORM_CCMP15, + PLATFORM_CCMP25, PLATFORM_UNKNOWN } platform_t; diff --git a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/platform_utils.c b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/platform_utils.c index 3030f07ae..eafcc1e54 100644 --- a/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/platform_utils.c +++ b/meta-digi-dey/recipes-digi/bootcount/bootcount/bootcount-bin/platform_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Digi International Inc. + * Copyright (c) 2023-2024 Digi International Inc. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -33,6 +33,7 @@ char* platform_names[] = { [PLATFORM_CC93] = "ccimx93", [PLATFORM_CCMP13] = "ccmp13", [PLATFORM_CCMP15] = "ccmp15", + [PLATFORM_CCMP25] = "ccmp25", [PLATFORM_UNKNOWN] = "unknown" };