summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Livingston2019-08-19 12:00:20 -0500
committerFrank Livingston2019-08-19 12:00:20 -0500
commit10885254487f51ab3e143b5018b94231ab6f2e6c (patch)
tree3cec73a9a59434a210aacf283a1cf9831a750292
parente1f69cc0adce876352f2a705de7286934c1e1add (diff)
downloadpruss-lld-10885254487f51ab3e143b5018b94231ab6f2e6c.tar.gz
pruss-lld-10885254487f51ab3e143b5018b94231ab6f2e6c.tar.xz
pruss-lld-10885254487f51ab3e143b5018b94231ab6f2e6c.zip
PRSDK-5738:Add FW version information
Signed-off-by: Frank Livingston <frank-livingston@ti.com>
-rw-r--r--example/apps/icssg_pwm/firmware/src/firmware_version.h80
-rw-r--r--example/apps/icssg_pwm/firmware/src/iepPwmFwRegs.c27
2 files changed, 94 insertions, 13 deletions
diff --git a/example/apps/icssg_pwm/firmware/src/firmware_version.h b/example/apps/icssg_pwm/firmware/src/firmware_version.h
new file mode 100644
index 0000000..5aac062
--- /dev/null
+++ b/example/apps/icssg_pwm/firmware/src/firmware_version.h
@@ -0,0 +1,80 @@
1/*
2 * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
3 *
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#ifndef _FIRMWARE_VERSION_H_
35#define _FIRMWARE_VERSION_H_
36
37/*
38 ICSSG_PWM_FIRMWARE_DEVICE_VERSION:
39 bit31..24 Device type
40*/
41#define FIRMWARE_DEVICE_ICSS_REV1 0
42#define FIRMWARE_DEVICE_ICSS_REV2 1
43
44/*
45 bit23..0 protocol type
46*/
47#define FIRMWARE_PROTOCOL_CONTROL_CLASS 0x02
48#define FIRMWARE_PROTOCOL_TYPE_ICSSG_PWM_VERSION1 0x01
49
50/*
51 bit31 release or internal version
52*/
53#define FIRMWARE_VERSION_INTERNAL 1
54#define FIRMWARE_VERSION_RELEASE 0
55/*
56 bit30..24 major version number, for major IP changes.
57*/
58#define FIRMWARE_VERSION_MAJOR 0x01
59/*
60 bit23..16 minor version number, for feature additions to firmware.
61*/
62#define FIRMWARE_VERSION_MINOR 0x00
63/*
64 bit15..0 build number, for all other minor changes.
65*/
66#define FIRMWARE_VERSION_BUILD 0x00
67
68/* macro for indicating type of firmware and device */
69#define ICSSG_PWM_FIRMWARE_TYPE ((FIRMWARE_DEVICE_ICSS_REV2 << 24) | (FIRMWARE_PROTOCOL_CONTROL_CLASS << 8) | (FIRMWARE_PROTOCOL_TYPE_ICSSG_PWM_VERSION1 << 0))
70
71/* macro for indicating version of firmware */
72#define ICSSG_PWM_FIRMWARE_VERSION ((FIRMWARE_VERSION_RELEASE << 31) | (FIRMWARE_VERSION_MAJOR << 24) | (FIRMWARE_VERSION_MINOR << 16) | (FIRMWARE_VERSION_BUILD << 0))
73
74/* Bitmap for various feature supported in firmware */
75#define ICSSG_PWM_FIRMWARE_FEATURE ( 0x00001998 ) /* Firmware Feature - support for 24 PWMs, 12 IEP0 PWMs, 12 IEP1 PWMs */
76
77/* Offset to an extended feature structure for future use. */
78#define ICSSG_PWM_FIRMWARE_EXTENDED_FEATURE_PTR ( 0 ) /* Firmware Extended Feature - Reserved for future use */
79
80#endif /* _FIRMWARE_VERSION_H_ */
diff --git a/example/apps/icssg_pwm/firmware/src/iepPwmFwRegs.c b/example/apps/icssg_pwm/firmware/src/iepPwmFwRegs.c
index f672bd0..b1388c0 100644
--- a/example/apps/icssg_pwm/firmware/src/iepPwmFwRegs.c
+++ b/example/apps/icssg_pwm/firmware/src/iepPwmFwRegs.c
@@ -32,27 +32,28 @@
32 */ 32 */
33 33
34#include <ti/csl/tistdtypes.h> 34#include <ti/csl/tistdtypes.h>
35#include "firmware_version.h"
35#include "iepPwmFwRegs.h" 36#include "iepPwmFwRegs.h"
36 37
37/* PWM Info defaults */ 38/* PWM Info defaults */
38#define DEF_FW_MAGIC_NUMBER ( 0x4D575047 ) /* Firmware Magic Number - GPWM */ 39#define DEF_FW_MAGIC_NUMBER ( 0x4D575047 ) /* Firmware Magic Number - GPWM */
39#define DEF_FW_TYPE ( 0x00000000 ) /* Firmware Type - TBD */ 40#define DEF_FW_TYPE ( ICSSG_PWM_FIRMWARE_TYPE ) /* Firmware Type */
40#define DEF_FW_VERSION ( 0x00000000 ) /* Firmware Version - TBD */ 41#define DEF_FW_VERSION ( ICSSG_PWM_FIRMWARE_VERSION ) /* Firmware Version */
41#define DEF_FW_FEATURE ( 0x00001998 ) /* Firmware Feature - support for 24 PWMs, 12 IEP0 PWMs, 12 IEP1 PWMs */ 42#define DEF_FW_FEATURE ( ICSSG_PWM_FIRMWARE_FEATURE ) /* Firmware Feature */
42#define DEF_FW_EXTENDED_FEATURE ( 0x00000000 ) /* Firmware Extended Feature - Reserved for future use */ 43#define DEF_FW_EXTENDED_FEATURE ( ICSSG_PWM_FIRMWARE_EXTENDED_FEATURE_PTR ) /* Firmware Extended Feature */
43 44
44/* PWM control defaults */ 45/* PWM control defaults */
45#define DEF_PWM_CTRL ( 0x00000000 ) /* PWM control - IEP0 & IEP1 PWMs disabled */ 46#define DEF_PWM_CTRL ( 0x00000000 ) /* PWM control - IEP0 & IEP1 PWMs disabled */
46#define DEF_PWM_STAT ( 0x00000000 ) /* PWM status - IEP0 & IEP1 PWM ACK disabled, FW initialization flag uninitialized */ 47#define DEF_PWM_STAT ( 0x00000000 ) /* PWM status - IEP0 & IEP1 PWM ACK disabled, FW initialization flag uninitialized */
47#define DEF_PWM_RECFG ( 0x00000000 ) /* Default no reconfiguration request */ 48#define DEF_PWM_RECFG ( 0x00000000 ) /* Default no reconfiguration request */
48 49
49#define DEF_PWM_MODE ( 0x00000000 ) /* Default all PWMs are Single-Ended */ 50#define DEF_PWM_MODE ( 0x00000000 ) /* Default all PWMs are Single-Ended */
50#define DEF_PWM_EN ( 0x00000000 ) /* Default all PWMs are disabled */ 51#define DEF_PWM_EN ( 0x00000000 ) /* Default all PWMs are disabled */
51 52
52/* IEP clock @ 200 MHz */ 53/* IEP clock @ 200 MHz */
53#define DEF_PRD_COUNT ( 0x0007A120 ) /* Default Period Count, PWM freq 1 kHz */ 54#define DEF_PRD_COUNT ( 0x0007A120 ) /* Default Period Count, PWM freq 1 kHz */
54#define DEF_DC_COUNT ( 0x0007A120 ) /* Default DC Count, 50% Duty Cycle PWM freq 1 kHz */ 55#define DEF_DC_COUNT ( 0x0007A120 ) /* Default DC Count, 50% Duty Cycle PWM freq 1 kHz */
55#define DEF_DB_COUNT ( 0x0A00 ) /* Default DB Count, 2.56 usec. */ 56#define DEF_DB_COUNT ( 0x0A00 ) /* Default DB Count, 2.56 usec. */
56 57
57/* FW Info register defaults */ 58/* FW Info register defaults */
58#pragma RETAIN(gIepPwmInfoFwRegs) 59#pragma RETAIN(gIepPwmInfoFwRegs)