diff mbox

[OpenWrt-Devel] lantiq: spi-max-frequency

Message ID 1447097767.8568.3.camel@chimera
State Changes Requested
Headers show

Commit Message

Daniel Gimpelevich Nov. 9, 2015, 7:36 p.m. UTC
On Thu, 2015-02-26 at 16:02 +0100, Joerg Jungermann wrote:
> Hi,
> 
> I have here multiple TD-W8970 with Annex A and Annex B.
> 
> >                 m25p80@0 {
> >                         #address-cells = <1>;
> >                         #size-cells = <1>;
> >                         compatible = "s25fl129p0";
> >                         reg = <0 0>;
> >                         linux,modalias = "m25p80", "mx25l3205d";
> >                         spi-max-frequency = <1000000>;
> 
> I increased spi-max-frequency = <50000000>.
> According to the datasheets I found that is maximum frequency.
> 
> With my 3 models (2x A, 1x B) these settings work with BB (kernel
> 3.10) well.
> I have not yet tested 3.18.
> I benchmarked boot up times from spi-flash with my build.
> I could lower bootup times (from uboot to init-completed) from 2m01s
> to 1m18s.
> 
> I suggest backporting this increase of the spi freq to BB.
> 
> best regards

Comments

John Crispin Nov. 21, 2015, 6:15 p.m. UTC | #1
Hi,

common, you know how to send a patch and put a SoB under it. i've seen
you do it lots of times ;)

	John

On 09/11/2015 20:36, Daniel Gimpelevich wrote:
> On Thu, 2015-02-26 at 16:02 +0100, Joerg Jungermann wrote:
>> Hi,
>>
>> I have here multiple TD-W8970 with Annex A and Annex B.
>>
>>>                 m25p80@0 {
>>>                         #address-cells = <1>;
>>>                         #size-cells = <1>;
>>>                         compatible = "s25fl129p0";
>>>                         reg = <0 0>;
>>>                         linux,modalias = "m25p80", "mx25l3205d";
>>>                         spi-max-frequency = <1000000>;
>>
>> I increased spi-max-frequency = <50000000>.
>> According to the datasheets I found that is maximum frequency.
>>
>> With my 3 models (2x A, 1x B) these settings work with BB (kernel
>> 3.10) well.
>> I have not yet tested 3.18.
>> I benchmarked boot up times from spi-flash with my build.
>> I could lower bootup times (from uboot to init-completed) from 2m01s
>> to 1m18s.
>>
>> I suggest backporting this increase of the spi freq to BB.
>>
>> best regards
> 
> Index: target/linux/lantiq/dts/DGN3500.dtsi
> ===================================================================
> --- a/target/linux/lantiq/dts/DGN3500.dtsi	(revision 47278)
> +++ b/target/linux/lantiq/dts/DGN3500.dtsi	(working copy)
> @@ -85,7 +85,7 @@
>  			compatible = "s25fl129p0";
>  			reg = <0 0>;
>  			linux,modalias = "m25p80", "mx25l3205d";
> -			spi-max-frequency = <1000000>;
> +			spi-max-frequency = <50000000>;
>  
>  			partition@0 {
>  				reg = <0x0 0x10000>;
> Index: target/linux/lantiq/dts/TDW89X0.dtsi
> ===================================================================
> --- a/target/linux/lantiq/dts/TDW89X0.dtsi	(revision 47278)
> +++ b/target/linux/lantiq/dts/TDW89X0.dtsi	(working copy)
> @@ -160,7 +160,7 @@
>  			compatible = "en25q64", "m25p80";
>  			reg = <0 0>;
>  			linux,modalias = "en25q64";
> -			spi-max-frequency = <1000000>;
> +			spi-max-frequency = <50000000>;
>  
>  			partition@0 {
>  				reg = <0x0 0x20000>;
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
Daniel Gimpelevich Nov. 21, 2015, 6:27 p.m. UTC | #2
On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote:
> Hi,
> 
> common, you know how to send a patch and put a SoB under it. i've seen
> you do it lots of times ;)
> 
>         John

Yes, but it just doesn't feel right for me to do when the patch is
essentially from Joerg and not from me.
Daniel Gimpelevich Nov. 21, 2015, 7:05 p.m. UTC | #3
On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote:
> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote:
> > Hi,
> > 
> > common, you know how to send a patch and put a SoB under it. i've seen
> > you do it lots of times ;)
> > 
> >         John
> 
> Yes, but it just doesn't feel right for me to do when the patch is
> essentially from Joerg and not from me.
> 

Are there any other DTS files to which this would apply?
John Crispin Nov. 21, 2015, 7:15 p.m. UTC | #4
On 21/11/2015 20:05, Daniel Gimpelevich wrote:
> On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote:
>> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote:
>>> Hi,
>>>
>>> common, you know how to send a patch and put a SoB under it. i've seen
>>> you do it lots of times ;)
>>>
>>>         John
>>
>> Yes, but it just doesn't feel right for me to do when the patch is
>> essentially from Joerg and not from me.
>>
> 
> Are there any other DTS files to which this would apply?
> 

grep for spi-gpio in the dts folder
Daniel Gimpelevich Nov. 21, 2015, 7:17 p.m. UTC | #5
On Sat, 2015-11-21 at 20:15 +0100, John Crispin wrote:
> On 21/11/2015 20:05, Daniel Gimpelevich wrote:
> > On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote:
> >> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote:
> >>> Hi,
> >>>
> >>> common, you know how to send a patch and put a SoB under it. i've seen
> >>> you do it lots of times ;)
> >>>
> >>>         John
> >>
> >> Yes, but it just doesn't feel right for me to do when the patch is
> >> essentially from Joerg and not from me.
> >>
> > 
> > Are there any other DTS files to which this would apply?
> > 
> 
> grep for spi-gpio in the dts folder

Do all three of those use the same chip?
John Crispin Nov. 21, 2015, 7:19 p.m. UTC | #6
On 21/11/2015 20:17, Daniel Gimpelevich wrote:
> On Sat, 2015-11-21 at 20:15 +0100, John Crispin wrote:
>> On 21/11/2015 20:05, Daniel Gimpelevich wrote:
>>> On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote:
>>>> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote:
>>>>> Hi,
>>>>>
>>>>> common, you know how to send a patch and put a SoB under it. i've seen
>>>>> you do it lots of times ;)
>>>>>
>>>>>         John
>>>>
>>>> Yes, but it just doesn't feel right for me to do when the patch is
>>>> essentially from Joerg and not from me.
>>>>
>>>
>>> Are there any other DTS files to which this would apply?
>>>
>>
>> grep for spi-gpio in the dts folder
> 
> Do all three of those use the same chip?

probably not


>
Daniel Gimpelevich Nov. 21, 2015, 7:24 p.m. UTC | #7
On Sat, 2015-11-21 at 20:19 +0100, John Crispin wrote:
> 
> On 21/11/2015 20:17, Daniel Gimpelevich wrote:
> > On Sat, 2015-11-21 at 20:15 +0100, John Crispin wrote:
> >> On 21/11/2015 20:05, Daniel Gimpelevich wrote:
> >>> On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote:
> >>>> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote:
> >>>>> Hi,
> >>>>>
> >>>>> common, you know how to send a patch and put a SoB under it. i've seen
> >>>>> you do it lots of times ;)
> >>>>>
> >>>>>         John
> >>>>
> >>>> Yes, but it just doesn't feel right for me to do when the patch is
> >>>> essentially from Joerg and not from me.
> >>>>
> >>>
> >>> Are there any other DTS files to which this would apply?
> >>>
> >>
> >> grep for spi-gpio in the dts folder
> > 
> > Do all three of those use the same chip?
> 
> probably not
> 
> 
> > 

I ask because Joerg mentioned some sort of datasheet. I only know that
he tried the patch with BB on the TP-Link and it worked, and I tried it
with DD on the Netgear and it worked. I never got CC to work properly
with or without it. Any chance you can test on the FritzBox before a
resubmit?
diff mbox

Patch

Index: target/linux/lantiq/dts/DGN3500.dtsi
===================================================================
--- a/target/linux/lantiq/dts/DGN3500.dtsi	(revision 47278)
+++ b/target/linux/lantiq/dts/DGN3500.dtsi	(working copy)
@@ -85,7 +85,7 @@ 
 			compatible = "s25fl129p0";
 			reg = <0 0>;
 			linux,modalias = "m25p80", "mx25l3205d";
-			spi-max-frequency = <1000000>;
+			spi-max-frequency = <50000000>;
 
 			partition@0 {
 				reg = <0x0 0x10000>;
Index: target/linux/lantiq/dts/TDW89X0.dtsi
===================================================================
--- a/target/linux/lantiq/dts/TDW89X0.dtsi	(revision 47278)
+++ b/target/linux/lantiq/dts/TDW89X0.dtsi	(working copy)
@@ -160,7 +160,7 @@ 
 			compatible = "en25q64", "m25p80";
 			reg = <0 0>;
 			linux,modalias = "en25q64";
-			spi-max-frequency = <1000000>;
+			spi-max-frequency = <50000000>;
 
 			partition@0 {
 				reg = <0x0 0x20000>;