From patchwork Thu Aug 22 17:24:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 172049 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1202218ily; Thu, 22 Aug 2019 10:34:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNKG+M7QsGkh/Y0BX0R2IxJsQolDG0U0Ll9ugT7xLFCa/rNvVEi9xFqHGOkXhTDcg8cgHQ X-Received: by 2002:a17:90a:981:: with SMTP id 1mr823897pjo.37.1566495293184; Thu, 22 Aug 2019 10:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566495293; cv=none; d=google.com; s=arc-20160816; b=eirP0wNKg1ehSSdyPwvYFxCm+hRdOvLIgiYwSetOYXtPfMVB3/Ann32oZw0pshpXJI 6GBN6O9YQdw45qhc3kblxkd72ZvHqcALFWtD0BBi38tU4DNyLuDF2PdS61SL+jYotvS6 g1Grz1vie0YqcRc9lpg/d6Ypa3LZvUrM90hS7yIrAMUv3Boln2tE/dEny3kIBglnXXci WnEq3z5kDdDHaF7tbDAHZBG5ypkjfe53JxrrSMsYs+3yUdstFfhpYTj9v01QVtWverGw ssXzRcweGrhRDIKLHj1Kh2+f/5BH39dpNKz+miTr6hLUFIUfLOp5WqEhQk/jAVjlqx5P YP9A== 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; bh=4VJ7+eggnKxYH2N0PnRfeuJyPXUuAJBSdiDZgTqLZv8=; b=qjFiRMiIjeVO7sLt06hc7e0bv6oD23ClDNY7Ijq+Whb4rMHs748OiXQkgDAqaubWBQ rkrJu909y/P6+91m2aSGE+0u/o/+XsUX8t7XdMamhvchERNm36yuDgW1dyikdTWIcH0T sYfW+7+e15/QJtWvRoUuWHqzNxXXzakwCdShCIBGr7SwiQiMXtotdiBLevaAP0IfNQWQ WfriKENLwlARgb6fSeKNsyaWhK4TUEsrAK/kM/kBOX5EaW57Fag21F7Qntd11DzUcyo1 Kj6gRzZQccU6DfKKAOv5XLIrzSSzKfUfKwm+oLMDhUlM931XQ640uo29d564LAsoYbNa u/gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kyonfJHK; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 l28si17160868pgm.311.2019.08.22.10.34.52; Thu, 22 Aug 2019 10:34:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=kyonfJHK; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S2404358AbfHVRZP (ORCPT + 8 others); Thu, 22 Aug 2019 13:25:15 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33625 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404352AbfHVRZN (ORCPT ); Thu, 22 Aug 2019 13:25:13 -0400 Received: by mail-pf1-f193.google.com with SMTP id g2so4414955pfq.0 for ; Thu, 22 Aug 2019 10:25: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=4VJ7+eggnKxYH2N0PnRfeuJyPXUuAJBSdiDZgTqLZv8=; b=kyonfJHKuK/E6j2MRzxCmxx4coP7bGJnrOU42Sm2oOPkZNcsX0L4WVubuBDVJYZKjp mIVpPFfwI87IioISbpPuSB/xccfRQSg9nb8at9cpak1clVgOySHupADxL/HwZxZ1aPXX bixArWk00EDkBgH0XvabCNekeaQIX12lFtACbkWev5dTnZHIhIpXi5wOpF7P4GSJJ0X5 wSDpm2MRosgNhczwnHOiDOeDFZZdBV+7qd+wN8I4kn2oKAiiG0ZgaBVXtd343PyhPzn1 Py0V7XvbOB1ST0AvAAdAlQVsR0ra0iyTfcQX62huH8a/Z0oAO3mzBTf4Kby2cHG3q/Pn RS3A== 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=4VJ7+eggnKxYH2N0PnRfeuJyPXUuAJBSdiDZgTqLZv8=; b=il5ESp2Cg8EBC33zcChjJ/jF9CSDJY2k6wkxROfFG+7Gsw2z6BEq2I7fDXR+ZPHw9/ gdDbrRg3S6hu4Xj67vz7NG3PJ8anIvUP7hY8takFd1vg61GlVtBUeFE2TfNPzeabB17M Ms9jGPG6xxNs2cMPcF1jJRvnG7aawNlVN1Pq244SrQ7cUygUcK/gwG8eNRVf6fmmJowH GNDn/DvzKZR12cX89TTw7XmWAXzCdcdtmJplnLxxSFuWSTf63Z66X97WTlJag78SYV8W uZcwlbdkRRLL80rp5Co70Iaq0KbJBd3wyIEC2aGeDivtuIbaYY3xNlC0wO387zu4uw6n 7SDg== X-Gm-Message-State: APjAAAXqeKQqqEQlm3Z2VZf7MOpNKfOC2akTvWldE61nV4xv0Rtg9dsR o9EmGBzkhoQMgANzBkdOgG77 X-Received: by 2002:a65:6415:: with SMTP id a21mr308493pgv.98.1566494712055; Thu, 22 Aug 2019 10:25:12 -0700 (PDT) Received: from localhost.localdomain ([2405:204:71cc:5738:24ad:193e:4b59:8a76]) by smtp.gmail.com with ESMTPSA id r12sm31705798pgb.73.2019.08.22.10.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2019 10:25:11 -0700 (PDT) From: Manivannan Sadhasivam To: sboyd@kernel.org, mturquette@baylibre.com, robh+dt@kernel.org Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, haitao.suo@bitmain.com, darren.tsao@bitmain.com, fisher.cheng@bitmain.com, alec.lin@bitmain.com, Manivannan Sadhasivam Subject: [PATCH v4 4/8] dt-bindings: clock: Add devicetree binding for BM1880 SoC Date: Thu, 22 Aug 2019 22:54:22 +0530 Message-Id: <20190822172426.25879-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822172426.25879-1-manivannan.sadhasivam@linaro.org> References: <20190822172426.25879-1-manivannan.sadhasivam@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add YAML devicetree binding for Bitmain BM1880 SoC. Signed-off-by: Manivannan Sadhasivam --- .../bindings/clock/bitmain,bm1880-clk.yaml | 74 +++++++++++++++++ include/dt-bindings/clock/bm1880-clock.h | 82 +++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/bitmain,bm1880-clk.yaml create mode 100644 include/dt-bindings/clock/bm1880-clock.h -- 2.17.1 diff --git a/Documentation/devicetree/bindings/clock/bitmain,bm1880-clk.yaml b/Documentation/devicetree/bindings/clock/bitmain,bm1880-clk.yaml new file mode 100644 index 000000000000..31c48dcf5b8e --- /dev/null +++ b/Documentation/devicetree/bindings/clock/bitmain,bm1880-clk.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: GPL-2.0+ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/clock/bitmain,bm1880-clk.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bitmain BM1880 Clock Controller + +maintainers: + - Manivannan Sadhasivam + +description: | + The Bitmain BM1880 clock controller generates and supplies clock to + various peripherals within the SoC. + + This binding uses common clock bindings + [1] Documentation/devicetree/bindings/clock/clock-bindings.txt + +properties: + compatible: + const: bitmain,bm1880-clk + + reg: + items: + - description: pll registers + - description: system registers + + reg-names: + items: + - const: pll + - const: sys + + clocks: + maxItems: 1 + + clock-names: + const: osc + + '#clock-cells': + const: 1 + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - '#clock-cells' + +examples: + # Clock controller node: + - | + clk: clock-controller@e8 { + compatible = "bitmain,bm1880-clk"; + reg = <0xe8 0x0c>, <0x800 0xb0>; + reg-names = "pll", "sys"; + clocks = <&osc>; + clock-names = "osc"; + #clock-cells = <1>; + }; + + # Example UART controller node that consumes clock generated by the clock controller: + - | + uart0: serial@58018000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x58018000 0x0 0x2000>; + clocks = <&clk 45>, <&clk 46>; + clock-names = "baudclk", "apb_pclk"; + interrupts = <0 9 4>; + reg-shift = <2>; + reg-io-width = <4>; + }; + +... diff --git a/include/dt-bindings/clock/bm1880-clock.h b/include/dt-bindings/clock/bm1880-clock.h new file mode 100644 index 000000000000..b46732361b25 --- /dev/null +++ b/include/dt-bindings/clock/bm1880-clock.h @@ -0,0 +1,82 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Device Tree binding constants for Bitmain BM1880 SoC + * + * Copyright (c) 2019 Linaro Ltd. + */ + +#ifndef __DT_BINDINGS_CLOCK_BM1880_H +#define __DT_BINDINGS_CLOCK_BM1880_H + +#define BM1880_CLK_OSC 0 +#define BM1880_CLK_MPLL 1 +#define BM1880_CLK_SPLL 2 +#define BM1880_CLK_FPLL 3 +#define BM1880_CLK_DDRPLL 4 +#define BM1880_CLK_A53 5 +#define BM1880_CLK_50M_A53 6 +#define BM1880_CLK_AHB_ROM 7 +#define BM1880_CLK_AXI_SRAM 8 +#define BM1880_CLK_DDR_AXI 9 +#define BM1880_CLK_EFUSE 10 +#define BM1880_CLK_APB_EFUSE 11 +#define BM1880_CLK_AXI5_EMMC 12 +#define BM1880_CLK_EMMC 13 +#define BM1880_CLK_100K_EMMC 14 +#define BM1880_CLK_AXI5_SD 15 +#define BM1880_CLK_SD 16 +#define BM1880_CLK_100K_SD 17 +#define BM1880_CLK_500M_ETH0 18 +#define BM1880_CLK_AXI4_ETH0 19 +#define BM1880_CLK_500M_ETH1 20 +#define BM1880_CLK_AXI4_ETH1 21 +#define BM1880_CLK_AXI1_GDMA 22 +#define BM1880_CLK_APB_GPIO 23 +#define BM1880_CLK_APB_GPIO_INTR 24 +#define BM1880_CLK_GPIO_DB 25 +#define BM1880_CLK_AXI1_MINER 26 +#define BM1880_CLK_AHB_SF 27 +#define BM1880_CLK_SDMA_AXI 28 +#define BM1880_CLK_SDMA_AUD 29 +#define BM1880_CLK_APB_I2C 30 +#define BM1880_CLK_APB_WDT 31 +#define BM1880_CLK_APB_JPEG 32 +#define BM1880_CLK_JPEG_AXI 33 +#define BM1880_CLK_AXI5_NF 34 +#define BM1880_CLK_APB_NF 35 +#define BM1880_CLK_NF 36 +#define BM1880_CLK_APB_PWM 37 +#define BM1880_CLK_DIV_0_RV 38 +#define BM1880_CLK_DIV_1_RV 39 +#define BM1880_CLK_MUX_RV 40 +#define BM1880_CLK_RV 41 +#define BM1880_CLK_APB_SPI 42 +#define BM1880_CLK_TPU_AXI 43 +#define BM1880_CLK_DIV_UART_500M 44 +#define BM1880_CLK_UART_500M 45 +#define BM1880_CLK_APB_UART 46 +#define BM1880_CLK_APB_I2S 47 +#define BM1880_CLK_AXI4_USB 48 +#define BM1880_CLK_APB_USB 49 +#define BM1880_CLK_125M_USB 50 +#define BM1880_CLK_33K_USB 51 +#define BM1880_CLK_DIV_12M_USB 52 +#define BM1880_CLK_12M_USB 53 +#define BM1880_CLK_APB_VIDEO 54 +#define BM1880_CLK_VIDEO_AXI 55 +#define BM1880_CLK_VPP_AXI 56 +#define BM1880_CLK_APB_VPP 57 +#define BM1880_CLK_DIV_0_AXI1 58 +#define BM1880_CLK_DIV_1_AXI1 59 +#define BM1880_CLK_AXI1 60 +#define BM1880_CLK_AXI2 61 +#define BM1880_CLK_AXI3 62 +#define BM1880_CLK_AXI4 63 +#define BM1880_CLK_AXI5 64 +#define BM1880_CLK_DIV_0_AXI6 65 +#define BM1880_CLK_DIV_1_AXI6 66 +#define BM1880_CLK_MUX_AXI6 67 +#define BM1880_CLK_AXI6 68 +#define BM1880_NR_CLKS 69 + +#endif /* __DT_BINDINGS_CLOCK_BM1880_H */