From patchwork Fri May 22 20:41:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 48911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E708821411 for ; Fri, 22 May 2015 20:41:38 +0000 (UTC) Received: by lagv1 with SMTP id v1sf8118807lag.1 for ; Fri, 22 May 2015 13:41:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=LHyfX0Kqy8eVxGpJcD3tFCAcL8z/IX7c60dDtMGe41A=; b=au8j0pQvA3SpyV5OyiQ8Bhc42eNDKITOiqBZH1mLpl6QQGOrGHka2UEo4lkxt5g2HF yIxEVSgyY7NqdFhjjMrDJWaG/jtsEGPpJQIxGHslhzSR1dlsN5R9zDaBqZQSz1JXhIeH cbV0ohVYsKi5dohGXRpIuv19Ox3m/MwS8p1JDqkeFwMH/iNLVaReere7itCiuOSOPXZY eWCHlHR7LbuaXH9RfimP1ivWbe6OP6YEwP3FTjnibyRa0cVcj8ilKGnTZfuayKEIVeH1 0eZ+jr/VgQihQ6bV5WQeg50QVflWRNxR6vxYXBCP/lZN5BBWSyioEIz6Yz0zQuWjhxMK RZ1Q== X-Gm-Message-State: ALoCoQmh6es/0HVKYyqqEjFZ05Du+KAEvAUFePsh+3qVPpj1LKP7YWDoJ4ui0Dw/Ox6zc9TN0A/4 X-Received: by 10.180.12.77 with SMTP id w13mr5509763wib.4.1432327297874; Fri, 22 May 2015 13:41:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.130 with SMTP id ay2ls625262lab.89.gmail; Fri, 22 May 2015 13:41:37 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr7719462lac.41.1432327297715; Fri, 22 May 2015 13:41:37 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id 3si2179179lav.0.2015.05.22.13.41.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 13:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbqq2 with SMTP id qq2so20405210lbb.3 for ; Fri, 22 May 2015 13:41:36 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr8015425laa.106.1432327296773; Fri, 22 May 2015 13:41:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp111637lbb; Fri, 22 May 2015 13:41:35 -0700 (PDT) X-Received: by 10.180.7.169 with SMTP id k9mr10950072wia.70.1432327295160; Fri, 22 May 2015 13:41:35 -0700 (PDT) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com. [74.125.82.42]) by mx.google.com with ESMTPS id qn7si5504492wjc.202.2015.05.22.13.41.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 13:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; Received: by wgez8 with SMTP id z8so27939751wge.0 for ; Fri, 22 May 2015 13:41:34 -0700 (PDT) X-Received: by 10.181.13.5 with SMTP id eu5mr10401910wid.37.1432327294895; Fri, 22 May 2015 13:41:34 -0700 (PDT) Received: from scallop.lan (cpc4-aztw19-0-0-cust71.18-1.cable.virginm.net. [82.33.25.72]) by mx.google.com with ESMTPSA id g11sm4759204wjr.25.2015.05.22.13.41.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 13:41:34 -0700 (PDT) From: Daniel Thompson To: Mike Turquette , Stephen Boyd Cc: Daniel Thompson , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Maxime Coquelin , Kamil Lulko , Andreas Farber , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [RFC PATCH 1/3] dt-bindings: Document the STM32F4 clock bindings Date: Fri, 22 May 2015 21:41:11 +0100 Message-Id: <1432327273-6810-2-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1432327273-6810-1-git-send-email-daniel.thompson@linaro.org> References: <1432327273-6810-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This adds documentation of device tree bindings for the clock related portions of the STM32 RCC block. Signed-off-by: Daniel Thompson --- .../devicetree/bindings/clock/st,stm32-rcc.txt | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/st,stm32-rcc.txt diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt new file mode 100644 index 0000000..9715d09 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt @@ -0,0 +1,65 @@ +STMicroelectronics STM32 Reset and Clock Controller +=================================================== + +The RCC IP is both a reset and a clock controller. This documentation only +describes the clock part. + +Please also refer to clock-bindings.txt in this directory for common clock +controller binding usage. + +Required properties: +- compatible: Should be "st,stm32f42xx-rcc" +- reg: should be register base and length as documented in the + datasheet +- #clock-cells: 2, device nodes should specify the clock in their "clocks" + property, containing a phandle to the clock device node, an index selecting + between gated clocks and other clocks and an index specifying the clock to + use. + +Example: + + rcc: rcc@40023800 { + #clock-cells = <2> + compatible = "st,stm32f42xx-rcc", "st,stm32-rcc"; + reg = <0x40023800 0x400>; + }; + +Specifying gated clocks +======================= + +The primary index must be set to 0. + +The secondary index is the bit number within the RCC register bank, starting +from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30). + +It is calculated as: index = register_offset / 4 * 32 + bit_offset. +Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31). + +Example: + + /* Gated clock, AHB1 bit 0 (GPIOA) */ + ... { + clocks = <&rcc 0 0> + }; + + /* Gated clock, AHB2 bit 4 (GPIOA) */ + ... { + clocks = <&rcc 0 36> + }; + +Specifying other clocks +======================= + +The primary index must be set to 1. + +The secondary index is bound with the following magic numbers: + + 0 SYSTICK + 1 FCLK + +Example: + + /* Misc clock, FCLK */ + ... { + clocks = <&rcc 1 1> + };