diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-10-14 10:32:46 -0600 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2014-10-15 13:17:04 -0600 |
commit | f4e367113456becc1b5fde89dbf5dff2cf74e632 (patch) | |
tree | abd79049c223aa5b4558e8fff78dd3088e7ba7b9 | |
parent | 7e87c2f40320afe13041db884729fae46f0a8f44 (diff) | |
download | tegra-pinmux-scripts-f4e367113456becc1b5fde89dbf5dff2cf74e632.tar.gz |
Board CSV import: Put full CSV filename in data structure
Putting the whole filename in to the data structure allows us to keep
different CSV files in different directories. This will allow explicit
separation of public and private CSV files.
The per-board data is also modified to be a dictionary so that additional
fields can be stored in the future.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rwxr-xr-x | csv-to-board-tegra124-xlsx.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/csv-to-board-tegra124-xlsx.py b/csv-to-board-tegra124-xlsx.py index c150ffa..097a5d4 100755 --- a/csv-to-board-tegra124-xlsx.py +++ b/csv-to-board-tegra124-xlsx.py @@ -42,15 +42,26 @@ if args.debug: if dbg: print(args) supported_boards = { - 'jetson-tk1': 'T124_customer_pinmux_PM375_30Apr2014_v2.csv', # worksheet PM375Beaver_Configuration - 'norrin': 'PM370_T124_customer_pinmux_1.1.csv', # worksheet Customer_Configuration - 'venice2': 'Venice2_T124_customer_pinmux_based_on_P4_rev47_2013-07-12.csv', # worksheet Customer_Configuration + 'jetson-tk1': { + # T124_customer_pinmux_PM375_30Apr2014_v2.xlsm worksheet PM375Beaver_Configuration (0-based rsvd) + # T124_customer_pinmux.xlsm worksheet Jetson TK1 Configuration (1-based rsvd) + # Jetson_TK1_customer_pinmux_release.xlsm worksheet Jetson TK1 Configuration (1-based rsvd) + 'filename': 'csv/jetson-tk1.csv', + }, + 'norrin': { + # PM370_T124_customer_pinmux_1.1.xlsm worksheet Customer_Configuration (0-based rsvd) + 'filename': 'nv-internal-data/PM370_T124_customer_pinmux_1.1.csv', + }, + 'venice2': { + # Venice2_T124_customer_pinmux_based_on_P4_rev47_2013-07-12.xlsm worksheet Customer_Configuration (0-based rsvd) + 'filename': 'nv-internal-data/Venice2_T124_customer_pinmux_based_on_P4_rev47_2013-07-12.csv', + }, } if not args.board in supported_boards: print('ERROR: Unsupported board %s' % args.board, file=sys.stderr) sys.exit(1) -csvfile = os.path.join('nv-internal-data', supported_boards[args.board]) +board_conf = supported_boards[args.board] soc = tegra_pmx_soc_parser.load_soc('tegra124') @@ -136,7 +147,7 @@ def rcv_sel_munge(d): found_header = False pin_table = [] -with open(csvfile, newline='') as fh: +with open(board_conf['filename'], newline='') as fh: csv = csv.reader(fh) lnum = 0 for row in csv: |