From patchwork Sat May 30 07:54:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 49247 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8595222B40 for ; Sat, 30 May 2015 07:54:42 +0000 (UTC) Received: by wixv7 with SMTP id v7sf11926439wix.0 for ; Sat, 30 May 2015 00:54:41 -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=IijeI+hCAA2n2i8mde7rFAV6zB7Wu3ICVAxgXk3iNYBFLuBd+CvWv9GWXc0bWFvzeT Xh4Ro0jhPoxwoJqkCf4cjkcxtOW4ZL6p38bNxjTr3ZXIm3mIoZTz9kve4UzEppApQ8a9 wncvNpHDoi9O6orAdCEUBJxQHDDANZ+MrGpo+O8GjnYR835ZazBgsj4Q16esCFKAncsC WrU8jUAORaObrIFi1/FczEpojL9LgI9OLNHoX5BTXtVOmZLYB+ssc0MXsP62im37iKye qfxyoSp8UHZ6lvCBjZR7Q53XHKdG6POi4sx/V3J40jycB4E/W4yUujKcJwDEALqfSTdJ v/sw== X-Gm-Message-State: ALoCoQmtKzNyXZVmfW2YvGmuUoA0fKHS+zpN+1pPCrYgPhYSklRWAVxD0xgBlPpPqLB77JIh9giU X-Received: by 10.112.97.210 with SMTP id ec18mr10943486lbb.15.1432972481602; Sat, 30 May 2015 00:54:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.168 with SMTP id kz8ls372022lac.105.gmail; Sat, 30 May 2015 00:54:41 -0700 (PDT) X-Received: by 10.112.199.35 with SMTP id jh3mr11653634lbc.23.1432972481454; Sat, 30 May 2015 00:54:41 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id as7si6756592lbc.107.2015.05.30.00.54.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 May 2015 00:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbqq2 with SMTP id qq2so60526530lbb.3 for ; Sat, 30 May 2015 00:54:40 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr12073355lbc.32.1432972480655; Sat, 30 May 2015 00:54:40 -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 hn6csp885954lbb; Sat, 30 May 2015 00:54:39 -0700 (PDT) X-Received: by 10.180.96.167 with SMTP id dt7mr2819054wib.80.1432972478419; Sat, 30 May 2015 00:54:38 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com. [209.85.212.178]) by mx.google.com with ESMTPS id j5si7912399wiy.62.2015.05.30.00.54.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 May 2015 00:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.178 as permitted sender) client-ip=209.85.212.178; Received: by wivl4 with SMTP id l4so35601238wiv.1 for ; Sat, 30 May 2015 00:54:38 -0700 (PDT) X-Received: by 10.194.175.65 with SMTP id by1mr22996615wjc.152.1432972478184; Sat, 30 May 2015 00:54:38 -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 l6sm6441652wib.18.2015.05.30.00.54.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 May 2015 00:54:37 -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: [PATCH v2 2/4] dt-bindings: Document the STM32F4 clock bindings Date: Sat, 30 May 2015 08:54:06 +0100 Message-Id: <1432972448-10332-3-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1432972448-10332-1-git-send-email-daniel.thompson@linaro.org> References: <1432327273-6810-1-git-send-email-daniel.thompson@linaro.org> <1432972448-10332-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.172 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> + };