Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5696888ybi; Tue, 4 Jun 2019 10:36:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0ga98Ju5MFEotMoyL5+b4OiYd33azdo0hhQA8mql5ytDTrtCoY2wwd3cxI+uU9xxDTWgM X-Received: by 2002:a17:90a:ca14:: with SMTP id x20mr36638794pjt.98.1559669761878; Tue, 04 Jun 2019 10:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559669761; cv=none; d=google.com; s=arc-20160816; b=V2LXsgQBv/8xzivkMs0FdEfdxJSgVlyPhIuiSbloSn5RsSOFjGXzQyKCZ8sGZwITHl w1l2hxUXrVYspkgXVF4SqzuZzYF/BYuBFOUAocptE8Adh0ogfkzFGw3OHvBxMxmpYQ4r JHljA1TYFx8upAClE3Z+28lfj8/4pgY7hWbw7DLxy1SkoGsYrT0ZVOanc7EKlkIvGcdK iyWXIgYwR5+1GQv3SXkMHceK6CzG/DrDRofZUtQKD57uXVIvhGnQhPmLygJ1UGZ9+Bqg 3pcb7MxZ3vDDh93xz4uvrsXUcPDhYuDa24/5lec6tyOZHF7WUb4QSGCSGKdC69WTzaLD 6bHQ== 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 :message-id:date:subject:cc:to:from; bh=nL50hjzCAj99akG4h32338HCClEzPPtoJ9MdQUYN3ac=; b=0aIDbhgM76ReoR5MyU30rpBFX5avjYSeK1U6xPBf5e2xSLJWcma1xpsa5yjt+OBijL m+XJCC1kPZldhinwuiV+CRl+j43kDfLhSHnx2JG3aPlk+vHcyqqFI5161/5B+jN/6T+t 0LgjzbYKzNEdgKAbELVszITaAM0DAgYRKSXA+55SkYahn2IwZI60ak7kykeYnGU77YI6 xsyO9Qk50hLJhFCw3QHXxd2NmSSHnZIVOm8I1h4VfFo/bL4uWFKqs/RRm1zDPb4xAhaF 608C93SxC2MhSw1i8QMLIDi9FFerboxu4Sc1royp9NOBAVzPtowfNTqFBzp8Cn4OS765 vO8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j187si28604735pfb.132.2019.06.04.10.35.45; Tue, 04 Jun 2019 10:36:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbfFDRdp (ORCPT + 99 others); Tue, 4 Jun 2019 13:33:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:39300 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726092AbfFDRdo (ORCPT ); Tue, 4 Jun 2019 13:33:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F3163AE05; Tue, 4 Jun 2019 17:33:42 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, sboyd@kernel.org, eric@anholt.net, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, ptesarik@suse.com, ssuloev@orpaltech.com, linux-clk@vger.kernel.org, mturquette@baylibre.com, Nicolas Saenz Julienne , linux-kernel@vger.kernel.org Subject: [PATCH 0/4] cpufreq support for the Raspberry Pi Date: Tue, 4 Jun 2019 19:32:18 +0200 Message-Id: <20190604173223.4229-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.21.0 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 Hi all, this series aims at adding cpufreq support to the Raspberry Pi family of boards. The previous revision can be found at: https://lkml.org/lkml/2019/5/20/431 The series first factors out 'pllb' from clk-bcm2385 and creates a new clk driver that operates it over RPi's firmware interface[1]. We are forced to do so as the firmware 'owns' the pll and we're not allowed to change through the register interface directly as we might race with the over-temperature and under-voltage protections provided by the firmware. Next it creates a minimal cpufreq driver that populates the CPU's opp table, and registers cpufreq-dt. Which is needed as the firmware controls the max and min frequencies available. This was tested on a RPi3b+ and RPI2b which are the boards I have access to. Until this is tested broadly the cpufreq driver takes care of filtering out the rest of boards. That's all, kind regards, Nicolas [1] https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface --- Changes since RFC: - Addressed Viresh's comments in cpufreq driver - Addressed Stefan's comments in both cpufreq & clk drivers - Moved all firmware clk operations into it's own driver Nicolas Saenz Julienne (4): clk: bcm2835: remove pllb clk: bcm283x: add driver interfacing with Raspberry Pi's firmware clk: bcm2835: register Raspberry Pi's firmware clk device cpufreq: add driver for Raspbery Pi drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm2835.c | 40 ++-- drivers/clk/bcm/clk-raspberrypi.c | 316 ++++++++++++++++++++++++++ drivers/cpufreq/Kconfig.arm | 8 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/raspberrypi-cpufreq.c | 84 +++++++ 6 files changed, 423 insertions(+), 27 deletions(-) create mode 100644 drivers/clk/bcm/clk-raspberrypi.c create mode 100644 drivers/cpufreq/raspberrypi-cpufreq.c -- 2.21.0