From: Daniel Schwierzeck Date: Sat, 19 Sep 2020 21:34:01 +0200 Subject: [PATCH v2 1/2] mips: dts: Fix PIC32MZDA GPIO register definitions In-Reply-To: References: Message-ID: <3115689be611a942531e76e1b21101aea939136d.camel@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Dienstag, den 01.09.2020, 18:02 +0000 schrieb John Robertson: > GPIO state cannot be changed via the device tree (e.g. with gpio-hog) or > using the 'gpio' command from the console. > > The root cause is a discrepancy between the driver and the device tree: > the driver code expects an absolute I/O address in the property, > while the device tree defines the address relative to a declaration in > the parent pinctrl node. > > Changing the device tree to fix a driver issue would normally be wrong, > however: > - I have run the first version of U-Boot in which this driver appears > (v2016.03) and the same problem exists, so this is not a regression; > - There is no code that references a parent device tree node that might > suggest the intent of the author was to parse the DT as it exists now; > - The equivalent Linux PIC32 GPIO driver also uses absolute addresses > for the GPIO property. This change brings the U-Boot DT more > into line with Linux. > > Additionally, the data sheet (Microchip ref. 60001361H) shows that the > register set to control a GPIO bank spans 0xE0 bytes, but the device > tree specified size is only 0x48 bytes. > > Signed-off-by: John Robertson > --- > Changes in v2 > - Split patch > - Document change more fully > > arch/mips/dts/pic32mzda.dtsi | 45 ++++++++++++++++++------------------ > 1 file changed, 22 insertions(+), 23 deletions(-) > applied to u-boot-mips/fixes, thanks. -- - Daniel