diff mbox series

[v2,2/2] mips: dts: Fix PIC32MZDA GPIO register definitions

Message ID DB6P190MB01346ACABEF94F3DA70E2525FB2E0@DB6P190MB0134.EURP190.PROD.OUTLOOK.COM
State Accepted
Commit bd25f9a69fa5accde66cf914154bdd64604d8f64
Delegated to: Daniel Schwierzeck
Headers show
Series [v2,1/2] mips: dts: Fix PIC32MZDA GPIO register definitions | expand

Commit Message

John Robertson Sept. 1, 2020, 6:02 p.m. UTC
The GPIO bank name for banks J and K are not correct when using the
'gpio' command from the console.

The driver derives the bank name from the device tree instance string by
using the instance value and adding 'A': gpio0@xxaddrxx is Bank A,
gpio1@yyaddryy is Bank B and so on.

On the PIC32, there is no Bank I so instances 8 and 9 need to be
incremented as a minimum change.

An alternative (less opaque) implementation would be to use a bank-name
property instead but this would require modifying the driver code too.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
---

 arch/mips/dts/pic32mzda.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Schwierzeck Sept. 19, 2020, 7:34 p.m. UTC | #1
Am Dienstag, den 01.09.2020, 18:02 +0000 schrieb John Robertson:
> The GPIO bank name for banks J and K are not correct when using the
> 'gpio' command from the console.
> 
> The driver derives the bank name from the device tree instance string by
> using the instance value and adding 'A': gpio0@xxaddrxx is Bank A,
> gpio1@yyaddryy is Bank B and so on.
> 
> On the PIC32, there is no Bank I so instances 8 and 9 need to be
> incremented as a minimum change.
> 
> An alternative (less opaque) implementation would be to use a bank-name
> property instead but this would require modifying the driver code too.
> 
> Signed-off-by: John Robertson <john.robertson@simiatec.com>
> ---
> 
>  arch/mips/dts/pic32mzda.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

applied to u-boot-mips/fixes, thanks.
diff mbox series

Patch

diff --git a/arch/mips/dts/pic32mzda.dtsi b/arch/mips/dts/pic32mzda.dtsi
index 8f9b4cc50e..2c2b7293d8 100644
--- a/arch/mips/dts/pic32mzda.dtsi
+++ b/arch/mips/dts/pic32mzda.dtsi
@@ -134,14 +134,14 @@ 
 			#gpio-cells = <2>;
 		};
 
-		gpioJ: gpio8@1f860800 {
+		gpioJ: gpio9@1f860800 {
 			compatible = "microchip,pic32mzda-gpio";
 			reg = <0x1f860800 0xe0>;
 			gpio-controller;
 			#gpio-cells = <2>;
 		};
 
-		gpioK: gpio9@1f860900 {
+		gpioK: gpio10@1f860900 {
 			compatible = "microchip,pic32mzda-gpio";
 			reg = <0x1f860900 0xe0>;
 			gpio-controller;