Skip to content

Commit df59a33

Browse files
committed
[ot] hw/opentitan: Add GPIO device
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Emmanuel Blot <[email protected]>
1 parent 563e08a commit df59a33

File tree

6 files changed

+437
-0
lines changed

6 files changed

+437
-0
lines changed

docs/opentitan/gpio.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# OT GPIO
2+
3+
## Initial configuration
4+
5+
It is possible to configure initial values of the GPIO input pins:
6+
7+
OpenTitan GPIO driver accept a global option:
8+
9+
- `ot-gpio.in` that defines the input values of the GPIO port as a 32-bit value
10+
11+
### Example
12+
13+
```
14+
-global ot-gpio.in=0x00ffff00
15+
```

hw/opentitan/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ config OT_ENTROPY_SRC
3131
config OT_FLASH
3232
bool
3333

34+
config OT_GPIO
35+
bool
36+
3437
config OT_HMAC
3538
bool
3639

hw/opentitan/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ softmmu_ss.add(when: 'CONFIG_OT_CSRNG', if_true: [files('ot_csrng.c'), libtomcry
1414
softmmu_ss.add(when: 'CONFIG_OT_EDN', if_true: files('ot_edn.c'))
1515
softmmu_ss.add(when: 'CONFIG_OT_ENTROPY_SRC', if_true: [files('ot_entropy_src.c'), libtomcrypt_dep])
1616
softmmu_ss.add(when: 'CONFIG_OT_FLASH', if_true: files('ot_flash.c'))
17+
softmmu_ss.add(when: 'CONFIG_OT_GPIO', if_true: files('ot_gpio.c'))
1718
softmmu_ss.add(when: 'CONFIG_OT_HMAC', if_true: [files('ot_hmac.c'), libtomcrypt_dep])
1819
softmmu_ss.add(when: 'CONFIG_OT_IBEX_WRAPPER', if_true: files('ot_ibex_wrapper.c'))
1920
softmmu_ss.add(when: 'CONFIG_OT_KMAC', if_true: [files('ot_kmac.c'), libtomcrypt_dep])

0 commit comments

Comments
 (0)