public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Gary Lau <zgliu@foxmail.com>
Cc: linusw <linusw@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-openrisc <linux-openrisc@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>, robh <robh@kernel.org>,
	krzk+dt <krzk+dt@kernel.org>, conor+dt <conor+dt@kernel.org>,
	geert+renesas <geert+renesas@glider.be>,
	"krzysztof.kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>,
	brgl <brgl@kernel.org>, linux-gpio <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v6 1/6] dt-bindings: gpio-mmio: Correct opencores GPIO
Date: Sat, 24 Jan 2026 12:36:42 +0000	[thread overview]
Message-ID: <aXS82qiNNvPVMqdV@antec> (raw)
In-Reply-To: <tencent_F07E7380CFFB3A6A7480FDA42A636B7D290A@qq.com>

On Fri, Jan 23, 2026 at 10:18:04PM +0800, Gary Lau wrote:
> Hi Stafford,
> 
> I should clarify my setup: I'm using hardware address translation to make the
> OpenCores 8-bit GPIO appear as 32-bit to the CPU. Specifically:
> 
> 1. Address translation: The CPU's 32-bit addresses are right-shifted by 2 bits
>    (adr_i[2] in Verilog), so each 32-bit CPU access maps to the correct 8-bit
>    OpenCores register.
> 
> 2. Data width adaptation: Only dat_i[7:0] and dat_o[7:0] are connected, so
>    32-bit writes are truncated to 8-bit, and reads are zero-extended.
> 
> This hardware wrapper makes brcm,bcm6345-gpio driver "work" with my OpenCores
> GPIO, but it's really a hardware-level compatibility layer, not true software
> compatibility.
> 
> So you're absolutely right that the native opencores,gpio isn't compatible
> with brcm,bcm6345-gpio. My setup works because of custom hardware translation,
> not because the IP cores are compatible.

Thanks Gary for testing.

-Stafford

  reply	other threads:[~2026-01-24 12:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 14:18 [PATCH v6 1/6] dt-bindings: gpio-mmio: Correct opencores GPIO Gary Lau
2026-01-24 12:36 ` Stafford Horne [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-01-23 14:08 Gary Lau
2026-01-15 15:09 [PATCH v6 0/6] OpenRISC de0 nano single and multicore boards Stafford Horne
2026-01-15 15:09 ` [PATCH v6 1/6] dt-bindings: gpio-mmio: Correct opencores GPIO Stafford Horne
2026-01-18 23:19   ` Linus Walleij

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=aXS82qiNNvPVMqdV@antec \
    --to=shorne@gmail.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linusw@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=zgliu@foxmail.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