From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55264C0650E for ; Mon, 1 Jul 2019 15:14:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24968208E4 for ; Mon, 1 Jul 2019 15:14:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="HTsjWzd5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730257AbfGAPOw (ORCPT ); Mon, 1 Jul 2019 11:14:52 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:57614 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730201AbfGAPOl (ORCPT ); Mon, 1 Jul 2019 11:14:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1561994080; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9L5TK4kZlbFcAHsEAbtggChjqgSyQPXA9Y1ExxEBQcU=; b=HTsjWzd5BQLAuF56BuVj1N02zi1dhuu5+uG8enagX0B2K/dI0QhkCd91O7mXs40RRrZGJV AbkKC0uX2szuiIbpvt8RS5br9kad7rsrnzSw/j+t/q+o/HF5uucnlBdyrx3xPH31c8JKx5 V77HZIQ+OobrRIQ1AD/vhuctTtujNSw= From: Paul Cercueil To: Lee Jones , Jonathan Corbet , Ralf Baechle , Paul Burton , James Hogan , Michael Turquette , Stephen Boyd , Thomas Gleixner , Daniel Lezcano Cc: Mathieu Malaterre , od@zcrc.me, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, Paul Cercueil , Artur Rojek Subject: [PATCH v14 12/13] MIPS: GCW0: Reduce system timer and clocksource to 750 kHz Date: Mon, 1 Jul 2019 17:14:09 +0200 Message-Id: <20190701151410.23127-13-paul@crapouillou.net> In-Reply-To: <20190701151410.23127-1-paul@crapouillou.net> References: <20190701151410.23127-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The default clock (12 MHz) is too fast for the system timer. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Tested-by: Artur Rojek --- Notes: v8: New patch v9: Don't configure clock timer1, as the OS Timer is used as clocksource on this SoC v10: Revert back to v8 bahaviour. Let the user choose what clocksource should be used. v11: No change v12: Move clocksource to channel 2, as channel 1 is used as PWM for the backlight. v13-v14: No change arch/mips/boot/dts/ingenic/gcw0.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/gcw0.dts b/arch/mips/boot/dts/ingenic/gcw0.dts index 35f0291e8d38..f58d239c2058 100644 --- a/arch/mips/boot/dts/ingenic/gcw0.dts +++ b/arch/mips/boot/dts/ingenic/gcw0.dts @@ -2,6 +2,7 @@ /dts-v1/; #include "jz4770.dtsi" +#include / { compatible = "gcw,zero", "ingenic,jz4770"; @@ -60,3 +61,12 @@ /* The WiFi module is connected to the UHC. */ status = "okay"; }; + +&tcu { + /* 750 kHz for the system timer and clocksource */ + assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; + assigned-clock-rates = <750000>, <750000>; + + /* PWM1 is in use, so reserve channel #2 for the clocksource */ + ingenic,pwm-channels-mask = <0xfa>; +}; -- 2.21.0.593.g511ec345e18