From patchwork Mon Jan 5 22:24:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 5570611 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0333B9F444 for ; Mon, 5 Jan 2015 22:24:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D94220340 for ; Mon, 5 Jan 2015 22:24:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B0ED202F8 for ; Mon, 5 Jan 2015 22:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754549AbbAEWYN (ORCPT ); Mon, 5 Jan 2015 17:24:13 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:54666 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754517AbbAEWYM (ORCPT ); Mon, 5 Jan 2015 17:24:12 -0500 Received: by mail-la0-f53.google.com with SMTP id gm9so18857910lab.26 for ; Mon, 05 Jan 2015 14:24:11 -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=LZMNJIJ2ECbYM6k6OxeUROW4ItCfwSTCrTx/toeXoWQ=; b=UZYHNyMEtI4toflr79qmvXjxuaK9WgsDUuOcMtttP3Da9ecN6AE+nOwrpJRLbxJtLu caFdnGY6LOXfnj2eftv5hp36mEFEB9+C9v2Y0YHh0hb8CRX4/K7LS1EckkUMAnSOlf/3 Kwa1VPxbe2POHFE33SMaCr2aX+1gn1Ux87se2FWfGvJipljvpAdsWSRhxxjCqil+cjuG C8V39n/e13d0iymOYsOs0W4NXyB4qC8tVM+Y2pAZfcrDLCMUDbndctHMx5iIi9cu2ul5 +LoE+y83WXSdBllkW5lYUhSr6nxOURZr97OFlpqWI9NAzJPSqh4zY39YlucH0we/3CL7 0TOw== X-Gm-Message-State: ALoCoQmPJAZbgOxDRCmQpZtl6UXfbBrGU/cnCHv+YJaT6Fb/ZIW/Q4ekQ8/WVP18pozmLFjlLgiX X-Received: by 10.112.47.135 with SMTP id d7mr88551485lbn.54.1420496651395; Mon, 05 Jan 2015 14:24:11 -0800 (PST) Received: from wasted.cogentembedded.com (ppp19-206.pppoe.mtu-net.ru. [81.195.19.206]) by mx.google.com with ESMTPSA id rs4sm14917279lbb.3.2015.01.05.14.24.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 14:24:10 -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 v5 1/3] ARM: shmobile: r8a7791: add CAN clocks Date: Tue, 06 Jan 2015 01:24:08 +0300 Message-ID: <6708841.g1E0bra2me@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: <1652479.NHBlqJ9OaR@wasted.cogentembedded.com> References: <1652479.NHBlqJ9OaR@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: Geert Uytterhoeven --- Changes in version 5: - fixed spelling in the comment to the CAN_CLK node; - added Geert's ACK. 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 overridden 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