linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pinmux scripts PATCH 1/4] Board CSV import: Support all Tegra124 OD pins
@ 2014-10-14 17:11 Stephen Warren
       [not found] ` <1413306680-27330-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2014-10-14 17:11 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Complete the list of OD pins in the CSV -> *.board import script for
Tegra124.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 csv-to-board-tegra124-xlsx.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/csv-to-board-tegra124-xlsx.py b/csv-to-board-tegra124-xlsx.py
index be985c2b83c6..c150fface9d2 100755
--- a/csv-to-board-tegra124-xlsx.py
+++ b/csv-to-board-tegra124-xlsx.py
@@ -219,9 +219,8 @@ with open(csvfile, newline='') as fh:
             print('ERROR: %s: MUX CSV %s not in SOC F0..3 %s' % (ball_name, mux, repr(gpio_pin.funcs)), file=sys.stderr)
             sys.exit(1)
 
-        if ball_name.startswith('ddc_'):
+        if ball_name in ('reset_out_n', 'owr', 'hdmi_int', 'ddc_scl', 'ddc_sda'):
             # These balls' pad type is always OD, so we don't need to set it
-            # FIXME: There are a few other OD type pads to check for
             # FIXME: The SoC data structure should tell us the pad type instead of hard-coding it
             od = False
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [pinmux scripts PATCH 2/4] Board CSV import: Put full CSV filename in data structure
       [not found] ` <1413306680-27330-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2014-10-14 17:11   ` Stephen Warren
       [not found]     ` <1413306680-27330-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  2014-10-14 17:11   ` [pinmux scripts PATCH 3/4] Board CSV import: Support either 0- or 1-based RSVD numbers Stephen Warren
  2014-10-14 17:11   ` [pinmux scripts PATCH 4/4] Board CSV Import: Allow board configuration overrides on cmdline Stephen Warren
  2 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2014-10-14 17:11 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 csv-to-board-tegra124-xlsx.py | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/csv-to-board-tegra124-xlsx.py b/csv-to-board-tegra124-xlsx.py
index c150fface9d2..d5a8f2f3f645 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
+        # T124_customer_pinmux.xlsm worksheet Jetson TK1 Configuration
+        # Jetson_TK1_customer_pinmux_release.xlsm worksheet Jetson TK1 Configuration
+        'filename': 'csv/jetson-tk1.csv', # worksheet PM375Beaver_Configuration
+    },
+    'norrin': {
+        # PM370_T124_customer_pinmux_1.1.xlsm worksheet Customer_Configuration
+        '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
+        '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:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [pinmux scripts PATCH 3/4] Board CSV import: Support either 0- or 1-based RSVD numbers
       [not found] ` <1413306680-27330-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  2014-10-14 17:11   ` [pinmux scripts PATCH 2/4] Board CSV import: Put full CSV filename in data structure Stephen Warren
@ 2014-10-14 17:11   ` Stephen Warren
  2014-10-14 17:11   ` [pinmux scripts PATCH 4/4] Board CSV Import: Allow board configuration overrides on cmdline Stephen Warren
  2 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2014-10-14 17:11 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

The public Jetson TK1 pinmux spreadsheet will use 1-based RSVD numbers
whereas the other internal board spreadsheets aren't (currently?)
updated, and hence will continue to use 0-based RSVD numbering. Support
either numbering scheme in the import script.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 csv-to-board-tegra124-xlsx.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/csv-to-board-tegra124-xlsx.py b/csv-to-board-tegra124-xlsx.py
index d5a8f2f3f645..a4d414c3e991 100755
--- a/csv-to-board-tegra124-xlsx.py
+++ b/csv-to-board-tegra124-xlsx.py
@@ -47,6 +47,7 @@ supported_boards = {
         # T124_customer_pinmux.xlsm worksheet Jetson TK1 Configuration
         # Jetson_TK1_customer_pinmux_release.xlsm worksheet Jetson TK1 Configuration
         'filename': 'csv/jetson-tk1.csv', # worksheet PM375Beaver_Configuration
+        'rsvd_0based': False,
     },
     'norrin': {
         # PM370_T124_customer_pinmux_1.1.xlsm worksheet Customer_Configuration
@@ -62,6 +63,9 @@ if not args.board in supported_boards:
     print('ERROR: Unsupported board %s' % args.board, file=sys.stderr)
     sys.exit(1)
 board_conf = supported_boards[args.board]
+if not 'rsvd_0based' in board_conf:
+    # FIXME: This should default to False for some future chip
+    board_conf['rsvd_0based'] = True
 
 soc = tegra_pmx_soc_parser.load_soc('tegra124')
 
@@ -108,7 +112,9 @@ def func_munge(f):
         return 'sdmmc2'
     if f in ('ir3_rxd', 'ir3_txd'):
         return 'irda'
-    return rsvd_0base_to_1base(f)
+    if board_conf['rsvd_0based']:
+        return rsvd_0base_to_1base(f)
+    return f
 
 def pupd_munge(d):
     return {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [pinmux scripts PATCH 4/4] Board CSV Import: Allow board configuration overrides on cmdline
       [not found] ` <1413306680-27330-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  2014-10-14 17:11   ` [pinmux scripts PATCH 2/4] Board CSV import: Put full CSV filename in data structure Stephen Warren
  2014-10-14 17:11   ` [pinmux scripts PATCH 3/4] Board CSV import: Support either 0- or 1-based RSVD numbers Stephen Warren
@ 2014-10-14 17:11   ` Stephen Warren
  2 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2014-10-14 17:11 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Add --csv FILENAME, --rsvd-0based, and --rsvd-1based command-line options
to the board CSV import script. This is especially useful for Jetson TK1,
since different spreadsheets use 0- and 1-based RSVD numbering, so the user
may require an option to easily specify which to use.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 csv-to-board-tegra124-xlsx.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/csv-to-board-tegra124-xlsx.py b/csv-to-board-tegra124-xlsx.py
index a4d414c3e991..eb381656e40d 100755
--- a/csv-to-board-tegra124-xlsx.py
+++ b/csv-to-board-tegra124-xlsx.py
@@ -35,6 +35,9 @@ dbg = False
 parser = argparse.ArgumentParser(description='Create a board config' +
     'from a CSV version of the Venice2 pinmux spreadsheet')
 parser.add_argument('--debug', action='store_true', help='Turn on debugging prints')
+parser.add_argument('--csv', default=argparse.SUPPRESS, help='CSV file to parse')
+parser.add_argument('--rsvd-0based', action='store_true', dest='rsvd_0based', default=argparse.SUPPRESS, help='Assume 0-based RSVD numbering')
+parser.add_argument('--rsvd-1based', action='store_false', dest='rsvd_0based', default=argparse.SUPPRESS, help='Assume 1-based RSVD numbering')
 parser.add_argument('board', help='Board name')
 args = parser.parse_args()
 if args.debug:
@@ -66,6 +69,11 @@ board_conf = supported_boards[args.board]
 if not 'rsvd_0based' in board_conf:
     # FIXME: This should default to False for some future chip
     board_conf['rsvd_0based'] = True
+if 'csv' in args:
+    board_conf['filename'] = args.csv
+if 'rsvd_0based' in args:
+    board_conf['rsvd_0based'] = args.rsvd_0based
+if dbg: print(board_conf)
 
 soc = tegra_pmx_soc_parser.load_soc('tegra124')
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [pinmux scripts PATCH 2/4] Board CSV import: Put full CSV filename in data structure
       [not found]     ` <1413306680-27330-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2014-10-15 19:20       ` Stephen Warren
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2014-10-15 19:20 UTC (permalink / raw)
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

On 10/14/2014 11:11 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> 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.

I have applied this series.

>   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
> +        # T124_customer_pinmux.xlsm worksheet Jetson TK1 Configuration
> +        # Jetson_TK1_customer_pinmux_release.xlsm worksheet Jetson TK1 Configuration
> +        'filename': 'csv/jetson-tk1.csv', # worksheet PM375Beaver_Configuration

I removed that stale comment on the filename: line, and added a note at 
the end of all the comments in this data structure re: which files use 
0- vs. 1-based rsvd numbering.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-15 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 17:11 [pinmux scripts PATCH 1/4] Board CSV import: Support all Tegra124 OD pins Stephen Warren
     [not found] ` <1413306680-27330-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-10-14 17:11   ` [pinmux scripts PATCH 2/4] Board CSV import: Put full CSV filename in data structure Stephen Warren
     [not found]     ` <1413306680-27330-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-10-15 19:20       ` Stephen Warren
2014-10-14 17:11   ` [pinmux scripts PATCH 3/4] Board CSV import: Support either 0- or 1-based RSVD numbers Stephen Warren
2014-10-14 17:11   ` [pinmux scripts PATCH 4/4] Board CSV Import: Allow board configuration overrides on cmdline Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).