From: Linus Walleij <linusw@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Stafford Horne <shorne@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux OpenRISC <linux-openrisc@vger.kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/5] dt-bindings: Add compatible string opencores,gpio to gpio-mmio
Date: Fri, 9 Jan 2026 11:07:17 +0100 [thread overview]
Message-ID: <CAD++jLm1u9ChqsftwvbOptiG3Qo2KWxPjqN2snOVuZDYuVST5Q@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXYCNR0ANn152ghFExpWY_yZ5+kyFGGRwA+X-EFUvxZXw@mail.gmail.com>
On Thu, Jan 8, 2026 at 9:41 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > What is the rationale behind using brcm,bcm6345-gpio?
> > > Given brcm,bcm6345-gpio has 32-bit registers, while opencores,gpio
> > > has 8-bit registers, I doubt the latter is compatible with the former...
Yeah this needs to be fixed/reverted pronto :/
> > I switch the size from 32-bit to 8-bit using the reg = <* 0x1>, <* 0x1> setting.
> > Also the reg addresses of "dat" and "dirout" are different for the real
> > brcm,bcm6345-gpio.
> >
> > brcm,bcm6345-gpio. Example:
> >
> > /* GPIOs 192 .. 223 */
> > gpio6: gpio@518 {
> > compatible = "brcm,bcm6345-gpio";
> > reg = <0x518 0x04>, <0x538 0x04>;
> > reg-names = "dirout", "dat";
> > gpio-controller;
> > #gpio-cells = <2>;
> > };
> >
> > vs opencores,gpio Example:
> >
> > gpio0: gpio@91000000 {
> > compatible = "opencores,gpio", "brcm,bcm6345-gpio";
> > reg = <0x91000000 0x1>, <0x91000001 0x1>;
> > reg-names = "dat", "dirout";
> > gpio-controller;
> > #gpio-cells = <2>;
> > };
>
> Exactly, the register space and register widths are different
...as proved here.
Stafford can you send a fixup or revert patch?
(Only need to revert if you can't make a fix quick enough, which I
think you can.)
> > The opencores,gpio setup does work.
> >
> > Now that I think about it, would it have been better to just add opencores,gpio
> > to gpio-mmio.c compatible list?
>
> I think that would be better.
Yes this is better.
I should have seen this, I guess I was sloppy :(
> > If so I will can revise this patch and add patch to gpio-mmio.c.
>
> DT maintainers: Given gpio-mmio is that generic/simple, is there a
> specific reason there is no generic "gpio-mmio" compatible value that
> can be used as a fallback, avoiding the need to keep on adding new
> entries to gpio_mmio_of_match[]?
I think "gpio-mmio" combined with compulsory property of
bus-width = <nn> (as used by multiple bindings) would be
generic enough. So a schema that accepts "gpio-mmio" if and
only if bus-width = 8|16|32|64 would be acceptable.
Yours,
Linus Walleij
next prev parent reply other threads:[~2026-01-09 10:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 8:08 [PATCH v2 0/5] OpenRISC de0 nano single and multicore boards Stafford Horne
2025-12-17 8:08 ` [PATCH v2 1/5] dt-bindings: Add compatible string opencores,gpio to gpio-mmio Stafford Horne
2025-12-18 0:55 ` Conor Dooley
2026-01-03 5:55 ` Stafford Horne
2026-01-07 14:17 ` Linus Walleij
2026-01-07 14:35 ` Geert Uytterhoeven
2026-01-08 8:20 ` Stafford Horne
2026-01-08 8:41 ` Geert Uytterhoeven
2026-01-09 10:07 ` Linus Walleij [this message]
2026-01-09 10:19 ` Geert Uytterhoeven
2026-01-09 12:51 ` Stafford Horne
2026-01-12 9:25 ` Bartosz Golaszewski
2026-01-13 16:17 ` Stafford Horne
2025-12-17 8:08 ` [PATCH v2 2/5] openrisc: dts: Add de0 nano config and devicetree Stafford Horne
2025-12-18 18:36 ` Geert Uytterhoeven
2026-01-03 6:16 ` Stafford Horne
2026-01-05 11:02 ` Geert Uytterhoeven
2026-01-06 9:54 ` Stafford Horne
2026-01-06 10:18 ` Geert Uytterhoeven
2026-01-08 7:50 ` Stafford Horne
2025-12-17 8:08 ` [PATCH v2 3/5] openrisc: Fix IPIs on simple multicore systems Stafford Horne
2025-12-17 8:08 ` [PATCH v2 4/5] openrisc: dts: Split simple smp dts to dts and dtsi Stafford Horne
2025-12-18 18:37 ` Geert Uytterhoeven
2026-01-03 6:13 ` Stafford Horne
2025-12-17 8:08 ` [PATCH v2 5/5] openrisc: dts: Add de0 nano multicore config and devicetree Stafford Horne
2025-12-18 13:46 ` (subset) [PATCH v2 0/5] OpenRISC de0 nano single and multicore boards Bartosz Golaszewski
2026-01-11 16:39 ` Stafford Horne
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=CAD++jLm1u9ChqsftwvbOptiG3Qo2KWxPjqN2snOVuZDYuVST5Q@mail.gmail.com \
--to=linusw@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-openrisc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=shorne@gmail.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
all inboxes | Powered by JetHome®