Message ID | 1574233128-28114-6-git-send-email-yash.shah@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | GPIO & Hierarchy IRQ support for HiFive Unleashed | expand |
On Nov 20 2019, Yash Shah wrote: > diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > index 88cfcb9..609198c 100644 > --- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > +++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > @@ -94,3 +94,7 @@ > &pwm1 { > status = "okay"; > }; > + > +&gpio { > + status = "okay"; > +}; How about adding a gpio-restart? Andreas.
> -----Original Message----- > From: Andreas Schwab <schwab@suse.de> > Sent: 20 November 2019 14:44 > To: Yash Shah <yash.shah@sifive.com> > Cc: linus.walleij@linaro.org; bgolaszewski@baylibre.com; > robh+dt@kernel.org; mark.rutland@arm.com; palmer@dabbelt.com; Paul > Walmsley ( Sifive) <paul.walmsley@sifive.com>; > devicetree@vger.kernel.org; aou@eecs.berkeley.edu; > jason@lakedaemon.net; linux-gpio@vger.kernel.org; maz@kernel.org; linux- > kernel@vger.kernel.org; atish.patra@wdc.com; Sagar Kadam > <sagar.kadam@sifive.com>; tglx@linutronix.de; bmeng.cn@gmail.com; > linux-riscv@lists.infradead.org; Sachin Ghadi <sachin.ghadi@sifive.com> > Subject: Re: [PATCH v2 5/5] riscv: dts: Add DT support for SiFive FU540 GPIO > driver > > On Nov 20 2019, Yash Shah wrote: > > > diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > > b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > > index 88cfcb9..609198c 100644 > > --- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > > +++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > > @@ -94,3 +94,7 @@ > > &pwm1 { > > status = "okay"; > > }; > > + > > +&gpio { > > + status = "okay"; > > +}; > > How about adding a gpio-restart? I am planning to add it in a separate patch. - Yash
diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index afa43c7..2d7c284 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -246,6 +246,18 @@ #pwm-cells = <3>; status = "disabled"; }; - + gpio: gpio@10060000 { + compatible = "sifive,fu540-c000-gpio", "sifive,gpio0"; + interrupt-parent = <&plic0>; + interrupts = <7 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22>; + reg = <0x0 0x10060000 0x0 0x1000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + clocks = <&prci PRCI_CLK_TLCLK>; + status = "disabled"; + }; }; }; diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts index 88cfcb9..609198c 100644 --- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts +++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts @@ -94,3 +94,7 @@ &pwm1 { status = "okay"; }; + +&gpio { + status = "okay"; +};
Add the gpio DT node in SiFive FU540 soc-specific DT file. Enable the gpio node in HiFive Unleashed board-specific DT file. Signed-off-by: Yash Shah <yash.shah@sifive.com> --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 14 +++++++++++++- arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-)