diff options
author | Stephen Warren <swarren@nvidia.com> | 2015-03-24 16:36:18 -0600 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2015-03-25 12:02:51 -0600 |
commit | 39af52fc08dfa0a065add47cdc15d50e1f1ed5cc (patch) | |
tree | ee30a0f9a99100e5bb3cbe1510760e048bdb3252 /board-to-uboot.py | |
parent | 4f47990bce794c231cfa9fb123953e496f646855 (diff) | |
download | tegra-pinmux-scripts-39af52fc08dfa0a065add47cdc15d50e1f1ed5cc.tar.gz |
Support for MIPI pad ctrl groups in *.board
Update csv-to-board.py to extract, and board-to-*.py to emit,
configuration for MIPI pad ctrl groups.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'board-to-uboot.py')
-rwxr-xr-x | board-to-uboot.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/board-to-uboot.py b/board-to-uboot.py index 8c5f11f..7b20f23 100755 --- a/board-to-uboot.py +++ b/board-to-uboot.py @@ -205,6 +205,35 @@ static const struct pmux_drvgrp_config %s_drvgrps[] = { print('''\ }; +''', end='') + +if len(board.mipipadctrlcfgs_by_num()): + print('''\ +#define MIPIPADCTRLCFG(_grp, _mux) \\ + { \\ + .grp = PMUX_MIPIPADCTRLGRP_##_grp, \\ + .func = PMUX_FUNC_##_mux, \\ + } + +static const struct pmux_mipipadctrlgrp_config %s_mipipadctrlgrps[] = { +''' % board.varname, end='') + + mipipadctrl_table = [] + for cfg in board.mipipadctrlcfgs_by_num(): + row = ( + cfg.name.upper(), + mapper_mux(cfg.mux), + ) + mipipadctrl_table.append(row) + headings = ('grp', 'mux') + dump_c_table(headings, 'MIPIPADCTRLCFG', mipipadctrl_table) + + print('''\ +}; + +''', end='') + +print('''\ #endif /* PINMUX_CONFIG_%s_H */ ''' % board.definename, end='') |