Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2386160iof; Wed, 8 Jun 2022 04:00:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu9xNF7Y2uiFYJfL9KGC6ZYb/A4sVSpP3G7C4jvOsuMQ5m4PIVrGhTqEkiRpzNcsyK/pSj X-Received: by 2002:a63:6985:0:b0:3fe:1929:7d6a with SMTP id e127-20020a636985000000b003fe19297d6amr5220653pgc.292.1654686053909; Wed, 08 Jun 2022 04:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654686053; cv=none; d=google.com; s=arc-20160816; b=BswGzhKXOTIwX2SioPm1IZW1lHWvx8ETD2VjgoPQwz2IDqKvmKxIQ1EfeTvyHEREtb X1Ba8E2v2PcC2gaQzSik3QtXEXJvNrh3hgdujlQxOEw/ICipLo3Dk7qieUfWBV+VfIcn 0Fm1o4HEt5dfbpFKLA46KQqufhW5wEeMJwMrBLOOnxwarfonGyQS6YpZF69+D27j0nmM rJnrT8yIr+rSgl0taeE6XgRq7YbUmuhTzTTCTr4a/aySUxhLkggMgpRoNY9KwLz1cfHN ffBD0yNfov/UrGFNsK0eU+HNlp1S4Hc+5JJSYvuId1L70Q3RWFsPeDEHLUg4If1dMoCT M4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jFSEDyre5fwQbiv14VZ3sCQeGHQ0mqtSOwgdiLx2IMY=; b=SBAYaKsXBldU/64EcBwjxGrOi9owEdKAr0heaBJf8vYYWUKg42eXG6XcqOP/gEpsUE 6MjZpYs4YYK2S69ulCkEXB/rdgtNwuldrvhU+Xyij+HKcQEIxtxdmd4ULyygjKxPqpNN 8OZY84A2K4LP9zBTknhqsEYad7O2LqyXMWvn2XAie8pSjl/vMCg1dlBDzk4+1Py0bTnP mKtPWzbk1/iuLj1aFhkHAc+KZF2ttCDX624VNRcda6MWyU11GBFH87cbt3ehufTqiX/7 EnUXFmDB2Pn4ssd3ri/JEqi+EeBb692j3LLpN/SE/IWOqHf7tWNyrmCscpXymrHaIv7d bBwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id iw19-20020a170903045300b0016252715440si26474998plb.494.2022.06.08.04.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 04:00:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E662C1B175B; Wed, 8 Jun 2022 03:24:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237047AbiFHKYb (ORCPT + 99 others); Wed, 8 Jun 2022 06:24:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236745AbiFHKXE (ORCPT ); Wed, 8 Jun 2022 06:23:04 -0400 Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36F1F1F66E3; Wed, 8 Jun 2022 03:12:24 -0700 (PDT) Received: from NTHCCAS04.nuvoton.com (NTHCCAS04.nuvoton.com [10.1.8.29]) by maillog.nuvoton.com (Postfix) with ESMTP id 9DAD11C811B0; Wed, 8 Jun 2022 17:56:34 +0800 (CST) Received: from NTHCCAS02.nuvoton.com (10.1.9.121) by NTHCCAS04.nuvoton.com (10.1.8.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 8 Jun 2022 17:56:34 +0800 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCCAS02.nuvoton.com (10.1.9.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 8 Jun 2022 17:56:34 +0800 Received: from taln60.nuvoton.com (10.191.1.180) by NTHCCAS01.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.1.2375.7 via Frontend Transport; Wed, 8 Jun 2022 17:56:33 +0800 Received: by taln60.nuvoton.com (Postfix, from userid 10070) id 210FD62EFF; Wed, 8 Jun 2022 12:56:33 +0300 (IDT) From: Tomer Maimon To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , Tomer Maimon Subject: [PATCH v2 06/20] dt-binding: clk: npcm845: Add binding for Nuvoton NPCM8XX Clock Date: Wed, 8 Jun 2022 12:56:09 +0300 Message-ID: <20220608095623.22327-7-tmaimon77@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220608095623.22327-1-tmaimon77@gmail.com> References: <20220608095623.22327-1-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,SPOOFED_FREEMAIL_NO_RDNS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add binding for the Arbel BMC NPCM8XX Clock controller. Signed-off-by: Tomer Maimon --- .../bindings/clock/nuvoton,npcm845-clk.yaml | 63 +++++++++++++++++++ .../dt-bindings/clock/nuvoton,npcm8xx-clock.h | 50 +++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml create mode 100644 include/dt-bindings/clock/nuvoton,npcm8xx-clock.h diff --git a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml new file mode 100644 index 000000000000..e1f375716bc5 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/nuvoton,npcm845-clk.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM8XX Clock Controller Binding + +maintainers: + - Tomer Maimon + +description: | + Nuvoton Arbel BMC NPCM8XX contains an integrated clock controller, which + generates and supplies clocks to all modules within the BMC. + +properties: + compatible: + enum: + - nuvoton,npcm845-clk + + reg: + maxItems: 1 + + clocks: + items: + - description: 25M reference clock + - description: CPU reference clock + - description: MC reference clock + + clock-names: + items: + - const: refclk + - const: sysbypck + - const: mcbypck + + '#clock-cells': + const: 1 + description: + See include/dt-bindings/clock/nuvoton,npcm8xx-clock.h for the full + list of NPCM8XX clock IDs. + +required: + - compatible + - reg + - clocks + - "#clock-cells" + +additionalProperties: false + +examples: + - | + ahb { + #address-cells = <2>; + #size-cells = <2>; + + clock-controller@f0801000 { + compatible = "nuvoton,npcm845-clk"; + reg = <0x0 0xf0801000 0x0 0x1000>; + clocks = <&clk_refclk>, <&clk_sysbypck>, <&clk_mcbypck>; + #clock-cells = <1>; + }; + }; +... diff --git a/include/dt-bindings/clock/nuvoton,npcm8xx-clock.h b/include/dt-bindings/clock/nuvoton,npcm8xx-clock.h new file mode 100644 index 000000000000..229915a254a5 --- /dev/null +++ b/include/dt-bindings/clock/nuvoton,npcm8xx-clock.h @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Nuvoton NPCM8xx Clock Generator binding + * clock binding number for all clocks supportted by nuvoton,npcm8xx-clk + * + * Copyright (C) 2021 Nuvoton Technologies. + * Author: Tomer Maimon + */ + +#ifndef __DT_BINDINGS_CLOCK_NPCM8XX_H +#define __DT_BINDINGS_CLOCK_NPCM8XX_H + +#define NPCM8XX_CLK_CPU 0 +#define NPCM8XX_CLK_GFX_PIXEL 1 +#define NPCM8XX_CLK_MC 2 +#define NPCM8XX_CLK_ADC 3 +#define NPCM8XX_CLK_AHB 4 +#define NPCM8XX_CLK_TIMER 5 +#define NPCM8XX_CLK_UART 6 +#define NPCM8XX_CLK_UART2 7 +#define NPCM8XX_CLK_MMC 8 +#define NPCM8XX_CLK_SPI3 9 +#define NPCM8XX_CLK_PCI 10 +#define NPCM8XX_CLK_AXI 11 +#define NPCM8XX_CLK_APB4 12 +#define NPCM8XX_CLK_APB3 13 +#define NPCM8XX_CLK_APB2 14 +#define NPCM8XX_CLK_APB1 15 +#define NPCM8XX_CLK_APB5 16 +#define NPCM8XX_CLK_CLKOUT 17 +#define NPCM8XX_CLK_GFX 18 +#define NPCM8XX_CLK_SU 19 +#define NPCM8XX_CLK_SU48 20 +#define NPCM8XX_CLK_SDHC 21 +#define NPCM8XX_CLK_SPI0 22 +#define NPCM8XX_CLK_SPI1 23 +#define NPCM8XX_CLK_SPIX 24 +#define NPCM8XX_CLK_RG 25 +#define NPCM8XX_CLK_RCP 26 +#define NPCM8XX_CLK_PRE_ADC 27 +#define NPCM8XX_CLK_ATB 28 +#define NPCM8XX_CLK_PRE_CLK 29 +#define NPCM8XX_CLK_TH 30 +#define NPCM8XX_CLK_REFCLK 31 +#define NPCM8XX_CLK_SYSBYPCK 32 +#define NPCM8XX_CLK_MCBYPCK 33 + +#define NPCM8XX_NUM_CLOCKS (NPCM8XX_CLK_MCBYPCK + 1) + +#endif -- 2.33.0