From patchwork Mon Dec 29 22:04:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 5550371 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5FC7CBF6C3 for ; Mon, 29 Dec 2014 22:04:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 420E32017E for ; Mon, 29 Dec 2014 22:04:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65D7120172 for ; Mon, 29 Dec 2014 22:04:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752168AbaL2WEy (ORCPT ); Mon, 29 Dec 2014 17:04:54 -0500 Received: from mail-lb0-f170.google.com ([209.85.217.170]:46466 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554AbaL2WEy (ORCPT ); Mon, 29 Dec 2014 17:04:54 -0500 Received: by mail-lb0-f170.google.com with SMTP id 10so11695719lbg.1 for ; Mon, 29 Dec 2014 14:04:52 -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=6SI1S37whswEEKthl83WKnPy0pEg2YylA12LEruy9Hg=; b=B0bbIJqFTPOAssYJnrYGoEOMiajyKYRt23hkerSKD4Nm146wVtVtlAvoQS48a7UwBu 0pi4YRdeEgImjKIJwJaYNJ1WSGV16YbSJ8pUOxvqL2BRW0CvLqnKyqDI6DeZtVdTMpgt 2KN2q/gCOpszLhnAiUetmUYcrfRpBiMQw5dR/7t8MR5KOv6lEPxj5fjHJaGIMHOZTGej fJpmDsto861aMRKZ8byRWfjf8/N/mwBaNa2s0uEi+zgqaYBVEw6Ga2cG6fteyWilvKJo ThwG3i5iPBeJagxlgQ5wSZbjyPCrXF2HvwQV7xHksQN61E+kgYy1+8jV7IZQ3OjlVLE3 MPRw== X-Gm-Message-State: ALoCoQmkdty6U5iEp0awz9r3hElzFBKy4z2qAg5pgre3kLDvqnnnYr+NMXB+t0EbsLCSbKIo0nUL X-Received: by 10.152.234.9 with SMTP id ua9mr58469777lac.44.1419890692595; Mon, 29 Dec 2014 14:04:52 -0800 (PST) Received: from wasted.cogentembedded.com (ppp27-203.pppoe.mtu-net.ru. [81.195.27.203]) by mx.google.com with ESMTPSA id ei11sm10210259lad.18.2014.12.29.14.04.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Dec 2014 14:04:51 -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 1/2] ARM: shmobile: r8a7790: add CAN clocks Date: Tue, 30 Dec 2014 01:04:49 +0300 Message-ID: <7045264.74zTCWbb7p@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: <2616635.bsb7mLynhA@wasted.cogentembedded.com> References: <2616635.bsb7mLynhA@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 --- 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 overriden 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