From patchwork Wed May 14 11:36:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 30160 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8F882055D for ; Wed, 14 May 2014 11:37:11 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id uy17sf4645641igb.7 for ; Wed, 14 May 2014 04:37:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=5ek/dYuDn//9CMGedsVimMEGawQyH0BHyGD5zdSy+i4=; b=dRd3/oWQg9+DqbKeDeJJVCrrHi/qK5trrkL1MEZuQJ0yXd43HkVznE4xio8hMl4KEg iZP8JsOhAGUCqUBeIq1V9eCaUXL5wSzCRfWckNfmhXYOJm0JoTWUu2+xDza/UVK0mCjB U96br7QC3ktfUU0IDvh2UwjLLQ3ka8DluYkuGPJ0jiMXtdL98pw0pFmL4O81NhOzcAna sxcVP86NtmBrivmeagnZfv1cKpkeW/HH7lA7PFP5mMcznzcSS8B5XrlSZcwhS3qzGTmp pLF4g3HUINgUcbY2sQ6lfq8anS4KPJv3cM0GYCjvjCXuQgWQUyHoAbc7h/fNZP+jzvei 9S5Q== X-Gm-Message-State: ALoCoQnF/SCg9Z3r9JPG9pLPAVKtxRmQCQYp7iYYEFUIXnTkyrPZfRbilypvnFepxygNnqCNluAS X-Received: by 10.182.137.233 with SMTP id ql9mr1396677obb.46.1400067431145; Wed, 14 May 2014 04:37:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.171 with SMTP id 40ls1867292qgt.85.gmail; Wed, 14 May 2014 04:37:11 -0700 (PDT) X-Received: by 10.221.7.71 with SMTP id on7mr2767025vcb.18.1400067430995; Wed, 14 May 2014 04:37:10 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id tb2si280274vdc.75.2014.05.14.04.37.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 04:37:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id hy4so2181154vcb.25 for ; Wed, 14 May 2014 04:37:10 -0700 (PDT) X-Received: by 10.220.167.2 with SMTP id o2mr2760239vcy.8.1400067430915; Wed, 14 May 2014 04:37:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp232567vcb; Wed, 14 May 2014 04:37:10 -0700 (PDT) X-Received: by 10.68.226.197 with SMTP id ru5mr3678518pbc.77.1400067430051; Wed, 14 May 2014 04:37:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dh1si816979pbc.456.2014.05.14.04.37.09; Wed, 14 May 2014 04:37:09 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754939AbaENLhI (ORCPT + 6 others); Wed, 14 May 2014 07:37:08 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:44683 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751442AbaENLhH (ORCPT ); Wed, 14 May 2014 07:37:07 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4EBafZv009471; Wed, 14 May 2014 06:36:41 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4EBaeWM016368; Wed, 14 May 2014 06:36:40 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 14 May 2014 06:36:40 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4EBacWi008284; Wed, 14 May 2014 06:36:38 -0500 From: Sekhar Nori To: Tony Lindgren , Benoit Cousson CC: Linux OMAP Mailing List , Linux ARM Mailing List , Device Tree Mailing List , Tero Kristo Subject: [PATCH] ARM: dts: AM4372: clk: efuse based crystal frequency detect Date: Wed, 14 May 2014 17:06:37 +0530 Message-ID: <062e8a534b1e372db7ed3daa3df7e3c5b885ffab.1400062517.git.nsekhar@ti.com> X-Mailer: git-send-email 1.7.10.1 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nsekhar@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Afzal Mohammed Currently oscillator frequency is determined based on sysboot settings, it may not be the case always. To determine it properly, efuse settings also has to be read. CONTROL_STATUS register holds this information. Bit 31: if 0, frequency to be determined based on sysboot if 1, frequency to be determined based on efuse Bit 29,30 - for efuse detection of frequency Bit 22,23 - for sysboot detection of frequency Add clock nodes (mux) to determine oscillator frequency as above. Signed-off-by: Afzal Mohammed Acked-by: Tero Kristo Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/am43xx-clocks.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi index 142009c..71b029c 100644 --- a/arch/arm/boot/dts/am43xx-clocks.dtsi +++ b/arch/arm/boot/dts/am43xx-clocks.dtsi @@ -11,6 +11,22 @@ sys_clkin_ck: sys_clkin_ck { #clock-cells = <0>; compatible = "ti,mux-clock"; + clocks = <&sysboot_freq_sel_ck>, <&crystal_freq_sel_ck>; + ti,bit-shift = <31>; + reg = <0x0040>; + }; + + crystal_freq_sel_ck: crystal_freq_sel_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>; + ti,bit-shift = <29>; + reg = <0x0040>; + }; + + sysboot_freq_sel_ck: sysboot_freq_sel_ck@44e10040 { + #clock-cells = <0>; + compatible = "ti,mux-clock"; clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>; ti,bit-shift = <22>; reg = <0x0040>;