devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: linux-mips@linux-mips.org
Cc: Alban Bedel <albeu@free.fr>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-clk@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: [PATCH v2 06/18] MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name
Date: Thu, 17 Mar 2016 06:34:13 +0300	[thread overview]
Message-ID: <1458185665-4521-7-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1458185665-4521-1-git-send-email-antonynpavlov@gmail.com>

Current ath79 clock.c code does not read reference clock and
pll setup from devicetree. The ar724x_clocks_init() function
recreates the clocks from scratch so devicetree clock
information is dropped. After adding the code which picked up
reference clock from devicetree I have found
that kernel does not boot anymore. The SPI and UART drivers
can't get clk; here are the bootlog error messages:

    of_serial: probe of 18020000.uart failed with error -22
    ath79-spi: probe of 1f000000.spi failed with error -22

The problem is that clock code assumes that reference clock
name is "ref" but current dts-file uses another name: "oscillator".

This patch fixes the problem by changing external oscillator
dt node name to "ref".

Please note that there is an alternative solution for the problem:

    > --- a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
    > +++ b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
    > @@ -16,6 +16,7 @@
    >
    >         extosc: oscillator {
    >                 compatible = "fixed-clock";
    > +               clock-output-names = "ref";
    >                 #clock-cells = <0>;
    >                 clock-frequency = <40000000>;
    >         };

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Alban Bedel <albeu@free.fr>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
---
 arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
index eb632a2..3c3b7ce 100644
--- a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
+++ b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
@@ -14,7 +14,7 @@
 		reg = <0x0 0x2000000>;
 	};
 
-	extosc: oscillator {
+	extosc: ref {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <40000000>;
-- 
2.7.0


  parent reply	other threads:[~2016-03-17  3:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1458185665-4521-1-git-send-email-antonynpavlov@gmail.com>
     [not found] ` <1458185665-4521-1-git-send-email-antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-17  3:34   ` [PATCH v2 01/18] dt-bindings: clock: qca,ath79-pll: fix copy-paste typos Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 04/18] MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: drop unused alias node Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 05/18] MIPS: dts: qca: ar9132: use short references for dt nodes Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 10/18] MIPS: dts: qca: introduce AR9331 devicetree Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 12/18] MIPS: ath79: add initial support for TP-LINK MR3020 Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 13/18] devicetree: add Dragino vendor id Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 14/18] MIPS: ath79: add initial support for Dragino MS14 (Dragino 2) Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 15/18] devicetree: add Onion Corporation vendor id Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 16/18] MIPS: ath79: add initial support for Onion Omega Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 17/18] devicetree: add DPTechnics vendor id Antony Pavlov
2016-03-17  3:34   ` [PATCH v2 18/18] MIPS: ath79: add initial support for DPT-Module Antony Pavlov
2016-03-17  3:34 ` Antony Pavlov [this message]
2016-03-17  3:34 ` [PATCH v2 07/18] MIPS: ath79: introduce <dt-bindings/clock/ath79-clk.h> Antony Pavlov
2016-03-17  3:34 ` [PATCH v2 08/18] MIPS: ath79: update devicetree clock support for AR9132 Antony Pavlov
2016-03-17  3:34 ` [PATCH v2 11/18] MIPS: ath79: update devicetree clock support for AR9331 Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458185665-4521-7-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=albeu@free.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mturquette@baylibre.com \
    --cc=ralf@linux-mips.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).