gpio: sifive: Add device tree support for GPIO generation
Add the missing bits to the yaml, dts, and Kconfig to enable GPIO pin generation based on device tree. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
c922788d0a
commit
da7ac50683
3 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
menuconfig GPIO_SIFIVE
|
||||
bool "SiFive Freedom Processor GPIO driver"
|
||||
depends on GPIO && SOC_RISCV32_SIFIVE_FREEDOM
|
||||
select HAS_DTS_GPIO
|
||||
help
|
||||
Enable driver for the SiFive Freedom GPIO controller.
|
||||
|
||||
|
|
|
@ -30,4 +30,9 @@ properties:
|
|||
generation: define
|
||||
category: required
|
||||
|
||||
cell_string: GPIO
|
||||
|
||||
"#cells":
|
||||
- pin
|
||||
- flags
|
||||
...
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -64,12 +66,14 @@
|
|||
};
|
||||
gpio0: gpio@10012000 {
|
||||
compatible = "sifive,gpio0";
|
||||
gpio-controller;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
||||
26 27 28 29 30 31 32 33 34 35 36 37 38 39>;
|
||||
reg = <0x10012000 0x1000>;
|
||||
reg-names = "control";
|
||||
status = "disabled";
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
i2c0: i2c@10016000 {
|
||||
compatible = "sifive,i2c0";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue