From patchwork Fri Aug 8 11:15:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4695491 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8DB55C033A for ; Fri, 8 Aug 2014 11:15:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D4B5420138 for ; Fri, 8 Aug 2014 11:15:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F36622016C for ; Fri, 8 Aug 2014 11:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756255AbaHHLPj (ORCPT ); Fri, 8 Aug 2014 07:15:39 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:38329 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755738AbaHHLPj (ORCPT ); Fri, 8 Aug 2014 07:15:39 -0400 Received: by mail-la0-f43.google.com with SMTP id hr17so4574745lab.30 for ; Fri, 08 Aug 2014 04:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QIw72U9PaBc7PdRcMIN/u72s9Rf1PB+CW0OaT/yQQMA=; b=BbznyTFSyJdMbKwcPG04L3HXR6MHFqhoWkR5cjfy7UJMhE6HM22wTyaknLfY1lAdbr w6Pi2cTCin+y0EUqCCi1AoxDpp/6LDer2sdYASAO6p3+MbGPc2Z9NczxfzlBjIj9fGXK 92ibHj2M/OT2iGnC3oSpERtksJQkaxMun/2bUbNxl7sEvI3efdwKLdd6KtL5mdrkPLpi KquZOsxPLlGWW3TEXL9IIjorbJaSs7V+vQw+Bkfyz6t3dEtDFGoNVLsBEFXt3ntDBM28 sI7cF2ei3hSj3GyoALx9q1kIDqDGCfjoDx1vjLQKbiIsKHspxa67GtMQSnihwdYgNq3S 1lkQ== MIME-Version: 1.0 X-Received: by 10.152.87.34 with SMTP id u2mr21933144laz.12.1407496536250; Fri, 08 Aug 2014 04:15:36 -0700 (PDT) Received: by 10.114.180.165 with HTTP; Fri, 8 Aug 2014 04:15:35 -0700 (PDT) In-Reply-To: <1407399130-14020-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1407399130-14020-1-git-send-email-ulrich.hecht+renesas@gmail.com> Date: Fri, 8 Aug 2014 20:15:35 +0900 Message-ID: Subject: Re: [PATCH] ARM: shmobile: r8a7740: Add clocks to DTS From: Magnus Damm To: Ulrich Hecht Cc: "Simon Horman [Horms]" , SH-Linux 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, T_TVD_MIME_EPI,UNPARSEABLE_RELAY autolearn=ham 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 On Thu, Aug 7, 2014 at 5:12 PM, Ulrich Hecht wrote: > Declares the r8a7740 clocks supported by the legacy clock framework, > excluding those requiring extensions to the DIV6 driver, as well as > the Armadillo800-specific overrides. > > Signed-off-by: Ulrich Hecht > --- > > Hi! > > This one omits the funky DIV6 clocks because the corresponding changes to > the clock driver have not been accepted yet. It should not have any > negative impact on legacy support. Hi Ulrich and Simon, Thanks for your patch and review help. I've now spent some time giving a try on top of: renesas-devel-v3.16-20140808 [PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform [PATCH] ARM: shmobile: r8a7740: Multiplatform support It seems that a couple of more changes are needed for the DTS and C to boot the system, please see the mangled patch below for prototype level example code. Basically, to be able to boot the SCIF console needs to get clocks assigned to it and the CMT needs to go from platform device to DT. Actually, most leaf node MSTP clock assignment seems to be missing. I maybe wrong, but I suspect some MSTP clock assignment can happen before the DIV6 change gets in. Ulrich, please work together with Simon to finalize the code! It is of course up to you guys to decide how to split it, but perhaps Ulrich can handle the clock assignment for the SCIF and other devices while Simon gets to covert the CMT and TMU over. I've attached the configuration I used to test your patch on top of the two above and the local change below, hope it helps! After this we need to merge the DTS for legacy and reference board support. And build the DTB in case of Multiplatform. Then we should be ready to kill of the DT reference C code. Not so far away! Cheers, / magnus --- 0006/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ work/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts 2014-08-08 19:37:07.000000000 +0900 @@ -191,6 +191,9 @@ renesas,mode = <0x05>; /* MD_CK0 | MD_CK2 */ }; +&cmt1 { + status = "ok"; +}; &i2c0 { status = "okay"; touchscreen@55 { +++ work/arch/arm/mach-shmobile/setup-r8a7740.c 2014-08-08 19:40:45.000000000 +0900 @@ -792,8 +792,10 @@ void __init r8a7740_add_early_devices(vo void __init r8a7740_add_standard_devices_dt(void) { +#if 0 platform_add_devices(r8a7740_devices_dt, ARRAY_SIZE(r8a7740_devices_dt)); +#endif of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } --- 0006/arch/arm/boot/dts/r8a7740.dtsi +++ work/arch/arm/boot/dts/r8a7740.dtsi 2014-08-08 19:36:20.000000000 +0900 @@ -41,6 +41,18 @@ interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>; }; + cmt1: timer@e6138000 { + compatible = "renesas,sh-cmt-48"; + reg = <0xe6138000 0x170>; + interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7740_CLK_CMT1>; + clock-names = "fck"; + + renesas,channels-mask = <0x3f>; + + status = "disabled"; + }; + /* irqpin0: IRQ0 - IRQ7 */ irqpin0: irqpin@e6900000 { compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; @@ -168,6 +180,8 @@ compatible = "renesas,scifa-r8a7740", "renesas,scifa"; reg = <0xe6c50000 0x100>; interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7740_CLK_SCIFA1>; + clock-names = "sci_ick"; status = "disabled"; }; --- 0004/arch/arm/mach-shmobile/setup-r8a7740.c