From patchwork Thu Feb 22 19:40:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 205037 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp187665dyb; Thu, 22 Feb 2024 12:17:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0Ni0+jDT3yYUpknEMuyFaO422nz74An41obsKpl5IO/R73US2x3J7q9Gij132XgZYv6KYT7H1NKvTw4OCgNUaPBgkNA== X-Google-Smtp-Source: AGHT+IE78qDr2uwouGHyn/6d9S//Q/2WJ2wb0k5AbWHlP4vCmqQJduwBa+/uMtCdlhCUgXWDBwp1 X-Received: by 2002:a05:6a00:3d0c:b0:6e4:868f:fe84 with SMTP id lo12-20020a056a003d0c00b006e4868ffe84mr9567234pfb.17.1708633076616; Thu, 22 Feb 2024 12:17:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708633076; cv=pass; d=google.com; s=arc-20160816; b=VVcrLZlAZk5Wx4K8RV9NSlfytEEW6NbrGnZpNCEUeoOypcGA3k7gCyQyvNW2ZdpxV4 +HxWUNi9IoXsRgA6QxGR2RaZcGEXoxXGMThPS3EcqcV0Hdl4d9fmgGRPTP2Th8nQsXYx +PMWVWOr/tbjS6+FupF1u4wskmShzVmWwHYP7S1huoDuh6f64Hcham4QCcKdfVPyctaL ae+HdTsCiD1dTRnfXPlujFLFJ83KyMGkvXztUQqszaNNlRHmxpm37m4NmxOTEq1ijG5c CmnORuNQgXXL9K7SZgbcJvLMY6HveScLdhM1bjplyW5NTIKfjFbHSvLgeHolRtCYKPjE oIvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=o36Hz8mKBu+beGD3/lPDRC7Wt9DGE5q8XqA6b+rM6nM=; fh=61jQp11ptjJt97TUxWe8+hyuLMCiql6kVojnsyhWm9A=; b=a6xsHN0rsyhL4jGpK0BQqilquWLOD0zfQm4kAnz3V++Jxt+EdKq0HiBkH0BURm8l+G RM59wrb3ELKb409hg4wAagr23fm2t+b1MRf5eXhAQJ/VL9dx/12tPjj6FFPLyXKFNziS 517RTiWXKTKG9nvcp3Bxee/4zbt8CLoudLZ5cdD/KSjH8qjm3MXoUSRBwz1B86jE8iPk zcn9bs9HtKKtFtPUTmRvvvc7UnhQg92wBzcs2W+ON90hL1Ak6klAYJs1xCcjXDA8uB3m XZxjyi/fmcaCKuma5WB0qRDvn0yQVx+nqCKFzdV8xePpUlqdTSOdvYtxTCe59juoWw+g O/Iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g5nu4Iek; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77272-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p41-20020a056a000a2900b006e215fc036asi10749119pfh.218.2024.02.22.12.17.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:17:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77272-ouuuleilei=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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g5nu4Iek; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77272-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 604B2B2C996 for ; Thu, 22 Feb 2024 19:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CE3673F01; Thu, 22 Feb 2024 19:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g5nu4Iek" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CB4354902; Thu, 22 Feb 2024 19:40:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708630837; cv=none; b=Zd7SxnmcuQHe23eR7/Cr2t1hOW1l/0Vidx3Gnj2+kDuyxeA7vXmwYSbv4LfbnrvVGqcf50G3xK6zTX3kfeTMUzp6Dj3dncXfvTJJuB83YXSIfYcJW6y0P0pTiM78XLitwo09Snkru1CT1/GeH/9zSZG/7XXYhkeupFnr21wsoNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708630837; c=relaxed/simple; bh=AH78cCTr7dhEVWFYAwhWrhR8lqe7nzIAxBDvIRMgfUg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MREQLbNBqPEmTjNQEBhGqJsG+eeGE/04LgjhCChRg7y7LsdTbP93W+DGiWO+e17DOC1UBffih9XPQIb7Cg2UI0uryOG72jEmvycJ91gBC92VZJo9QJJyQWrooo2o41OD/tPqMMBAHZQeCSO2hs7CQORQNi9o08e7bwV3jCCuEJ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g5nu4Iek; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 9B229C433F1; Thu, 22 Feb 2024 19:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708630836; bh=AH78cCTr7dhEVWFYAwhWrhR8lqe7nzIAxBDvIRMgfUg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=g5nu4IekCQG+A8Yt/S4nShiR18VzfnpJ5nYiE3ddQtu22+I/ztm8qHBjRrZ9LBcVo 09R7tzUlnjnTCjofN6rP60MjXWb8JXN7K9cDeMPZehkCDYDoFRG2TRelqbURvqa7Fo Eq+JiMpMhbAVKu36mpJexyVDUh2rE1mMGnxTYxDxlTS6ZCEqKcCEP6y+wVzHqClrsR bY9V4nIQJJ4b63zySUdZXip7Y7KvMMPO8mUfLSgpgFu0WEYHa0XvYIO46wrZsQUBFG jEPQlDQlYOYyaOlpBhSIrm5k0Ohqm0pOWiHbhwBg+i2AMueF5W5Hpe4EVzeXXRXrsS umN9nnq1WejiA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76BD0C5478C; Thu, 22 Feb 2024 19:40:36 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 23 Feb 2024 03:40:11 +0800 Subject: [PATCH v4 1/7] dt-bindings: clock: convert hisi-crg.txt to YAML Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240223-clk-mv200-v4-1-3e37e501d407@outlook.com> References: <20240223-clk-mv200-v4-0-3e37e501d407@outlook.com> In-Reply-To: <20240223-clk-mv200-v4-0-3e37e501d407@outlook.com> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: David Yang , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708630834; l=4441; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=BpMVKDzX1uOIaNylx4gkghc96HEFugmrUQEA+SEAU8g=; b=zmLi+nFDKGMq0GTgpZ6YrTY4/pnALpM6nt9vGWYTTXNsYF9GP/qjnEQ3Tegun4yOivFgLdWAw CvkYxdT1DPgAssOK62o/fIx8D+p47I/6hIONsjCkpOTfqGE/p/wof+B X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791631636897893152 X-GMAIL-MSGID: 1791631636897893152 From: Yang Xiwen Also rename to hisilicon,hisi-crg.yaml. While at it, add "syscon" and "simple-mfd" compatibles to match the existing hi3798cv200.dtsi. Add reset-controller subnode for hisilicon,hi3798cv200-crg to match the existing hi3798cv200.dtsi. Signed-off-by: Yang Xiwen Reviewed-by: Rob Herring --- .../devicetree/bindings/clock/hisi-crg.txt | 50 --------------- .../bindings/clock/hisilicon,hisi-crg.yaml | 74 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 50 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt deleted file mode 100644 index cc60b3d423f3..000000000000 --- a/Documentation/devicetree/bindings/clock/hisi-crg.txt +++ /dev/null @@ -1,50 +0,0 @@ -* HiSilicon Clock and Reset Generator(CRG) - -The CRG module provides clock and reset signals to various -modules within the SoC. - -This binding uses the following bindings: - Documentation/devicetree/bindings/clock/clock-bindings.txt - Documentation/devicetree/bindings/reset/reset.txt - -Required Properties: - -- compatible: should be one of the following. - - "hisilicon,hi3516cv300-crg" - - "hisilicon,hi3516cv300-sysctrl" - - "hisilicon,hi3519-crg" - - "hisilicon,hi3798cv200-crg" - - "hisilicon,hi3798cv200-sysctrl" - -- reg: physical base address of the controller and length of memory mapped - region. - -- #clock-cells: should be 1. - -Each clock is assigned an identifier and client nodes use this identifier -to specify the clock which they consume. - -All these identifier could be found in . - -- #reset-cells: should be 2. - -A reset signal can be controlled by writing a bit register in the CRG module. -The reset specifier consists of two cells. The first cell represents the -register offset relative to the base address. The second cell represents the -bit index in the register. - -Example: CRG nodes -CRG: clock-reset-controller@12010000 { - compatible = "hisilicon,hi3519-crg"; - reg = <0x12010000 0x10000>; - #clock-cells = <1>; - #reset-cells = <2>; -}; - -Example: consumer nodes -i2c0: i2c@12110000 { - compatible = "hisilicon,hi3519-i2c"; - reg = <0x12110000 0x1000>; - clocks = <&CRG HI3519_I2C0_RST>; - resets = <&CRG 0xe4 0>; -}; diff --git a/Documentation/devicetree/bindings/clock/hisilicon,hisi-crg.yaml b/Documentation/devicetree/bindings/clock/hisilicon,hisi-crg.yaml new file mode 100644 index 000000000000..251156905a7b --- /dev/null +++ b/Documentation/devicetree/bindings/clock/hisilicon,hisi-crg.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/hisilicon,hisi-crg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon SOC Clock and Reset Generator (CRG) module + +maintainers: + - Yang Xiwen + +description: | + Hisilicon SOC clock control module which supports the clocks, resets and + power domains on various SoCs. + +properties: + compatible: + oneOf: + - const: hisilicon,hi3519-crg + - items: + - enum: + - hisilicon,hi3798cv200-crg + - hisilicon,hi3798cv200-sysctrl + - hisilicon,hi3516cv300-crg + - hisilicon,hi3516cv300-sysctrl + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 2 + description: | + First cell is reset request register offset. + Second cell is bit offset in reset request register. + + reset-controller: + type: object + description: | + Reset controller for Hi3798CV200 GMAC module + +required: + - compatible + - reg + - '#clock-cells' + - '#reset-cells' + +allOf: + - if: + properties: + compatible: + contains: + const: hisilicon,hi3798cv200-crg + then: + required: + - reset-controller + else: + properties: + reset-controller: false + +additionalProperties: false + +examples: + - | + clock-reset-controller@12010000 { + compatible = "hisilicon,hi3519-crg"; + reg = <0x12010000 0x10000>; + #clock-cells = <1>; + #reset-cells = <2>; + };