Skip to content

Commit

Permalink
[top/earlgrey] Software Initialization Code
Browse files Browse the repository at this point in the history
Adding `pinmux_init()` to bootrom code and hello_world code. This init
code configures PINMUX to the same as previous build mapping GPIO0..31
to internal gpio ports.
  • Loading branch information
Eunchan Kim committed Oct 31, 2019
1 parent 769065e commit dba13de
Show file tree
Hide file tree
Showing 16 changed files with 3,616 additions and 4,079 deletions.
1 change: 1 addition & 0 deletions hw/ip/pinmux/data/pinmux.hjson.tpl
Expand Up @@ -44,6 +44,7 @@
fields: [
{
bits: "0",
name: "wen",
desc: ''' When true, all configuration registers can be modified.
When false, they become read-only. Defaults true, write zero to clear.
'''
Expand Down
5 changes: 4 additions & 1 deletion hw/top_earlgrey/doc/top_earlgrey.h.tpl
Expand Up @@ -5,6 +5,9 @@
#ifndef _TOP_EARLGREY_H_
#define _TOP_EARLGREY_H_

#define PINMUX_PERIPH_INSEL_IDX_OFFSET 2
#define PINMUX_PERIPH_OUTSEL_IDX_OFFSET 2

// PERIPH_INSEL ranges from 0 to NUM_MIO + 2 -1}
// 0 and 1 are tied to value 0 and 1
#define NUM_MIO ${top["pinmux"]["num_mio"]}
Expand Down Expand Up @@ -38,4 +41,4 @@
% endif
% endfor

#endif // _TOP_EARLGREY_H_
#endif // _TOP_EARLGREY_H_

0 comments on commit dba13de

Please sign in to comment.