Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp205445lqd; Tue, 23 Apr 2024 22:26:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzj7GAEZObkuQeWvF1Ic3HDT3zV6ZYIzTwM8/zm0FyQ6JZTFl/f/7QL/h/kVQrN5zNSJTA4N6ZpbvKnFtWAzbkbvgtbWEL9oRTp49CPQ== X-Google-Smtp-Source: AGHT+IFpzCz2Mx8vLGdZ4azkAB2gd+xPTPjra4OEPJ7Vvj951lxnGWD8XZO/7zX+pTrs7QzZWwlA X-Received: by 2002:a05:6808:1396:b0:3c7:52aa:2af4 with SMTP id c22-20020a056808139600b003c752aa2af4mr1639018oiw.36.1713936362735; Tue, 23 Apr 2024 22:26:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713936362; cv=pass; d=google.com; s=arc-20160816; b=h5WOAJwyGK8HxPnRpOT7IeuMk0LTDrtkFTV6NtFRUP5P2nidRQTytNLDXHv8Bncg8z giu1PENJvb8rwbtBEQqR0QOXAtPvXDEub28TNbW4FNWURjBTOfqcUPwbq1xxvAlug0gV thtsiZLJl+ZSVdCaAVkByleWiQxrgqsKupGpEx4CJiVOxSI0PV5eIFWkdrDQGzWSi/DA HhWUkoGso+JdvfvwUE13EvxkJd6kmQYHVEE5LOemJhQlDgmRDa+GX909fbXDB1t2k0Nv pFni6yRT3OQD4WE+L0BPVTNOavB4l1P0B0hVLP9mHYxqrzzGHNAU57A4nyaQCJoxbtX6 XPJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=rGarG1bwDdWtewayy8qsdQ2E1oDepEG45ww/UhYGAPk=; fh=MRPyjbFBl1+yR9iRaDjv8ZysOzvZycpU+bGObtKY4hw=; b=XcmdUr3asCzzgzF9v8CS3BuaFS5hMN3OcStvgvs2cToUjwMRG+xx1XvKt+9SbulDk0 5TdRi+xthPGoMqHccKPubpvjcXvfhTmglgfA//NWBea5+95ziYztY6i8OuzuvkGtmE7Y dl8uDf6eZ916rhCDbsYpHqcxaTsILXcy+sScCYiXO0eAw3wIo0n5GlUBqnE/rwKujFv5 p6q8K7tCSps+xF2oeFOEG/axwiGzxFGICJAGMDjM/cvjYGXxYsAVUv00VEsGQPt4b3Uo utPwU4urXdBaCBWpZRgoP29FTJgFBPb0UN0j9iU1t2XJPZOuHN5eKplo/gvH3FwNrXmd gFfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=amlogic.com dmarc=pass fromdomain=amlogic.com); spf=pass (google.com: domain of linux-kernel+bounces-156298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s18-20020a056a00179200b006ed5f9e39c4si10931518pfg.386.2024.04.23.22.26.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:26:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=amlogic.com dmarc=pass fromdomain=amlogic.com); spf=pass (google.com: domain of linux-kernel+bounces-156298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 307A8B22FF7 for ; Wed, 24 Apr 2024 05:25:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5A34156868; Wed, 24 Apr 2024 05:25:27 +0000 (UTC) Received: from mail-sh.amlogic.com (unknown [58.32.228.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE5A41552FC; Wed, 24 Apr 2024 05:25:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=58.32.228.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936327; cv=none; b=A14ocjxUZIn52wl6WPP3PhebgPQXdd4R7vEF+cqpaVJeWeKz4G177K28gZXO4a0O8ZToupzFPRWZRGRCkkKjsxAsLDmhJQRp6QV9UNegg3xWQGZD1C6+Fewv9C0q2+FwSX+R6BGtz3fCFKMbA5Ec95q3G/BaBcPrysARoOKDPEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936327; c=relaxed/simple; bh=vnBURd88BzQGdLsCt5oWszBO5nUaBcW/oA6W2AlAjMI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Z7hqjr4DEGi/ksq80Oyaen2XxBtBB+Uy1q7NZYZkGhHgfh9DIrFt51c4GOsBBEyL6Tsf42EqqehqC8EBpKAWRA234mUkFmFqH5S6cg+XTwaeSA9ZDz4jFwpPHyGX+JBUW8hRRrpJ3cjNqXA0SHR679LBlLyo/lftpYjp1Rw8f+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amlogic.com; spf=pass smtp.mailfrom=amlogic.com; arc=none smtp.client-ip=58.32.228.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amlogic.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amlogic.com Received: from droid01-cd.amlogic.com (10.98.11.200) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.6; Wed, 24 Apr 2024 13:10:15 +0800 From: Xianwei Zhao To: , , , , CC: Neil Armstrong , Jerome Brunet , Michael Turquette , "Stephen Boyd" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Xianwei Zhao , Krzysztof Kozlowski , Chuan Liu Subject: [PATCH v7 1/5] dt-bindings: clock: add Amlogic C3 PLL clock controller Date: Wed, 24 Apr 2024 13:09:24 +0800 Message-ID: <20240424050928.1997820-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240424050928.1997820-1-xianwei.zhao@amlogic.com> References: <20240424050928.1997820-1-xianwei.zhao@amlogic.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Add the PLL clock controller dt-bindings for Amlogic C3 SoC family. Reviewed-by: Krzysztof Kozlowski Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao --- .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 40 +++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml create mode 100644 include/dt-bindings/clock/amlogic,c3-pll-clkc.h diff --git a/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml new file mode 100644 index 000000000000..43de3c6fc1cf --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022-2023 Amlogic, Inc. All rights reserved +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,c3-pll-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic C3 series PLL Clock Controller + +maintainers: + - Neil Armstrong + - Jerome Brunet + - Chuan Liu + - Xianwei Zhao + +properties: + compatible: + const: amlogic,c3-pll-clkc + + reg: + maxItems: 1 + + clocks: + items: + - description: input top pll + - description: input mclk pll + + clock-names: + items: + - const: top + - const: mclk + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + apb { + #address-cells = <2>; + #size-cells = <2>; + + clock-controller@8000 { + compatible = "amlogic,c3-pll-clkc"; + reg = <0x0 0x8000 0x0 0x1a4>; + clocks = <&scmi_clk 2>, + <&scmi_clk 5>; + clock-names = "top", "mclk"; + #clock-cells = <1>; + }; + }; diff --git a/include/dt-bindings/clock/amlogic,c3-pll-clkc.h b/include/dt-bindings/clock/amlogic,c3-pll-clkc.h new file mode 100644 index 000000000000..fcdc558715e8 --- /dev/null +++ b/include/dt-bindings/clock/amlogic,c3-pll-clkc.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (c) 2023 Amlogic, Inc. All rights reserved. + * Author: Chuan Liu + */ + +#ifndef _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H +#define _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H + +#define CLKID_FCLK_50M_EN 0 +#define CLKID_FCLK_50M 1 +#define CLKID_FCLK_DIV2_DIV 2 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV2P5_DIV 4 +#define CLKID_FCLK_DIV2P5 5 +#define CLKID_FCLK_DIV3_DIV 6 +#define CLKID_FCLK_DIV3 7 +#define CLKID_FCLK_DIV4_DIV 8 +#define CLKID_FCLK_DIV4 9 +#define CLKID_FCLK_DIV5_DIV 10 +#define CLKID_FCLK_DIV5 11 +#define CLKID_FCLK_DIV7_DIV 12 +#define CLKID_FCLK_DIV7 13 +#define CLKID_GP0_PLL_DCO 14 +#define CLKID_GP0_PLL 15 +#define CLKID_HIFI_PLL_DCO 16 +#define CLKID_HIFI_PLL 17 +#define CLKID_MCLK_PLL_DCO 18 +#define CLKID_MCLK_PLL_OD 19 +#define CLKID_MCLK_PLL 20 +#define CLKID_MCLK0_SEL 21 +#define CLKID_MCLK0_SEL_EN 22 +#define CLKID_MCLK0_DIV 23 +#define CLKID_MCLK0 24 +#define CLKID_MCLK1_SEL 25 +#define CLKID_MCLK1_SEL_EN 26 +#define CLKID_MCLK1_DIV 27 +#define CLKID_MCLK1 28 + +#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H */ -- 2.39.2