diff mbox

ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet

Message ID 1509198178-31373-1-git-send-email-aford173@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adam Ford Oct. 28, 2017, 1:42 p.m. UTC
Fixes: 44e4716499b8 ("ARM: dts: omap3: Fix NAND device nodes")

This patch fixes and issue where the NAND and GPMC based ethernet
controller stopped working.  This also updates the GPMC settings
to be consistent with the Logic PD Torpedo development from the
commit listed above.

Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Roger Quadros Oct. 30, 2017, 8:04 a.m. UTC | #1
Hi Adam,

On 28/10/17 16:42, Adam Ford wrote:
> Fixes: 44e4716499b8 ("ARM: dts: omap3: Fix NAND device nodes")
> 
> This patch fixes and issue where the NAND and GPMC based ethernet
> controller stopped working.  This also updates the GPMC settings
> to be consistent with the Logic PD Torpedo development from the
> commit listed above.

I don't see the updated GPMC settings in this patch.

> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> index 38faa90..2fa5eb4 100644
> --- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> +++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> @@ -72,7 +72,8 @@
>  };
>  
>  &gpmc {
> -	ranges = <1 0 0x08000000 0x1000000>;	/* CS1: 16MB for LAN9221 */
> +	ranges = <0 0 0x30000000 0x1000000	/* CS0: 16MB for NAND */

NAND does not need 16MB space. It just needs 4 bytes of I/O space.

> +		  1 0 0x2c000000 0x1000000>;	/* CS1: 16MB for LAN9221 */
>  
>  	ethernet@gpmc {
>  		pinctrl-names = "default";
> diff --git a/arch/arm/boot/dts/logicpd-som-lv.dtsi b/arch/arm/boot/dts/logicpd-som-lv.dtsi
> index 90ae76b..b1e34e9 100644
> --- a/arch/arm/boot/dts/logicpd-som-lv.dtsi
> +++ b/arch/arm/boot/dts/logicpd-som-lv.dtsi
> @@ -37,7 +37,7 @@
>  };
>  
>  &gpmc {
> -	ranges = <0 0 0x00000000 0x1000000>;	/* CS0: 16MB for NAND */
> +	ranges = <0 0 0x30000000 0x1000000>;	/* CS0: 16MB for NAND */

here too.

>  
>  	nand@0,0 {
>  		compatible = "ti,omap2-nand";
>
Tony Lindgren Oct. 30, 2017, 1:46 p.m. UTC | #2
* Roger Quadros <rogerq@ti.com> [171030 08:06]:
> On 28/10/17 16:42, Adam Ford wrote:
> > --- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> > +++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> > @@ -72,7 +72,8 @@
> >  };
> >  
> >  &gpmc {
> > -	ranges = <1 0 0x08000000 0x1000000>;	/* CS1: 16MB for LAN9221 */
> > +	ranges = <0 0 0x30000000 0x1000000	/* CS0: 16MB for NAND */
> 
> NAND does not need 16MB space. It just needs 4 bytes of I/O space.

Don't we have a minimum 16MB range needed for gpmc, then the
device register can be just 4 bytes?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Adam Ford Oct. 30, 2017, 2:12 p.m. UTC | #3
On Mon, Oct 30, 2017 at 8:46 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Roger Quadros <rogerq@ti.com> [171030 08:06]:
>> On 28/10/17 16:42, Adam Ford wrote:
>> > --- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
>> > +++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
>> > @@ -72,7 +72,8 @@
>> >  };
>> >
>> >  &gpmc {
>> > -   ranges = <1 0 0x08000000 0x1000000>;    /* CS1: 16MB for LAN9221 */
>> > +   ranges = <0 0 0x30000000 0x1000000      /* CS0: 16MB for NAND */
>>
>> NAND does not need 16MB space. It just needs 4 bytes of I/O space.
>
> Don't we have a minimum 16MB range needed for gpmc, then the
> device register can be just 4 bytes?
>

Looking at the Torepdo (from which I based this patch), it lists:

ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */

nand@0,0 {
compatible = "ti,omap2-nand";
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */

Roger did that patch as part of 44e4716499b8 ("ARM: dts: omap3: Fix
NAND device nodes")

and I am just trying to apply it to this other board.

Let me know what it should be, and I can fix (and/or test) it.  It's a
512MB NAND part for whatever that's worth.

adam

> Regards,
>
> Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roger Quadros Oct. 31, 2017, 8:43 a.m. UTC | #4
On 30/10/17 16:12, Adam Ford wrote:
> On Mon, Oct 30, 2017 at 8:46 AM, Tony Lindgren <tony@atomide.com> wrote:
>> * Roger Quadros <rogerq@ti.com> [171030 08:06]:
>>> On 28/10/17 16:42, Adam Ford wrote:
>>>> --- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
>>>> +++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
>>>> @@ -72,7 +72,8 @@
>>>>  };
>>>>
>>>>  &gpmc {
>>>> -   ranges = <1 0 0x08000000 0x1000000>;    /* CS1: 16MB for LAN9221 */
>>>> +   ranges = <0 0 0x30000000 0x1000000      /* CS0: 16MB for NAND */
>>>
>>> NAND does not need 16MB space. It just needs 4 bytes of I/O space.
>>
>> Don't we have a minimum 16MB range needed for gpmc, then the
>> device register can be just 4 bytes?
>>

Sorry for the noise. Tony is right.

> 
> Looking at the Torepdo (from which I based this patch), it lists:
> 
> ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */

The ranges property defines the chip select range which
can be a minimum of 16MB.

> 
> nand@0,0 {
> compatible = "ti,omap2-nand";
> reg = <0 0 4>; /* CS0, offset 0, IO size 4 */

Yes, here is where we need 4 bytes.

> 
> Roger did that patch as part of 44e4716499b8 ("ARM: dts: omap3: Fix
> NAND device nodes")
> 
> and I am just trying to apply it to this other board.
> 
> Let me know what it should be, and I can fix (and/or test) it.  It's a
> 512MB NAND part for whatever that's worth.
> 
> adam
> 
>> Regards,
>>
>> Tony
Tony Lindgren Oct. 31, 2017, 2:42 p.m. UTC | #5
* Roger Quadros <rogerq@ti.com> [171031 08:45]:
> On 30/10/17 16:12, Adam Ford wrote:
> > On Mon, Oct 30, 2017 at 8:46 AM, Tony Lindgren <tony@atomide.com> wrote:
> >> * Roger Quadros <rogerq@ti.com> [171030 08:06]:
> >>> On 28/10/17 16:42, Adam Ford wrote:
> >>>> --- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> >>>> +++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
> >>>> @@ -72,7 +72,8 @@
> >>>>  };
> >>>>
> >>>>  &gpmc {
> >>>> -   ranges = <1 0 0x08000000 0x1000000>;    /* CS1: 16MB for LAN9221 */
> >>>> +   ranges = <0 0 0x30000000 0x1000000      /* CS0: 16MB for NAND */
> >>>
> >>> NAND does not need 16MB space. It just needs 4 bytes of I/O space.
> >>
> >> Don't we have a minimum 16MB range needed for gpmc, then the
> >> device register can be just 4 bytes?
> >>
> 
> Sorry for the noise. Tony is right.

OK. Adam, care to repost with the fixes tag in the proper place?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
index 38faa90..2fa5eb4 100644
--- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
+++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
@@ -72,7 +72,8 @@ 
 };
 
 &gpmc {
-	ranges = <1 0 0x08000000 0x1000000>;	/* CS1: 16MB for LAN9221 */
+	ranges = <0 0 0x30000000 0x1000000	/* CS0: 16MB for NAND */
+		  1 0 0x2c000000 0x1000000>;	/* CS1: 16MB for LAN9221 */
 
 	ethernet@gpmc {
 		pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/logicpd-som-lv.dtsi b/arch/arm/boot/dts/logicpd-som-lv.dtsi
index 90ae76b..b1e34e9 100644
--- a/arch/arm/boot/dts/logicpd-som-lv.dtsi
+++ b/arch/arm/boot/dts/logicpd-som-lv.dtsi
@@ -37,7 +37,7 @@ 
 };
 
 &gpmc {
-	ranges = <0 0 0x00000000 0x1000000>;	/* CS0: 16MB for NAND */
+	ranges = <0 0 0x30000000 0x1000000>;	/* CS0: 16MB for NAND */
 
 	nand@0,0 {
 		compatible = "ti,omap2-nand";