Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp196902lqp; Wed, 22 May 2024 01:28:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVz+QLKzoWqHmrsnkOaewRgBezs7HhtC5COcxtrb6hWxSs3PPg2SGT0XLikHGL5izjxsLSpfidpJxvjCWTfIUMhkgaetiBq7op0p9N5AQ== X-Google-Smtp-Source: AGHT+IEPoowOHdtVKheh5cmbmDPAE0SFdW011j+jHB/8PwES6ZD4hCtAzUf1FSln4I/Woz2k7u06 X-Received: by 2002:a05:6a20:d817:b0:1af:6866:165a with SMTP id adf61e73a8af0-1b1f8822242mr1615715637.7.1716366521283; Wed, 22 May 2024 01:28:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716366521; cv=pass; d=google.com; s=arc-20160816; b=I6iJ6AwAfr0ErG6qSagpPhMWEdE3azKujnMzApsXn1QVSNiXM8R4AkKu6Jbvlv2u3k zESAaAMWUe5PDAYCJ/NcrGWOp31wvBtcatwfWgLeEm7hZXre6F5I3k5LtNu7kCfPUMJa GaltXmK5fsVCPrYlmhLXGnAJC6uJ1W8f+n5oJX72e9exKJNSFZfC+BOkc68Mn99xBkPa sqdQnXGtp2OhPX5AqIbbd+eOfD3riVYYjaqaj35TrPXXKzdLAYGXmyO92/nIkA6foHz9 29GS2Wx93WwaW9sX6AqZEUa8/UpN4UUQm3PPpPt+GSRk/D9j70KhFG9VkPqw9O/u/Fyj yHDA== 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=H4FSFzfvNpf2IsZWsVwh7apduc7iDmoXpzD5tTV44Ihpyr2gLVGAilg3IYKIuagBkP UtyRxbJRs2wckHcR9OQFjEKWnUlB362OK6mMtj2F/dj4tYMhDxmBJbT54NFMdKzW7eoO /VksgbSuI2hcnYrNaMRlFIBsCEspz2WCvvPOomaUqbrsJJjdR2RYfO5zQk29V3YkGRrw uM3BsiePtOozQpBEOC0SrCAmfSWABuIyY1WAKyuOvU0MYdWxTdlvYNR1K6gsAcB4ynKZ 88s9uxvtpIrp74W46tgQjQIimlREuMO2JdKbuQwKiP2+lfR5MUb7u/bZN3Xknoe/kkNo DBXA==; 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-185926-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f3080a8f7asi39164285ad.236.2024.05.22.01.28.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 01:28:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185926-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-185926-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185926-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 97C5D282F34 for ; Wed, 22 May 2024 08:28:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C193F8172D; Wed, 22 May 2024 08:27:43 +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 A97E0811E6; Wed, 22 May 2024 08:27:41 +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=1716366463; cv=none; b=FcMBZ5iVNhT49R3Bt54fNO+awUuXWA6RpYhLEVVTDQ50p1H4s+N7D9TryoTEz0EDXzdCZVXuBcaRQ9OPyTema2uYyh5g7MjmZU6phH1tJ9SeDzyko1DOcQjlUIFnvYWZxgPTQFtccjafFx4zDIqSX6fxsk5WIcKh6mqkthIxt+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716366463; c=relaxed/simple; bh=vnBURd88BzQGdLsCt5oWszBO5nUaBcW/oA6W2AlAjMI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NEoLVC9dVwqtoa7B34AzIdl2Jno7jWvGVXRCztBca9wxkPdxhbhbyNMQ3LCJhQdwqMjQ2u+4oN6FuklLPC0FktTHJMedwDg5mbn5DS9XZZTt/xiIPmcKizGseUS7xE7Vm+bCY8Zwa+6mm7NpHrJh6SJUlQwEdzkKUqWjyaG49QY= 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, 22 May 2024 16:27:32 +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 v9 1/5] dt-bindings: clock: add Amlogic C3 PLL clock controller Date: Wed, 22 May 2024 16:27:23 +0800 Message-ID: <20240522082727.3029656-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240522082727.3029656-1-xianwei.zhao@amlogic.com> References: <20240522082727.3029656-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