2021-08-13 01:33:15 +00:00
|
|
|
// Copyright lowRISC contributors.
|
|
|
|
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
{ name: "gpio",
|
|
|
|
clocking: [{clock: "clk_i", reset: "rst_ni"}],
|
|
|
|
bus_interfaces: [
|
|
|
|
{ protocol: "tlul", direction: "device" }
|
|
|
|
],
|
|
|
|
regwidth: "32",
|
|
|
|
registers: [
|
2021-09-10 01:51:08 +00:00
|
|
|
{ name: "IO_MODE",
|
|
|
|
desc: "gpio input/output mode register",
|
2021-08-13 01:33:15 +00:00
|
|
|
swaccess: "rw",
|
|
|
|
hwaccess: "hro",
|
|
|
|
fields: [
|
2021-09-10 01:51:08 +00:00
|
|
|
{ bits: "31:0",
|
2021-08-13 01:33:15 +00:00
|
|
|
desc: "gpio input or output mode, 2 bits for each gpio",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2021-09-10 01:51:08 +00:00
|
|
|
{ name: "INT_MODE",
|
|
|
|
desc: "gpio interrupt mode register",
|
2021-08-13 01:33:15 +00:00
|
|
|
swaccess: "rw",
|
2021-09-10 01:51:08 +00:00
|
|
|
hwaccess: "hro",
|
2021-08-13 01:33:15 +00:00
|
|
|
fields: [
|
2021-09-10 01:51:08 +00:00
|
|
|
{ bits: "31:0",
|
2021-08-13 01:33:15 +00:00
|
|
|
desc: "gpio interrupt mode, 2 bits for each gpio",
|
|
|
|
}
|
2021-09-10 01:51:08 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
{ name: "INT_PENDING",
|
|
|
|
desc: "gpio interrupt pending register",
|
|
|
|
swaccess: "rw",
|
|
|
|
hwaccess: "hrw",
|
|
|
|
fields: [
|
|
|
|
{ bits: "15:0",
|
|
|
|
name: "GPIO_INT_PENDING",
|
2021-08-13 01:33:15 +00:00
|
|
|
swaccess: "rw1c",
|
|
|
|
desc: "gpio interrupt pending, 1 bits for each gpio",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{ name: "DATA",
|
|
|
|
desc: "gpio data register",
|
|
|
|
swaccess: "rw",
|
|
|
|
hwaccess: "hrw",
|
|
|
|
fields: [
|
2021-09-10 01:51:08 +00:00
|
|
|
{ bits: "15:0",
|
2021-08-13 01:33:15 +00:00
|
|
|
desc: "gpio input or output data, 1 bits for each gpio",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{ name: "FILTER",
|
|
|
|
desc: "gpio input filter enable register",
|
|
|
|
swaccess: "rw",
|
|
|
|
hwaccess: "hro",
|
|
|
|
fields: [
|
2021-09-10 01:51:08 +00:00
|
|
|
{ bits: "15:0",
|
2021-08-13 01:33:15 +00:00
|
|
|
desc: "gpio input filter enable, 1 bits for each gpio",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|