Message ID | 20180623204937.5475-1-rosenp@gmail.com |
---|---|
State | Rejected |
Delegated to: | John Crispin |
Headers | show |
Series | [OpenWrt-Devel] staging: mt7621-dts: correct various clock frequencies. | expand |
On 23/06/18 22:49, Rosen Penev wrote: > From: NeilBrown <neil@brown.name> > > The MT7621 documentation says that the sys clock - also known > as OCP clock for the Open Core Protocol - can be configured to > 1/3 or 1/4 of the CPU clock. > Testing on my hardware, using the fact that the SPI clock is > based on the OCP clock and measuring transfer rates, shows > a clock of a little over 200MHz with a CPU clock of 900MHz. > So assume 1/4 is the default. > > Also, the nor-flash in the gbpc1 is documented as accepting 50MHz > for request requests, and higher for other requests. So set > maximum to 50MHz. > > Signed-off-by: NeilBrown <neil@brown.name> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> NAK, these backports caused too many regressions already, we will get the whole lot and test it when we bump the target. John > --- > target/linux/ramips/dts/GB-PC1.dts | 8 +++++++- > target/linux/ramips/dts/mt7621.dtsi | 4 ++-- > 2 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts > index 3b29d335b9..db6c3a86b0 100644 > --- a/target/linux/ramips/dts/GB-PC1.dts > +++ b/target/linux/ramips/dts/GB-PC1.dts > @@ -71,7 +71,7 @@ > #size-cells = <1>; > compatible = "jedec,spi-nor"; > reg = <0>; > - spi-max-frequency = <10000000>; > + spi-max-frequency = <50000000>; > m25p,chunked-io = <32>; > > partition@0 { > @@ -99,6 +99,12 @@ > }; > }; > > +&sysclock { > + compatible = "fixed-clock"; > + /* This is normally 1/4 of cpuclock */ > + clock-frequency = <225000000>; > +}; > + > &cpuclock { > compatible = "fixed-clock"; > clock-frequency = <900000000>; > diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi > index 0655e35301..dd8e87f7ce 100644 > --- a/target/linux/ramips/dts/mt7621.dtsi > +++ b/target/linux/ramips/dts/mt7621.dtsi > @@ -45,8 +45,8 @@ > #clock-cells = <0>; > compatible = "fixed-clock"; > > - /* FIXME: there should be way to detect this */ > - clock-frequency = <50000000>; > + /* This is normally 1/4 of cpuclock */ > + clock-frequency = <220000000>; > }; > >
diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts index 3b29d335b9..db6c3a86b0 100644 --- a/target/linux/ramips/dts/GB-PC1.dts +++ b/target/linux/ramips/dts/GB-PC1.dts @@ -71,7 +71,7 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <50000000>; m25p,chunked-io = <32>; partition@0 { @@ -99,6 +99,12 @@ }; }; +&sysclock { + compatible = "fixed-clock"; + /* This is normally 1/4 of cpuclock */ + clock-frequency = <225000000>; +}; + &cpuclock { compatible = "fixed-clock"; clock-frequency = <900000000>; diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 0655e35301..dd8e87f7ce 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -45,8 +45,8 @@ #clock-cells = <0>; compatible = "fixed-clock"; - /* FIXME: there should be way to detect this */ - clock-frequency = <50000000>; + /* This is normally 1/4 of cpuclock */ + clock-frequency = <220000000>; };