Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9841358ybi; Wed, 24 Jul 2019 10:53:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc0IAu6wNkpLl2VVaTiUniHmV+zwTgQXkfi0kWGp0cGp0DIO7PZ/SPoki0i30OxQKag0CJ X-Received: by 2002:a63:5f95:: with SMTP id t143mr22423518pgb.304.1563990814515; Wed, 24 Jul 2019 10:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563990814; cv=none; d=google.com; s=arc-20160816; b=chQVX28g5p6Q6nwU6adWt/08XAgsdgTTIoo4hFn2bPuxFo7J7VS3AqkdROh00fDzE/ oPG+WCxn35X/PXfZmHrEW1qZTwCaE077ULDnw4M9Uz+j+7+/4SxaFQlMkoOKGMyePVYh zjvuSjv1gdSEVdjoIhnfCa4LXPnsEyzlRoWcR6mjaB/K9T1aI/iLzqB6ZDDg8CY3Quhf itZE5o4MXLoBWwqNfykQn0MUnfCc2Ebp5F8qN0N/cWPgskyZ3p14yxuJBvaMq9s1g160 9WMujVvSr2iTG+cEdbjaAr4/ot8mRx6294pyoteje/9CAZBmsFXhgDnPF5MsNaWBw03n Pzqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BgXY5iiOP5baZheQ/F3iRpDO2LAN5bm7DtrcnRcQqWY=; b=GwRmzlaecMF/u509WAWvV6sqSBdjCYT1/s6pb5dGWC0X9jBemiZl6v1J18ump7Em52 v2xbCuyYB1g1/2Llm5F+m4PgEHt+rwPATYUydocPFiokOVO5UuRqu0Ldvf4LEYXG46lV aHrEqlLUxE6S2y6QD0RMI1lmm/qXm0Su8rFTgaui21bikOhhgVXi/f/RMUGuNlEabc3p gbl4T19tVMmz7Q8bTNRYIMQuISlDdlaK/uCW/71u+ocFR2rSdgsJ4MbI1UlZRiAev7/E 32CN06rbjhWZylGa11uwxDcaBaX/1frIYX3+X4kkO6TBb6CNwbTFHqQ9Qe5p5vw+wwJT Bs9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=Q91daUv7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si15737085pfe.204.2019.07.24.10.53.20; Wed, 24 Jul 2019 10:53:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=Q91daUv7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387701AbfGXR1r (ORCPT + 99 others); Wed, 24 Jul 2019 13:27:47 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:51988 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728307AbfGXR1q (ORCPT ); Wed, 24 Jul 2019 13:27:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1563988672; 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=BgXY5iiOP5baZheQ/F3iRpDO2LAN5bm7DtrcnRcQqWY=; b=Q91daUv7sUxM8M1kbZuOEVrdiPMCaw/KgLnwmjfogQip7pUmzPTFOajXc47sfllaTUWsk1 dX0LWk7uTzyTHBSYYmw0pR8J8rgOXgMo8F6+lbp0ApXtPpF7VSYEWA4/vKvOIqUi1mcqI/ wnU5igj0RLMLi4V326yg8ZzVPpwnUFw= From: Paul Cercueil To: Ralf Baechle , Paul Burton , James Hogan , Jonathan Corbet , Lee Jones , Arnd Bergmann , Daniel Lezcano , Thomas Gleixner , Michael Turquette , Stephen Boyd , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, od@zcrc.me, Mathieu Malaterre , Paul Cercueil , Artur Rojek Subject: [PATCH v15 12/13] MIPS: GCW0: Reduce system timer and clocksource to 750 kHz Date: Wed, 24 Jul 2019 13:16:14 -0400 Message-Id: <20190724171615.20774-13-paul@crapouillou.net> In-Reply-To: <20190724171615.20774-1-paul@crapouillou.net> References: <20190724171615.20774-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-v15: 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