Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756082AbbGTTd3 (ORCPT ); Mon, 20 Jul 2015 15:33:29 -0400 Received: from gabe.freedesktop.org ([131.252.210.177]:50880 "EHLO gabe.freedesktop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752573AbbGTTdW (ORCPT ); Mon, 20 Jul 2015 15:33:22 -0400 From: Eric Anholt To: linux-arm-kernel@lists.infradead.org Cc: linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stephen Warren , Lee Jones , linux-clk@vger.kernel.org, Stephen Boyd , Mike Turquette , Eric Anholt Subject: [PATCH v4 1/8] clk: bcm2835: Add binding docs for the Raspberry Pi clock provider Date: Mon, 20 Jul 2015 12:33:00 -0700 Message-Id: <1437420787-32137-2-git-send-email-eric@anholt.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437420787-32137-1-git-send-email-eric@anholt.net> References: <1437420787-32137-1-git-send-email-eric@anholt.net> MIME-Version: 1.0 Content-Type: text/plain; =?ISO-8859-1?Q?=20charset=3D=14=14m?= Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3234 Lines: 91 The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). Signed-off-by: Eric Anholt Acked-by: Stephen Warren Acked-by: Lee Jones --- v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. v4: Mention 'clk' in the subject instead of the more generic dt/bindings. .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++++++++++++++++++++++ include/dt-bindings/clk/raspberrypi.h | 23 ++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 0000000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be "raspberrypi,bcm2835-firmware-clocks" + +- #clock-cells: Shall have value <1>. The permitted clock-specifier + values can be found in + include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware: Phandle to the firmware driver node. + +Example: + +firmware_clocks: firmware-clocks { + compatible = "raspberrypi,bcm2835-firmware-clocks"; + #clock-cells = <1>; + raspberrypi,firmware = <&firmware>; +}; diff --git a/include/dt-bindings/clk/raspberrypi.h b/include/dt-bindings/clk/raspberrypi.h new file mode 100644 index 0000000..ceec90f --- /dev/null +++ b/include/dt-bindings/clk/raspberrypi.h @@ -0,0 +1,23 @@ +#/* + * Copyright © 2015 Broadcom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _DT_BINDINGS_CLK_RASPBERRYPI_H +#define _DT_BINDINGS_CLK_RASPBERRYPI_H + +#define RPI_CLOCK_EMMC 1 +#define RPI_CLOCK_UART0 2 +#define RPI_CLOCK_ARM 3 +#define RPI_CLOCK_CORE 4 +#define RPI_CLOCK_V3D 5 +#define RPI_CLOCK_H264 6 +#define RPI_CLOCK_ISP 7 +#define RPI_CLOCK_SDRAM 8 +#define RPI_CLOCK_PIXEL 9 +#define RPI_CLOCK_PWM 10 + +#endif -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/