Re: [PATCH v6 1/6] dt-bindings: gpio-mmio: Correct opencores GPIO

"Gary Lau" <[email protected]>
Newsgroups org.kernel.vger.linux-openrisc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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.

Best regards,
Gary
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.