From patchwork Wed Sep 25 23:18:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2945131 Return-Path: X-Original-To: patchwork-linux-arm@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 6B8C49F288 for ; Wed, 25 Sep 2013 23:18:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8FB5C2034D for ; Wed, 25 Sep 2013 23:18:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A49A202C8 for ; Wed, 25 Sep 2013 23:18:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOyLN-0006Fi-Cx; Wed, 25 Sep 2013 23:18:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOyLK-0002pl-W2; Wed, 25 Sep 2013 23:18:02 +0000 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOyLH-0002oe-Vd for linux-arm-kernel@lists.infradead.org; Wed, 25 Sep 2013 23:18:00 +0000 Received: by mail-pd0-f176.google.com with SMTP id q10so314886pdj.21 for ; Wed, 25 Sep 2013 16:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=vC5F2/09vObDs+hZRxo9Hw/0ioN5kzPjPBqQnU0LA2s=; b=TS81CNxSwiGOgf9W1DD85v5Wnm+sEeNhtsItxX2guJ4Qc0J3V/mKP48EMkhBVLU65m F5PnyVRUvQUQnPI0HNlT95lZdBq0Ck38sdRNFBr2yTWQbktgxlyTtUaXHF0dvYAmw+Nx qnf8FSqSwQaRTbTtqGq8EEZST9jQ6m0FkEsX+k5lGJyRtSsH1HHeq4PGcOwHJz/9JMzi 9bKV6ZByZlfhwH0hq7v76M60npHkSfGipo/SIpbJpqImKpCqZl1RQOa9TA/wkceR8bRS JO+mBajJcfeWLAUHy74zCqeGIJBS0GxVCYb+mqN8AVvelBWxizG5lag/CyARjq7o9e/1 R2Rw== X-Received: by 10.66.26.112 with SMTP id k16mr1712612pag.65.1380151056595; Wed, 25 Sep 2013 16:17:36 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id oh2sm50181641pbb.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 16:17:35 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Thu, 26 Sep 2013 08:18:01 +0900 Message-Id: <20130925231801.16487.26821.sendpatchset@w520> Subject: [PATCH/RFC] ARM: shmobile: Add r8a7791 thermal sensor DT device X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130925_191800_118010_9C216803 X-CRM114-Status: GOOD ( 10.49 ) X-Spam-Score: -2.0 (--) Cc: horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org, kuninori.morimoto.gx@renesas.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Magnus Damm Hook up the single channel thermal sensor via DT on r8a7791. The information comes from the device data sheet. Unfortunately it seems that r8a7791 uses a different register offset compared to r8a7790, so passing the singel channel offset results in the following error: rcar_thermal e61f0000.thermal: can't request region for resource [mem 0xe61f0000-0xe61f0037] rcar_thermal: probe of e61f0000.thermal failed with error -16 Before this can be merged the thermal driver may beed to be extended to support the different register layouts for the thermal sensor in r8a7779, r8a7790 and r8a7791. Not-Yet-Signed-off-by: Magnus Damm --- Written against renesas-devel-20130925 arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++ arch/arm/mach-shmobile/clock-r8a7791.c | 3 +++ 2 files changed, 10 insertions(+) --- 0001/arch/arm/boot/dts/r8a7791.dtsi +++ work/arch/arm/boot/dts/r8a7791.dtsi 2013-09-26 07:34:01.000000000 +0900 @@ -38,4 +38,11 @@ <0 0xf1006000 0 0x2000>; interrupts = <1 9 0xf04>; }; + + thermal@e61f0000 { + compatible = "renesas,rcar-thermal"; + reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0000 0 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 4>; + }; }; --- 0001/arch/arm/mach-shmobile/clock-r8a7791.c +++ work/arch/arm/mach-shmobile/clock-r8a7791.c 2013-09-26 07:32:34.000000000 +0900 @@ -122,6 +122,7 @@ static struct clk *main_clks[] = { enum { MSTP721, MSTP720, MSTP719, MSTP718, MSTP715, MSTP714, + MSTP522, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107, MSTP124, @@ -135,6 +136,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ + [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ @@ -179,6 +181,7 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1105]), /* SCIFA3 */ CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */ CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */ + CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), };