From patchwork Wed Oct 19 09:59:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 78210 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp159894qge; Wed, 19 Oct 2016 03:01:24 -0700 (PDT) X-Received: by 10.98.48.69 with SMTP id w66mr9894942pfw.0.1476871283968; Wed, 19 Oct 2016 03:01:23 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id e128si39659208pfg.201.2016.10.19.03.01.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 03:01:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwnfU-0007uR-C8; Wed, 19 Oct 2016 10:00:16 +0000 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwnf2-0007Hu-DM for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2016 09:59:50 +0000 Received: by mail-lf0-x22f.google.com with SMTP id b81so16261862lfe.1 for ; Wed, 19 Oct 2016 02:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UfvTc4kW1wY9/O9DDtWZ//RLrTotLhM5AnCqiGT9Zoc=; b=bvfgFuU2AFYoaSI5ZgdotXTpTzql/ih9lfTipyjnNML+HASoz06V3k7c71gum3DSl1 hBHmfvmKy1xAQSawGjmslq09q83vdFs2HHJfBP7zHPYV+Q8YzmrLfsmdhOEfVgUSPV/3 BAexd8ZJbONu8Q7+f+7p2i6iFC+dJtRVJTnwg= 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:in-reply-to :references; bh=UfvTc4kW1wY9/O9DDtWZ//RLrTotLhM5AnCqiGT9Zoc=; b=WzvVysmYCbHK6NJCIJWH46o8c63xEZLo2/JVu0VXl4sWnRLmaft8erpU/6gusyhwXM QvyMiXkXKo+43bpXTZKYn/gb/n9yZ+fiHlexpPPkOwhzE+N3qAec2NEAiuM1yeSU4JFq wChCfgpdhbg8dc6wcrprBCCRtJIG/LELNv5KFsiOShrR4HybJ3mi5bLJLupoF8pCH/xQ oH9zslVNKTkeUZdMvK1QvzljeuLVVEHq/P/+LjWE2b0lqGKs2/8fCF5bM0fODTBmiHMS Mnmx4gf7dfXqD+OLpgsdguBF53r9xSEO7xLvzwGvjjCKdtHFYmR5fx0rialIFfGuf1ue TFrw== X-Gm-Message-State: AA6/9RljUTar11j1+u4k/6IgC+3uH9nIxoiU9xqRtuOz5I9mFFyuvHVr3UNzvuq6yl9PuPdv X-Received: by 10.25.99.85 with SMTP id x82mr4076688lfb.105.1476871166232; Wed, 19 Oct 2016 02:59:26 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id h88sm10301633lfi.6.2016.10.19.02.59.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 02:59:25 -0700 (PDT) From: Linus Walleij To: "Rafael J . Wysocki" , Viresh Kumar Subject: [PATCH 2/5] ARM: dts: Add Integrator/AP cpus node and operating points Date: Wed, 19 Oct 2016 11:59:11 +0200 Message-Id: <1476871154-32243-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476871154-32243-1-git-send-email-linus.walleij@linaro.org> References: <1476871154-32243-1-git-send-email-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161019_025948_711975_4AF45C0F X-CRM114-Status: GOOD ( 16.80 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-pm@vger.kernel.org, Linus Walleij , "Rafael J . Wysocki" , Russell King , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This adds the cpus node to the Integrator/AP device tree so that we have a proper placeholder to put in the DT-defined operating points for the generic DT/OPP cpufreq driver, along with the proper operating points. The old Integrator cpufreq driver would resolve the max frequency to 71MHz, and the min frequency to 12 MHz, but the clock driver can actually handle any frequency inbetween so I picked a few select frequencies as OPPs. The cpufreq framework doesn't seem to deal with sliding frequency scales, only fixed points so 7 OPPs is better than 2 atleast. We define a CPU node since this is required for cpufreq-dt, however we do not define any compatible string for the CPU since this architecture has pluggable CPU modules and we do not know which one will be used. If necessary, the CPU compatible can be filled in by the boot loader, but for just cpufreq-dt it is not required. Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Russell King Signed-off-by: Linus Walleij --- arch/arm/boot/dts/integratorap.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts index 6f16d09dc5a4..e8b249f92fb3 100644 --- a/arch/arm/boot/dts/integratorap.dts +++ b/arch/arm/boot/dts/integratorap.dts @@ -10,6 +10,41 @@ compatible = "arm,integrator-ap"; dma-ranges = <0x80000000 0x0 0x80000000>; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + /* + * Since the board has pluggable CPU modules, we + * cannot define a proper compatible here. Let the + * boot loader fill in the apropriate compatible + * string if necessary. + */ + /* compatible = "arm,arm926ej-s"; */ + reg = <0>; + /* + * The documentation in ARM DUI 0138E page 3-12 states + * that the maximum frequency for this clock is 200 MHz + * but painful trial-and-error has proved to me that it + * is actually just hanging the system above 71 MHz. + * Sad but true. + */ + /* kHz uV */ + operating-points = <71000 0 + 66000 0 + 60000 0 + 48000 0 + 36000 0 + 24000 0 + 12000 0>; + clocks = <&cmosc>; + clock-names = "cpu"; + clock-latency = <1000000>; /* 1 ms */ + }; + }; + aliases { arm,timer-primary = &timer2; arm,timer-secondary = &timer1;