From patchwork Sat Mar 17 10:09:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 131959 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp489619ljb; Sat, 17 Mar 2018 03:11:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELuvhG1Y7y8ycBRC+XG4ERWDxbk2e3YP3MbZk+z9FrZ8z4lQ2MJzVG0IeImmF5CtiUM0WVIz X-Received: by 2002:a17:902:a981:: with SMTP id bh1-v6mr5284571plb.255.1521281484092; Sat, 17 Mar 2018 03:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521281484; cv=none; d=google.com; s=arc-20160816; b=tIi99J1FNk/VEAfV5J7WdLp5p0ZbEs9S/nWbKO/Pb6aOzPVZFeCpFtL54OAa0quiDq ZpKEeWdxy2ER4JThWQwFa4YfsXf9yOeCtk9FCeHd2AGJZfn1wgUkf/B4o2JMH1JP2HjA zEsAQFP+P+HtMCe8II5QG2gb6Q7cTKKWsGThwRsJ7WY6I/YOmowLnpahoh42t2YcdCZC 5DHbMBmUcYYJN4v6szeBUkRuRKPZLLLjTtXiwEloBYYbFrYVYmVW6qIUeXqi2UqRku8/ n6/kUWqDxqLbLRWnp44adWiTShS9mVWwVv12u84ceIzorbi/5AEs5xGapC3XgSdhjRXD k0OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=GrFMhbR7yKiv60oRzhy3QPFqVk1Xitp7DmvnvpUrF60=; b=CEVerAYgL4vgbwKTtCH6dJvKZ2Yk0Y6WCnXBgAsI7yCecr/+VG7vd7wC5o40H5rDsQ H5jYjJeRaGvedwm1eRg73u3H7nFuOEtdxr9cLiot7SBIo7uYz6vZ6JnfdmJRe23SH8ct +j6kVdCrZrq+XNKZPMbWXJbcipPH1TGq3jcBa0zXJv+UJPtp1Xh5bOviorG+qwS5ykIn USJgKtY1/96gqTTK+dm77aubovjKiie54e/AhKx9EjwQhQ7lxMvvvyrPVfbuHaedEu4o Gjb6hHPaSRBViDPn9If/ESESghVsjVoX7QHgGEe8Qhl/teYonJgS2ZiejdZMw/C/vZI9 tLmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ac3/74pB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si725002plk.567.2018.03.17.03.11.23; Sat, 17 Mar 2018 03:11:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ac3/74pB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752290AbeCQKLQ (ORCPT + 28 others); Sat, 17 Mar 2018 06:11:16 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32988 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752172AbeCQKLN (ORCPT ); Sat, 17 Mar 2018 06:11:13 -0400 Received: by mail-pf0-f193.google.com with SMTP id q13so5159511pff.0 for ; Sat, 17 Mar 2018 03:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GrFMhbR7yKiv60oRzhy3QPFqVk1Xitp7DmvnvpUrF60=; b=ac3/74pBfdFG2H1keFpjsxQjkeT/SdALmAYFVGDXhcAUgIHNEQsI7Ibhox93fRph5j gXZddn/ctisYYEZI8nbZcemLXp1nTbN5rG2kPCpX/j+bCyeApfcF3oyoUp+KHibzvK7w 578JMcXnH6PVBf5gtAk62UQcQTZDCLFvhVHRw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GrFMhbR7yKiv60oRzhy3QPFqVk1Xitp7DmvnvpUrF60=; b=YWaeu/Xm/czJ4U9q1Fz++rGRnXSkR2XfmnRk4x3BiZ5sSEk/+a8GyUXj2BkzDD6XwV M5qCBcjdsGH/yhsZP7CPNXvHT7qIgUdPV0FasPPoD59TdJQuGH5w++Cqpm2pB8fsjMZJ IzchRG2J2R2iDidGW9pXLfhO/ZvuitBRlK89ZCp93l2gMoPq/JzFw7wbzAPa3nS7Woe5 m4X5QTsYS/UTYWbQt6bKFrfP57BFiUBEMnXrI8Q99ti/kPDIgNeUCV/nF3bFQVdKa20g pvYZIG+neLMPN9Lw+Af/pb0RhF6grFH8rC8482oZYcFrtF80TY+50NtnygYC/UOE9T/P ho4w== X-Gm-Message-State: AElRT7F8cUJDTlkYcjpp6z+VnvjvEJmL42V4guv2ouaYpQ4GTyOPYssF O8P3USmHVt1QqAwdl4NO9//u X-Received: by 10.101.70.203 with SMTP id n11mr4083088pgr.166.1521281472331; Sat, 17 Mar 2018 03:11:12 -0700 (PDT) Received: from mani-Aspire-E5-573.domain.name ([171.49.203.57]) by smtp.gmail.com with ESMTPSA id i27sm3771625pfj.123.2018.03.17.03.11.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Mar 2018 03:11:11 -0700 (PDT) From: Manivannan Sadhasivam To: mturquette@baylibre.com, sboyd@kernel.org, afaerber@suse.de, robh+dt@kernel.org, mark.rutland@arm.com Cc: liuwei@actions-semi.com, mp-cs@actions-semi.com, 96boards@ucrobotics.com, devicetree@vger.kernel.org, davem@davemloft.net, mchehab@kernel.org, daniel.thompson@linaro.org, amit.kucheria@linaro.org, viresh.kumar@linaro.org, hzhang@ucrobotics.com, bdong@ucrobotics.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, manivannanece23@gmail.com, Manivannan Sadhasivam Subject: [PATCH v5 01/12] dt-bindings: clock: Add Actions S900 clock bindings Date: Sat, 17 Mar 2018 15:39:41 +0530 Message-Id: <20180317100952.28538-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180317100952.28538-1-manivannan.sadhasivam@linaro.org> References: <20180317100952.28538-1-manivannan.sadhasivam@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add Actions Semi S900 clock bindings. Signed-off-by: Manivannan Sadhasivam Acked-by: Rob Herring --- .../devicetree/bindings/clock/actions,s900-cmu.txt | 47 ++++++++ include/dt-bindings/clock/actions,s900-cmu.h | 129 +++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-cmu.txt create mode 100644 include/dt-bindings/clock/actions,s900-cmu.h -- 2.14.1 diff --git a/Documentation/devicetree/bindings/clock/actions,s900-cmu.txt b/Documentation/devicetree/bindings/clock/actions,s900-cmu.txt new file mode 100644 index 000000000000..93e4fb827cd6 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/actions,s900-cmu.txt @@ -0,0 +1,47 @@ +* Actions S900 Clock Management Unit (CMU) + +The Actions S900 clock management unit generates and supplies clock to various +controllers within the SoC. The clock binding described here is applicable to +S900 SoC. + +Required Properties: + +- compatible: should be "actions,s900-cmu" +- reg: physical base address of the controller and length of memory mapped + region. +- clocks: Reference to the parent clocks ("hosc", "losc") +- #clock-cells: should be 1. + +Each clock is assigned an identifier, and client nodes can use this identifier +to specify the clock which they consume. + +All available clocks are defined as preprocessor macros in +dt-bindings/clock/actions,s900-cmu.h header and can be used in device +tree sources. + +External clocks: + +The hosc clock used as input for the plls is generated outside the SoC. It is +expected that it is defined using standard clock bindings as "hosc". + +Actions S900 CMU also requires one more clock: + - "losc" - internal low frequency oscillator + +Example: Clock Management Unit node: + + cmu: clock-controller@e0160000 { + compatible = "actions,s900-cmu"; + reg = <0x0 0xe0160000 0x0 0x1000>; + clocks = <&hosc>, <&losc>; + #clock-cells = <1>; + }; + +Example: UART controller node that consumes clock generated by the clock +management unit: + + uart: serial@e012a000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe012a000 0x0 0x2000>; + interrupts = ; + clocks = <&cmu CLK_UART5>; + }; diff --git a/include/dt-bindings/clock/actions,s900-cmu.h b/include/dt-bindings/clock/actions,s900-cmu.h new file mode 100644 index 000000000000..7c1251565f43 --- /dev/null +++ b/include/dt-bindings/clock/actions,s900-cmu.h @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Device Tree binding constants for Actions Semi S900 Clock Management Unit +// +// Copyright (c) 2014 Actions Semi Inc. +// Copyright (c) 2018 Linaro Ltd. + +#ifndef __DT_BINDINGS_CLOCK_S900_CMU_H +#define __DT_BINDINGS_CLOCK_S900_CMU_H + +#define CLK_NONE 0 + +/* fixed rate clocks */ +#define CLK_LOSC 1 +#define CLK_HOSC 2 + +/* pll clocks */ +#define CLK_CORE_PLL 3 +#define CLK_DEV_PLL 4 +#define CLK_DDR_PLL 5 +#define CLK_NAND_PLL 6 +#define CLK_DISPLAY_PLL 7 +#define CLK_DSI_PLL 8 +#define CLK_ASSIST_PLL 9 +#define CLK_AUDIO_PLL 10 + +/* system clock */ +#define CLK_CPU 15 +#define CLK_DEV 16 +#define CLK_NOC 17 +#define CLK_NOC_MUX 18 +#define CLK_NOC_DIV 19 +#define CLK_AHB 20 +#define CLK_APB 21 +#define CLK_DMAC 22 + +/* peripheral device clock */ +#define CLK_GPIO 23 + +#define CLK_BISP 24 +#define CLK_CSI0 25 +#define CLK_CSI1 26 + +#define CLK_DE0 27 +#define CLK_DE1 28 +#define CLK_DE2 29 +#define CLK_DE3 30 +#define CLK_DSI 32 + +#define CLK_GPU 33 +#define CLK_GPU_CORE 34 +#define CLK_GPU_MEM 35 +#define CLK_GPU_SYS 36 + +#define CLK_HDE 37 +#define CLK_I2C0 38 +#define CLK_I2C1 39 +#define CLK_I2C2 40 +#define CLK_I2C3 41 +#define CLK_I2C4 42 +#define CLK_I2C5 43 +#define CLK_I2SRX 44 +#define CLK_I2STX 45 +#define CLK_IMX 46 +#define CLK_LCD 47 +#define CLK_NAND0 48 +#define CLK_NAND1 49 +#define CLK_PWM0 50 +#define CLK_PWM1 51 +#define CLK_PWM2 52 +#define CLK_PWM3 53 +#define CLK_PWM4 54 +#define CLK_PWM5 55 +#define CLK_SD0 56 +#define CLK_SD1 57 +#define CLK_SD2 58 +#define CLK_SD3 59 +#define CLK_SENSOR 60 +#define CLK_SPEED_SENSOR 61 +#define CLK_SPI0 62 +#define CLK_SPI1 63 +#define CLK_SPI2 64 +#define CLK_SPI3 65 +#define CLK_THERMAL_SENSOR 66 +#define CLK_UART0 67 +#define CLK_UART1 68 +#define CLK_UART2 69 +#define CLK_UART3 70 +#define CLK_UART4 71 +#define CLK_UART5 72 +#define CLK_UART6 73 +#define CLK_VCE 74 +#define CLK_VDE 75 + +#define CLK_USB3_480MPLL0 76 +#define CLK_USB3_480MPHY0 77 +#define CLK_USB3_5GPHY 78 +#define CLK_USB3_CCE 79 +#define CLK_USB3_MAC 80 + +#define CLK_TIMER 83 + +#define CLK_HDMI_AUDIO 84 + +#define CLK_24M 85 + +#define CLK_EDP 86 + +#define CLK_24M_EDP 87 +#define CLK_EDP_PLL 88 +#define CLK_EDP_LINK 89 + +#define CLK_USB2H0_PLLEN 90 +#define CLK_USB2H0_PHY 91 +#define CLK_USB2H0_CCE 92 +#define CLK_USB2H1_PLLEN 93 +#define CLK_USB2H1_PHY 94 +#define CLK_USB2H1_CCE 95 + +#define CLK_DDR0 96 +#define CLK_DDR1 97 +#define CLK_DMM 98 + +#define CLK_ETH_MAC 99 +#define CLK_RMII_REF 100 + +#define CLK_NR_CLKS (CLK_RMII_REF + 1) + +#endif /* __DT_BINDINGS_CLOCK_S900_CMU_H */