From patchwork Fri Feb 12 11:16:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12085031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8756AC433E0 for ; Fri, 12 Feb 2021 11:18:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D0E664E65 for ; Fri, 12 Feb 2021 11:18:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D0E664E65 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=0x0f.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=L5GcrmmN+En4COGBSBVTTEie6BNqHZ/V8d9Vci/iqu8=; b=xjvixdvpdYY4niVJMq1ZxEKse P7jg7HnDOK0wKWuJFPdCA5g4QYivTyqCpGltEV9Qclj7urs05kzp8VZc7qsjA0sQDUF4pvpsJ8Qv4 L017RNgCDVbByqLd8Pyc03/yUZegwjfw0yqk761vBI28X10uNFuK0qVzHlF9YWasrxT9PInTLiiQB lTxRxHoBrAOJBTaFc8jj8bO2xcRetYVUyzMsR0K1VVPbMpR3d9R4zWCMVxFbY7rj5NN5rauFhDyi2 qJqt/MR8cpHcuonnctBY81r847UBkkFMmZ5rwLV04YusWqfiDyxjpSQWaYZL5HPhDqBII8zeYwv/z AGc6wW1qQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAWRv-000764-7O; Fri, 12 Feb 2021 11:17:23 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAWRo-00072z-JE for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2021 11:17:18 +0000 Received: by mail-pl1-x632.google.com with SMTP id g20so456606plo.2 for ; Fri, 12 Feb 2021 03:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w3eAc6FaBMb02UjLTylLBFxDGw5JxOTFicXpZo/jAB4=; b=jOv/7auoPeV648ioJTxzIIypvnEbLcmB7jg/WO0+Rzozd3LRYQWS8xIeVO+AA7wpj7 59KRdSLqOZxS56/3R/kta2JjpZd1+pnmGYVs7aEcEzoqfGM9bfTbXumEO/lV5aWYS3xL vtCkdBHmCtYmNu6Lx/DLCsAVEJvJYvj6Cpjvo= 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:mime-version:content-transfer-encoding; bh=w3eAc6FaBMb02UjLTylLBFxDGw5JxOTFicXpZo/jAB4=; b=m6lo0dcHAM/TDI8t/HK40ZU6NchWFiGesG7zz/wQs5tDho9USDgAt3JoZeLKyee33r zrBVYfPVgLNKEGWakXaOcilqtZOddL3aV5N+Ys/1pqYjUzBOxqHChvfLsSzf7u6/t5Fu Ovn0bbNzAqwEVXwiW5/7Q2IujyC1hmeU6KYArbbCEF6aXKQSltrZCtvoXMbi5OcPrRL4 BuMA7rGrTax23GVzxK/2S+Xqfj+9wt8b94UIaoBIRM86apkDIhlK2dt+vN330pTPLhBF PPtDxjfpDzh5WQnTA4XtwalTjwGGjwSrhJClALyeCoIPbZFxWiA7w4lMuHKTL7C/K0al +Wpg== X-Gm-Message-State: AOAM533kUs0Spe+3UUABYeJsFvYNQ7iMP2oT39h95Kfa5z1+truSqU/H sE7Nxqan0x3c/OSYJj8+ECFWdA== X-Google-Smtp-Source: ABdhPJyr3YyowB8Gvq2NvbGkjisZEoQ56XU0gS6QsNrt6V6ukhBJzJf9SVgcnf7U8FRfBHXit92S2g== X-Received: by 2002:a17:902:b410:b029:e3:284e:4e0b with SMTP id x16-20020a170902b410b02900e3284e4e0bmr708773plr.33.1613128633438; Fri, 12 Feb 2021 03:17:13 -0800 (PST) Received: from shiro.work (p345188-ipngn200408sizuokaden.shizuoka.ocn.ne.jp. [124.98.97.188]) by smtp.googlemail.com with ESMTPSA id h20sm5752662pfv.164.2021.02.12.03.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 03:17:13 -0800 (PST) From: Daniel Palmer To: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/1] dt-bindings: clk: Mstar msc313 clkgen mux Date: Fri, 12 Feb 2021 20:16:49 +0900 Message-Id: <20210212111649.3251306-2-daniel@0x0f.com> X-Mailer: git-send-email 2.30.0.rc2 In-Reply-To: <20210212111649.3251306-1-daniel@0x0f.com> References: <20210212111649.3251306-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210212_061716_693063_F3E943BF X-CRM114-Status: GOOD ( 16.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Palmer Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a devicetree binding yaml for the clkgen muxes used in various places in MStar/SigmaStar SoCs. Signed-off-by: Daniel Palmer --- .../clock/mstar,msc313-clkgen-mux.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/mstar,msc313-clkgen-mux.yaml diff --git a/Documentation/devicetree/bindings/clock/mstar,msc313-clkgen-mux.yaml b/Documentation/devicetree/bindings/clock/mstar,msc313-clkgen-mux.yaml new file mode 100644 index 000000000000..7f2ff72a601f --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mstar,msc313-clkgen-mux.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/mstar,msc313-clkgen-mux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MStar/Sigmastar MSC313 CLKGEN mux + +maintainers: + - Daniel Palmer + +description: | + The MStar/SigmaStar MSC313 and later ARMv7 chips has a number of + "CLKGEN"s. Some in the pm area, some in the standard peripheral area + and some in the "scaler" area. Inside of these CLKGENs there are + muxes that either connect the output to an always on clock + (deglitch) or one of a number of clocks that are selectable via + a mux. Each of these muxes also includes a gate for the output. + Most of these are in a nice block with multiple muxes in a single + register. Some of them are embedded within blocks of unrelated + registers like in the pm area. Some seem to be embedded in registers + with unrelated bits. For this reason a syscon is used to access the + registers. + +properties: + compatible: + const: mstar,msc313-clkgen-mux + + "#clock-cells": + const: 1 + + clocks: + description: | + List of clock sources for this mux. If the mux has a deglitch + bit the last entry should be the source of the deglitch clock. + + offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Offset in the register map for the mux register (in bytes). + + regmap: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Phandle to the register map node. + + mstar,gate: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Bit position for the gate bit. + + mstar,deglitch: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Bit position of the deglitch bit for muxes that have one. + + mstar,mux-shift: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Left shift value for the mux bits. + + mstar,mux-width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The width of the mux bits. + +required: + - compatible + - "#clock-cells" + - clocks + - offset + - regmap + - mstar,gate + - mstar,mux-shift + - mstar,mux-width + +additionalProperties: false + +examples: + - | + clkgen_mux_mspi0: clkgen_mux_mspi0 { + compatible = "mstar,msc313-clkgen-mux"; + regmap = <&clkgen>; + offset = <0xcc>; + #clock-cells = <1>; + mstar,gate = <0>; + mstar,mux-shift = <2>; + mstar,mux-width = <2>; + clocks = <&clk_mpll_div2_div2>, + <&clk_mpll_div2_div4>, + <&xtal12>; + };