From patchwork Fri Dec 26 23:18:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 5543911 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D670E9F301 for ; Fri, 26 Dec 2014 23:18:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2C92201F5 for ; Fri, 26 Dec 2014 23:18:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9386201EF for ; Fri, 26 Dec 2014 23:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbaLZXSr (ORCPT ); Fri, 26 Dec 2014 18:18:47 -0500 Received: from mail-la0-f43.google.com ([209.85.215.43]:38306 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbaLZXSq (ORCPT ); Fri, 26 Dec 2014 18:18:46 -0500 Received: by mail-la0-f43.google.com with SMTP id s18so9323604lam.16 for ; Fri, 26 Dec 2014 15:18:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=aUEo/RVLkpDVwbV/e0MLzlQoF3JYn/DxFC10Mz0wBdE=; b=WQ6eM/xFjCCFEiLIG5oD8MYrx0u89myj8BWZXHQXc1zqBtY5favTyfq/PbA+VfNqej 7HbttamGYusr5i7gIzWWuDsJcMbMrUNOoovBiPHb5OYqnjuQA6VLT3by5KaF2uHq+Ccm rq1LWbgDlqj5QiwqV/iV+5bv7R+DU6vHEvk3uFXTzX0Xu8/aEZ9jrtKw4MBHZYxG/Fd0 Z3AkYlY98PcRZ7MGI1B4ZPG11ozePNQqa49/sv2uBw57IIdrF2rZv9FtiETti2MiSvc4 R1PQgFN+7rD9X93DgxELkjcY/Rv70CqaFaz3LVZbqkbj3AIk9jYBIIPiu5iHChoDGtQe uDNw== X-Gm-Message-State: ALoCoQk8ufET8mJ+0PABiU5HduRPl5wI2B5c61xgCnnN9O16DMWx7MQFr+KJ+9Myy8JQVm8rG5nq X-Received: by 10.152.27.228 with SMTP id w4mr45526244lag.75.1419635924976; Fri, 26 Dec 2014 15:18:44 -0800 (PST) Received: from wasted.cogentembedded.com (ppp83-237-255-240.pppoe.mtu-net.ru. [83.237.255.240]) by mx.google.com with ESMTPSA id xq3sm4135754lbb.15.2014.12.26.15.18.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Dec 2014 15:18:44 -0800 (PST) From: Sergei Shtylyov To: horms@verge.net.au, linux-sh@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, devicetree@vger.kernel.org Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 1/3] ARM: shmobile: r8a7791: add CAN clocks Date: Sat, 27 Dec 2014 02:18:41 +0300 Message-ID: <2098987.LzjA3c0AUx@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.3 (Linux/3.17.7-200.fc20.x86_64; KDE/4.14.3; x86_64; ; ) In-Reply-To: <6830301.90YaDPuTpx@wasted.cogentembedded.com> References: <6830301.90YaDPuTpx@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The R-Car CAN controllers can derive the CAN bus clock not only from their peripheral clock input (clkp1) but also from the other internal clock (clkp2) and external clock fed on CAN_CLK pin. Describe those clocks in the device tree, along with the USB_EXTAL clock from which clkp2 is derived. Signed-off-by: Sergei Shtylyov Acked-by: arch/arm/boot/dts/r8a7790.dtsi Acked-by: Geert Uytterhoeven --- Changes in version 4: - refreshed the patch. Changes in version 3: - new patch. arch/arm/boot/dts/r8a7791.dtsi | 23 +++++++++++++++++++++-- include/dt-bindings/clock/r8a7791-clock.h | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: renesas/arch/arm/boot/dts/r8a7791.dtsi =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7791.dtsi +++ renesas/arch/arm/boot/dts/r8a7791.dtsi @@ -862,15 +862,34 @@ status = "disabled"; }; + /* External USB clock - can be overridden by the board */ + usb_extal_clk: usb_extal_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <48000000>; + clock-output-names = "usb_extal"; + }; + + /* External CAN clock */ + can_clk: can_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value must be overriden by the board. */ + clock-frequency = <0>; + clock-output-names = "can_clk"; + status = "disabled"; + }; + /* Special CPG clocks */ cpg_clocks: cpg_clocks@e6150000 { compatible = "renesas,r8a7791-cpg-clocks", "renesas,rcar-gen2-cpg-clocks"; reg = <0 0xe6150000 0 0x1000>; - clocks = <&extal_clk>; + clocks = <&extal_clk &usb_extal_clk>; #clock-cells = <1>; clock-output-names = "main", "pll0", "pll1", "pll3", - "lb", "qspi", "sdh", "sd0", "z"; + "lb", "qspi", "sdh", "sd0", "z", + "rcan"; }; /* Variable factor clocks */ Index: renesas/include/dt-bindings/clock/r8a7791-clock.h =================================================================== --- renesas.orig/include/dt-bindings/clock/r8a7791-clock.h +++ renesas/include/dt-bindings/clock/r8a7791-clock.h @@ -20,6 +20,7 @@ #define R8A7791_CLK_SDH 6 #define R8A7791_CLK_SD0 7 #define R8A7791_CLK_Z 8 +#define R8A7791_CLK_RCAN 9 /* MSTP0 */ #define R8A7791_CLK_MSIOF0 0