From: Yixun Lan <dlan@gentoo.org>
To: Conor Dooley <conor@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Yangyu Chen <cyy@cyyself.name>,
Jisheng Zhang <jszhang@kernel.org>,
Jesse Taube <mr.bossman075@gmail.com>,
Inochi Amaoto <inochiama@outlook.com>,
Icenowy Zheng <uwu@icenowy.me>,
Meng Zhang <zhangmeng.kevin@spacemit.com>,
Meng Zhang <kevin.z.m@hotmail.com>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v2 1/3] dt-bindings: gpio: spacemit: add support for K1 SoC
Date: Fri, 20 Dec 2024 06:18:57 +0800 [thread overview]
Message-ID: <20241219221857-GYA3769757@gentoo> (raw)
In-Reply-To: <20241219-secret-passenger-350d9c54fdf9@spud>
Hi Conor:
thanks for your review
On 19:52 Thu 19 Dec , Conor Dooley wrote:
> On Thu, Dec 19, 2024 at 03:17:43PM +0800, Yixun Lan wrote:
> > The GPIO controller of K1 support basic functions as input/output,
> > all pins can be used as interrupt which route to one IRQ line,
> > trigger type can be select between rising edge, failing edge, or both.
> > There are four GPIO banks, each consisting of 32 pins.
> >
> > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > ---
> > .../devicetree/bindings/gpio/spacemit,k1-gpio.yaml | 75 ++++++++++++++++++++++
> > 1 file changed, 75 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/spacemit,k1-gpio.yaml b/Documentation/devicetree/bindings/gpio/spacemit,k1-gpio.yaml
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..3d3d0b3bf2c144ed57b717bee50064949e26f087
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/spacemit,k1-gpio.yaml
> > @@ -0,0 +1,75 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/gpio/spacemit,k1-gpio.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: SpacemiT K1 GPIO controller
> > +
> > +maintainers:
> > + - Yixun Lan <dlan@gentoo.org>
> > +
> > +description:
> > + The controller's registers are organized as sets of eight 32-bit
> > + registers with each set controlling a bank of up to 32 pins. A single
> > + interrupt is shared for all of the banks handled by the controller.
> > +
> > +properties:
> > + compatible:
> > + const: spacemit,k1-gpio
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + ranges: true
>
> What do you need this for?
>
right, this isn't needed, will drop it.
> > +
> > + "#gpio-cells":
> > + const: 2
> > +
> > + gpio-controller: true
> > +
> > + gpio-ranges: true
> > +
> > + interrupts:
> > + maxItems: 1
> > + description:
> > + The interrupt shared by all GPIO lines for this controller.
> > +
> > + interrupt-names: true
>
> Not that a name is valuable when you only have one interrupt, but if you
> don't specify what the name is, you cannot interrupt-names!
>
indeed there is one interrupt, I will drop this property
> Cheers,
> Conor.
>
> > +
> > + "#interrupt-cells":
> > + const: 2
> > + description:
> > + The first cell is the GPIO number, the second should specify interrupt
> > + flag. The controller does not support level interrupts, flags of
> > + IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW should not be used.
> > + Refer <dt-bindings/interrupt-controller/irq.h> for valid flags.
> > +
> > + interrupt-controller: true
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - gpio-controller
> > + - "#gpio-cells"
> > + - interrupts
> > + - interrupt-names
> > + - interrupt-controller
> > + - "#interrupt-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + gpio@d4019000 {
> > + compatible = "spacemit,k1-gpio";
> > + reg = <0xd4019000 0x800>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + interrupts = <58>;
> > + interrupt-names = "gpio_mux";
> > + interrupt-parent = <&plic>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 0 128>;
> > + };
> >
> > --
> > 2.47.0
> >
--
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55
next prev parent reply other threads:[~2024-12-19 22:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 7:17 [PATCH v2 0/3] riscv: spacemit: add gpio support for K1 SoC Yixun Lan
2024-12-19 7:17 ` [PATCH v2 1/3] dt-bindings: gpio: spacemit: add " Yixun Lan
2024-12-19 19:52 ` Conor Dooley
2024-12-19 22:18 ` Yixun Lan [this message]
2024-12-19 7:17 ` [PATCH v2 2/3] " Yixun Lan
2024-12-19 7:17 ` [PATCH v2 3/3] riscv: dts: spacemit: add gpio " Yixun Lan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241219221857-GYA3769757@gentoo \
--to=dlan@gentoo.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=cyy@cyyself.name \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=kevin.z.m@hotmail.com \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mr.bossman075@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=uwu@icenowy.me \
--cc=zhangmeng.kevin@spacemit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox