From patchwork Mon Jan 5 21:33:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 5570481 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 A2FA79F2ED for ; Mon, 5 Jan 2015 21:33:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD4E3202C8 for ; Mon, 5 Jan 2015 21:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1F7C200CF for ; Mon, 5 Jan 2015 21:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753663AbbAEVdb (ORCPT ); Mon, 5 Jan 2015 16:33:31 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:42736 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753322AbbAEVd3 (ORCPT ); Mon, 5 Jan 2015 16:33:29 -0500 Received: by mail-lb0-f180.google.com with SMTP id l4so18623851lbv.11 for ; Mon, 05 Jan 2015 13:33:28 -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=NRdYQbOaMcZQ9bLR4Iif00WDCuMZJRTv2upv0LhiCoM=; b=CvvFabuVg2G6p9fLLqTm+BNRvHxBPRfLa2ulIjMRNGFTSw/5pPC+Us8kTvKNoQ2jg9 VUP1/KC6Pbs7WFoF4/KKBOeM5CAMvqFAsKnfL2YfQtwcL8z7tIDm7TFi8LcAsZvJxtCO zUeF1xpygt3DR6LkRYhO/cm8PD7XNAkhAcaWtGgiMGCLf/IYvO2HSkranbOKSHs3kqy3 WA54fLEdRcinETLMiXlGgWdM+moE33O357zzwXE5mHU4qHDXnDu8fOzYL5kPQlA8wOlJ XNphERgOwiTa9UrRRYzgI6MYKNsnduKRqtnoLZDVMRdFOir24i9zQIYTaOqo8SNFzmDx Yq+w== X-Gm-Message-State: ALoCoQm5SVoOqsTwfkJUnu0WgKHxHEq8La47GVkZJCuYaWpjA3zOc9pGxBNqmi2yBMtqvJTOSGD5 X-Received: by 10.112.132.67 with SMTP id os3mr94248748lbb.90.1420493607934; Mon, 05 Jan 2015 13:33:27 -0800 (PST) Received: from wasted.cogentembedded.com (ppp19-206.pppoe.mtu-net.ru. [81.195.19.206]) by mx.google.com with ESMTPSA id vl1sm7425719lbb.21.2015.01.05.13.33.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 13:33:27 -0800 (PST) From: Sergei Shtylyov To: horms@verge.net.au Cc: 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, magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/2] ARM: shmobile: r8a7790: add CAN clocks Date: Tue, 06 Jan 2015 00:33:25 +0300 Message-ID: <1948350.BT8VM0CPFC@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: <28994794.h3WeokSSG3@wasted.cogentembedded.com> References: <28994794.h3WeokSSG3@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 2: - fixed spelling in the comment to the CAN_CLK node; - added Geert's ACK. arch/arm/boot/dts/r8a7790.dtsi | 22 ++++++++++++++++++++-- include/dt-bindings/clock/r8a7790-clock.h | 1 + 2 files changed, 21 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/r8a7790.dtsi =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi +++ renesas/arch/arm/boot/dts/r8a7790.dtsi @@ -838,16 +838,34 @@ clock-output-names = "audio_clk_c"; }; + /* 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,r8a7790-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", "sd1", - "z"; + "z", "rcan"; }; /* Variable factor clocks */ Index: renesas/include/dt-bindings/clock/r8a7790-clock.h =================================================================== --- renesas.orig/include/dt-bindings/clock/r8a7790-clock.h +++ renesas/include/dt-bindings/clock/r8a7790-clock.h @@ -21,6 +21,7 @@ #define R8A7790_CLK_SD0 7 #define R8A7790_CLK_SD1 8 #define R8A7790_CLK_Z 9 +#define R8A7790_CLK_RCAN 10 /* MSTP0 */ #define R8A7790_CLK_MSIOF0 0