From patchwork Wed Jul 30 22:03:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4651931 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 2DC399F2B8 for ; Wed, 30 Jul 2014 22:03:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 311202018E for ; Wed, 30 Jul 2014 22:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43977201BB for ; Wed, 30 Jul 2014 22:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbaG3WDG (ORCPT ); Wed, 30 Jul 2014 18:03:06 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:44589 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751452AbaG3WDG (ORCPT ); Wed, 30 Jul 2014 18:03:06 -0400 Received: by mail-la0-f44.google.com with SMTP id e16so1400654lan.17 for ; Wed, 30 Jul 2014 15:03:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=W/twqMQ5fuW4Qp3JEbDDuJQd+lHVMNwbN6Gi7d2+oFA=; b=CCxDvUlg7YsNL96x1dbcx5tQxDAD0FCW3RHr/aWu9Bf0CHJWt6zmbAN4ai+lsenh/B MNsUIBzMTNVgreLbPvY1dkzv1wZsCu12mr1SxsYmMDDVk09YaJsQSlHVzBRCd4TbBfqH A0c9EK9GbkbX/KTneJWfQ21pBBy0q6u7ORvuknGnAu/u46Vldk4zL2nt90HyWpsKSYcG qFW3U9jsSJfrQKKylhCIjBUsjC34cmC8RvfkgjVPSV7sxx2YCxMVwnwfjdNhJ20quXG7 TwkaabtDrPMMjBFw2bFDlxPYCmcI/zM6lEkmlrelu+iwELTE/gTYXIpsgVsjakz+qKtM xlEw== X-Gm-Message-State: ALoCoQluldTzJw9rkcKdZHjiW+cZNHhguivp810apmmzXjfaqUrnVS23S0iA3yaisQdlHySod2Rd X-Received: by 10.112.34.8 with SMTP id v8mr7276095lbi.47.1406757783409; Wed, 30 Jul 2014 15:03:03 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp24-21.pppoe.mtu-net.ru. [81.195.24.21]) by mx.google.com with ESMTPSA id ec17sm5197443lbb.24.2014.07.30.15.03.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 30 Jul 2014 15:03:02 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded 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 Subject: [PATCH v3 1/3] ARM: shmobile: r8a7791: add CAN clocks Date: Thu, 31 Jul 2014 02:03:01 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org References: <201407310158.15446.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201407310158.15446.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201407310203.02115.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 --- 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 @@ -596,15 +596,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