From patchwork Tue Feb 20 03:08:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 203381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp165873dyc; Mon, 19 Feb 2024 19:09:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVUVojCLwFpZ9I/3WNjpRjgfsRmAMZQ39qTLiVeQfYDUmEdlkhiTvGi8WMVV3qJjZNZ52HoKZUuc+0yvJznENMQ/BpdPw== X-Google-Smtp-Source: AGHT+IGL/7Tdxt8kgzpaVDbMZEvk4aCWtMaetxLKVRInZL8/v8T31kh8VHEHlRm4AGbOTR5hIiGo X-Received: by 2002:a50:fc14:0:b0:564:5c90:f521 with SMTP id i20-20020a50fc14000000b005645c90f521mr4842106edr.14.1708398544253; Mon, 19 Feb 2024 19:09:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708398544; cv=pass; d=google.com; s=arc-20160816; b=vFIHQhdqvp04PfTw3uCiNWjmL0Z9imLHyiVehx3F/b+zDr1xCqn3WS0dHvJMCj+rv6 w1JTzPurvM+N12oX57rAadSdQDap9vQQSmivM+D4tq02I4+W2vR9DeKDEfUWi00EPU7V uTsHrrcGz1cnzP56/DXzLd4ImCR8jyc2CszhF+q31I5Aq9ZUaD9Zx3+ccjMYtOJoK2oX aWoiOSJmlGxyDdbWeSQqMPDTbZVa2EFbdLnYsuEJvygCNeaQ7lUvwCc43TQBTKABuDyP 4EQNOs+iRFtziFwZqc9yYev7BHQlTilkn3hCSvD33yq+OiNscBDL1X2DFqZRgAi/ZVd/ fjiw== 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:dkim-signature; bh=FvyDKytI3LByIiwfwmYUFkoNWJX9ByqcE9gyEaLOuuM=; fh=mlQK80+4HWyC0SdRvmw5PJ78C0dSr5mJ/tkjHV5AYv0=; b=0iqrd3p/1oz5kDPTjLV2CnhLXIJq+NavAy/a8HKv3gWSWthM3jOKTKULmeoh4diDhu d2HjvGjS3+q+m8Ogtvx3GN7IYoFoFo8hRT63jITg4GuaOT0G8PjIfUdtQ/CaVjsCYN8S HCqGmwLkZpycIvp4rY+yB7D4RSWXM+Q5/aaifySxACJ39ooWzFly4p7fOmmFSU2N1N90 gnkHXEVF0HWcFC30fH6petdmvicxrHrlBw93wj4E6Iuzb6eBErsahx0WgxOpPrFmTZI1 zKYKD200pPMsU8jUdNhqxqZqnv5AbCE+ECPSuJN3JADLOmonBW0Xfo1Gz9FodXpMIePf nA4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mkJEJe9f; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-72246-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72246-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t22-20020a50ab56000000b00563f2abc7b4si2908547edc.410.2024.02.19.19.09.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 19:09:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72246-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mkJEJe9f; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-72246-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72246-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id ADC051F245ED for ; Tue, 20 Feb 2024 03:09:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D9654643B; Tue, 20 Feb 2024 03:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mkJEJe9f" Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (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 7D43623D7; Tue, 20 Feb 2024 03:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708398529; cv=none; b=EPP8o2ShTU31GeY3L9WEvmGJ/PzcP1F7CYrV8i01w2wsNdk4qv2jn8r/Go8uS4ywOaM49ffHmWkmd1Emdcv4O936KOiKKFuLJAxz0QefgMhmPfYdJdeyJTrA+SndVNQuz+o4P0K1R/DJVIL2T0fTCNKQ2fqhrLmDaym2C1bI7kk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708398529; c=relaxed/simple; bh=1z2DjnnEUQ8VRVOOj7bX9GFcbA+wqEyxADFf3p99mzE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=alOyfEjU++D1C0KCHgOLHCIuAzFpx4tiNad2L+YXxDteuCW3vrY05kJBYtzPdTzRnX4o5zwICXBiN5Ww9d8ngYZ6RCgrBMW5LwQqrry64ddPUwSRhR3jTOVbJZiJ9Bvt5xTwoNm4vjZ2QlA5tlCQPTVzyrdyFtICadSteQvJcUc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mkJEJe9f; arc=none smtp.client-ip=209.85.210.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-6e45ef83c54so114147a34.2; Mon, 19 Feb 2024 19:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708398526; x=1709003326; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FvyDKytI3LByIiwfwmYUFkoNWJX9ByqcE9gyEaLOuuM=; b=mkJEJe9fL5O/Yc3zMUSP4IINK3hASRqhutLWANw887Zpzs9+gVXCAxil/pLk+ShbGY mLfviV6/wvnDr5LkD0qJGEIuwD3GK+DGh5Kok01EsNnX8hdLP8CKxdUu2e2YK0tr2rfL Y87/9QQLIDjONMD+/Lx7VfC11H1LinAlYfryOOnYdqroqQVKtJJrp9jZLCrEYxKRlcSD iqOXvGZ3GU7MKEs8rIZDAHe94r0Uh80A6jPPj/2pvrt7q/VPx9if3xlWwwXcyXpWhvSa VtP2GbcRSonw3o+Iu2sIO80df5T4VKdYdeNwJPjv0yViNDvv8WCgAP5+jL8LJVey3cRp qiOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708398526; x=1709003326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FvyDKytI3LByIiwfwmYUFkoNWJX9ByqcE9gyEaLOuuM=; b=Pg9HUcBZm48svtfUksE1k6ewWZluScVlfcD71ph2TMa9Lv137QUYt2mqv6u8gQ2k/v iZaoJcIwS705l5IP9U6XPZTmVtzaOrHUBYvztPKDVImW6eVE4jd/5qvS+qdYA92d6lFl wffWzZbnkSrng4FCaM75oBbKxXhSD2Dk1n9OvKoZDYwKuZ5QvUBwx0DZaOgtcto6zxyp OHUFjU7udkUUYznQJGrNucwioYaT/ANOT/c4WmELqy0RDOdOy8w5KHI3pEzT08vKzAki t7Y5KYflYcMhyPukPG1TU5qujGVnpaWXj+a5F7mlliplQudg2p7yIqN2w3+VkPZgeGw4 ogrg== X-Forwarded-Encrypted: i=1; AJvYcCWyA7EPJUB4Oiv+Q+KufE6bo9GF/q52gwj8qwNPwlSXKZrVljn+9OPnL3ntungpqK6To2kLpcCOFFevHUpSzGP+OO80UPnQr4g9i8bDW8lBOKC4voV7FYDUR735ELPDl8aNx7etMjqwBJ+RTBJyy/cYUEogzGO6XsD+kcM0r64+E9g78Q== X-Gm-Message-State: AOJu0Yz8toPWtiZ5ECB4supVCmQ1JU1XKDVjJwH03HhF+OfnkSS6UroD VMZIAITq9O7bkez3NhPKC+rr6sk9pciTUzamV1KFLR3I4n1kG60OZuS4x2E2hRU= X-Received: by 2002:a9d:66c9:0:b0:6e2:f24d:697c with SMTP id t9-20020a9d66c9000000b006e2f24d697cmr16288749otm.11.1708398526492; Mon, 19 Feb 2024 19:08:46 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id dq20-20020a0568300ed400b006e2e8cb4da6sm1160483otb.16.2024.02.19.19.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 19:08:46 -0800 (PST) From: Chen Wang To: aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, palmer@dabbelt.com, paul.walmsley@sifive.com, richardcochran@gmail.com, robh+dt@kernel.org, sboyd@kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com, guoren@kernel.org, jszhang@kernel.org, inochiama@outlook.com, samuel.holland@sifive.com Cc: Chen Wang , Rob Herring Subject: [PATCH v11 1/5] dt-bindings: clock: sophgo: add pll clocks for SG2042 Date: Tue, 20 Feb 2024 11:08:39 +0800 Message-Id: <92448a1ca9ad8f713dbdbf3453f1a5db0ca47d9b.1708397315.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791385711586483389 X-GMAIL-MSGID: 1791385711586483389 From: Chen Wang Add bindings for the pll clocks for Sophgo SG2042. Signed-off-by: Chen Wang Reviewed-by: Rob Herring Reviewed-by: Guo Ren --- .../bindings/clock/sophgo,sg2042-pll.yaml | 45 +++++++++++++++++++ include/dt-bindings/clock/sophgo,sg2042-pll.h | 14 ++++++ 2 files changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/sophgo,sg2042-pll.yaml create mode 100644 include/dt-bindings/clock/sophgo,sg2042-pll.h diff --git a/Documentation/devicetree/bindings/clock/sophgo,sg2042-pll.yaml b/Documentation/devicetree/bindings/clock/sophgo,sg2042-pll.yaml new file mode 100644 index 000000000000..b9af733e8a73 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/sophgo,sg2042-pll.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/sophgo,sg2042-pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo SG2042 PLL Clock Generator + +maintainers: + - Chen Wang + +properties: + compatible: + const: sophgo,sg2042-pll + + reg: + maxItems: 1 + + clocks: + items: + - description: Oscillator(Clock Generation IC) for Main/Fixed PLL (25 MHz) + - description: Oscillator(Clock Generation IC) for DDR PLL 0 (25 MHz) + - description: Oscillator(Clock Generation IC) for DDR PLL 1 (25 MHz) + + '#clock-cells': + const: 1 + description: + See for valid indices. + +required: + - compatible + - reg + - clocks + - '#clock-cells' + +additionalProperties: false + +examples: + - | + clock-controller@10000000 { + compatible = "sophgo,sg2042-pll"; + reg = <0x10000000 0x10000>; + clocks = <&cgi_main>, <&cgi_dpll0>, <&cgi_dpll1>; + #clock-cells = <1>; + }; diff --git a/include/dt-bindings/clock/sophgo,sg2042-pll.h b/include/dt-bindings/clock/sophgo,sg2042-pll.h new file mode 100644 index 000000000000..2d519b3bf51c --- /dev/null +++ b/include/dt-bindings/clock/sophgo,sg2042-pll.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ +/* + * Copyright (C) 2023 Sophgo Technology Inc. All rights reserved. + */ + +#ifndef __DT_BINDINGS_SOPHGO_SG2042_PLL_H__ +#define __DT_BINDINGS_SOPHGO_SG2042_PLL_H__ + +#define MPLL_CLK 0 +#define FPLL_CLK 1 +#define DPLL0_CLK 2 +#define DPLL1_CLK 3 + +#endif /* __DT_BINDINGS_SOPHGO_SG2042_PLL_H__ */