From patchwork Tue Mar 29 11:13:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 12794680 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E689C433EF for ; Tue, 29 Mar 2022 11:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mPcp2xJpqq4pK+R2dRxhTJ8Io66lJCmytlQYctp5jgs=; b=x/3Z7ZW3YlIthP DfFQQVqPLF1EaERrz7pL+a8fBtClPJCvFysoklJXdYxZQJrRvm2uqScgmJyihI7UHHwz9f7gYRq+w itinn/ITFFZ8+4xdixZuudtIlO+JO3Wel4jMBXdJWhPgVAp3QkqS1Tyi21qgxq1FpTDxwV6SA0RqF YWWwBt/lIZLT6BKVy1BtwWq9eMOajEiQJIy/QaHE9p9mn4IBe84TnLT//g3+56Uapm0A/pIqnF0G0 uE3ogYZz0wcrzUNiyvLMj+0OaQo31CkhglSAuVOczPy4Ej7Rw24zHNPf2pNxPpNCJISkLSJMds90/ wya2YHZ+rqhq/s0FC/kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZ9np-00BwRF-L0; Tue, 29 Mar 2022 11:14:21 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZ9nd-00BwO8-18; Tue, 29 Mar 2022 11:14:10 +0000 Received: by mail-ed1-x532.google.com with SMTP id a17so20279781edm.9; Tue, 29 Mar 2022 04:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PxcJiDdbE7d9vm0AfwIYwgNWepySifxgNOtcvatDr6o=; b=pHCskelTBY6sBuEICsuusFzahtE0A+kgs72vkDel2jLoFGc8gOYLwmR6bu5h6dHXB+ lYremxjpS4ZQ+RAbZ5aqJCACBi7hzG9VDv/g0bo0+U0QdN/SVxo+FVR0SpW5kCDBqCUR 63FZLWgGWUcskS9dqG0cBFP77A+jwZ7vbc4Y5JWJrPsu+PDnHi0PqdeUMr0IR1Sbg4gH 7lS9whfYJzot9dXkqszLZWZjdE5nq9xtVRPFCUNHk/r9WbyJmt1EnbxsPX/YgrSWvCMt T93NBjhKnX5I5E6mrNXLRUiIP7wjgInG7UcYS64l5hKM5rNA4ayRlN2MsIm/8AJO9QtC kz5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PxcJiDdbE7d9vm0AfwIYwgNWepySifxgNOtcvatDr6o=; b=Ki3hG4iGCTKwM/Hi3ErC7j0rYM+lbp3esM6OcOHhBnTUfjS8zwgiLdwq9FIpBuLrww CD1uRi72Ef70/Rc8DKqyWaP2ZfkaEx6mHTizgruHZ7T/uo0EfVKhsYHCpxHBWSGjay4z GPDY1HTG5uGhKpxfZ5RZ+jzmk+CgAE9wJtJk+OI2HI/15dsnTvsPVDofCm853UWz2eDS ekhpMEwaSRsxWL40688FgOUpgEORct0Pe+mgZcD+XVUC2rhDgWsGhQA7ag16gmDFYTOv +RauLeuHO+uNiLffo1YWPC5+GPDlzeJi+9+mZKBE8HoJ53Gu4ZM/Ltcs1vbZUqS08Df4 O33Q== X-Gm-Message-State: AOAM533kmjm31+g7vKIFovMv8/1W6hDPD8RtFf0UKZbwOtUM0xbGpdC3 LHTd62x2WZMEBY+V0M/hfR0= X-Google-Smtp-Source: ABdhPJzbC4KuVhUDoK/G3dsFDGpbcJKcclauxdnPk2s6gxM3jBbloUNgn5BlOGd0JqRIr4DAU7Ve7A== X-Received: by 2002:a05:6402:34c9:b0:419:53d2:83d0 with SMTP id w9-20020a05640234c900b0041953d283d0mr3812324edc.308.1648552445629; Tue, 29 Mar 2022 04:14:05 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id u3-20020a17090657c300b006d01de78926sm7006844ejr.22.2022.03.29.04.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 04:14:04 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de, zhangqing@rock-chips.com Cc: robh+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] dt-bindings: clock: convert rockchip, rk3188-cru.txt to YAML Date: Tue, 29 Mar 2022 13:13:22 +0200 Message-Id: <20220329111323.3569-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220329_041409_100174_1C37B1B5 X-CRM114-Status: GOOD ( 19.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Current dts files with RK3188/RK3066 'cru' nodes are manually verified. In order to automate this process rockchip,rk3188-cru.txt has to be converted to YAML. Changed: Add properties to fix notifications by clocks.yaml for example: clocks clock-names Signed-off-by: Johan Jonker Reviewed-by: Krzysztof Kozlowski --- Changed V3: add Rockchip maintainer on her request fix yamllint line too long Changed V2: change clocks maxItems add clock-names use clock-controller node name remove assigned-xxx --- .../bindings/clock/rockchip,rk3188-cru.txt | 61 --------------- .../bindings/clock/rockchip,rk3188-cru.yaml | 78 +++++++++++++++++++ 2 files changed, 78 insertions(+), 61 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.yaml diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt deleted file mode 100644 index 7f368530a..000000000 --- a/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt +++ /dev/null @@ -1,61 +0,0 @@ -* Rockchip RK3188/RK3066 Clock and Reset Unit - -The RK3188/RK3066 clock controller generates and supplies clock to various -controllers within the SoC and also implements a reset controller for SoC -peripherals. - -Required Properties: - -- compatible: should be "rockchip,rk3188-cru", "rockchip,rk3188a-cru" or - "rockchip,rk3066a-cru" -- reg: physical base address of the controller and length of memory mapped - region. -- #clock-cells: should be 1. -- #reset-cells: should be 1. - -Optional Properties: - -- rockchip,grf: phandle to the syscon managing the "general register files" - If missing pll rates are not changeable, due to the missing pll lock status. - -Each clock is assigned an identifier and client nodes can use this identifier -to specify the clock which they consume. All available clocks are defined as -preprocessor macros in the dt-bindings/clock/rk3188-cru.h and -dt-bindings/clock/rk3066-cru.h headers and can be used in device tree sources. -Similar macros exist for the reset sources in these files. - -External clocks: - -There are several clocks that are generated outside the SoC. It is expected -that they are defined using standard clock bindings with following -clock-output-names: - - "xin24m" - crystal input - required, - - "xin32k" - rtc clock - optional, - - "xin27m" - 27mhz crystal input on rk3066 - optional, - - "ext_hsadc" - external HSADC clock - optional, - - "ext_cif0" - external camera clock - optional, - - "ext_rmii" - external RMII clock - optional, - - "ext_jtag" - externalJTAG clock - optional - -Example: Clock controller node: - - cru: cru@20000000 { - compatible = "rockchip,rk3188-cru"; - reg = <0x20000000 0x1000>; - rockchip,grf = <&grf>; - - #clock-cells = <1>; - #reset-cells = <1>; - }; - -Example: UART controller node that consumes the clock generated by the clock - controller: - - uart0: serial@10124000 { - compatible = "snps,dw-apb-uart"; - reg = <0x10124000 0x400>; - interrupts = ; - reg-shift = <2>; - reg-io-width = <1>; - clocks = <&cru SCLK_UART0>; - }; diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.yaml b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.yaml new file mode 100644 index 000000000..ddd7e46af --- /dev/null +++ b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/rockchip,rk3188-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3188/RK3066 Clock and Reset Unit (CRU) + +maintainers: + - Elaine Zhang + - Heiko Stuebner + +description: | + The RK3188/RK3066 clock controller generates and supplies clocks to various + controllers within the SoC and also implements a reset controller for SoC + peripherals. + Each clock is assigned an identifier and client nodes can use this identifier + to specify the clock which they consume. All available clocks are defined as + preprocessor macros in the dt-bindings/clock/rk3188-cru.h and + dt-bindings/clock/rk3066-cru.h headers and can be used in device tree sources. + Similar macros exist for the reset sources in these files. + There are several clocks that are generated outside the SoC. It is expected + that they are defined using standard clock bindings with following + clock-output-names: + - "xin24m" - crystal input - required + - "xin32k" - RTC clock - optional + - "xin27m" - 27mhz crystal input on RK3066 - optional + - "ext_hsadc" - external HSADC clock - optional + - "ext_cif0" - external camera clock - optional + - "ext_rmii" - external RMII clock - optional + - "ext_jtag" - external JTAG clock - optional + +properties: + compatible: + enum: + - rockchip,rk3066a-cru + - rockchip,rk3188-cru + - rockchip,rk3188a-cru + + reg: + maxItems: 1 + + "#clock-cells": + const: 1 + + "#reset-cells": + const: 1 + + clocks: + maxItems: 1 + + clock-names: + const: xin24m + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon managing the "general register files" (GRF), + if missing pll rates are not changeable, due to the missing pll + lock status. + +required: + - compatible + - reg + - "#clock-cells" + - "#reset-cells" + +additionalProperties: false + +examples: + - | + cru: clock-controller@20000000 { + compatible = "rockchip,rk3188-cru"; + reg = <0x20000000 0x1000>; + rockchip,grf = <&grf>; + #clock-cells = <1>; + #reset-cells = <1>; + }; From patchwork Tue Mar 29 11:13:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 12794679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 311B6C433F5 for ; Tue, 29 Mar 2022 11:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hEyX77VgeMpqdYN7tDdQ7u0El/dBu+slNA/1TxaNaN4=; b=bmjawVhhtHenOf 7CtEcZeiOjuiDWku9AJcco15bEzViKAQKhLyz3P13QkOe9TZ7bcpci07pEW47+5qzjH4Ockg6m3pQ LKhGP9Qz21ZwoZUBQaG5NwoCN2iS3oXu2dKBtmIlq5OwVz76HdoACDMv/h3HBeTOFMgPgkGAIwCBS lLBCE8Bg4N954+Vmgv9UL52FqtMma0lTXuL/iv1P0S+VC+zmcQvUqJvgp3/EqaoIl3xBwtNVT+d6Y 8hTr7ovxoQ87HaWZhz/xlda4TLyNHoUUIa0UYt7QJEskr4xhJEqFUTvXlRmk4dpPH3f0otfsuqKm4 wPcpHm42U8/XJaK00TuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZ9nf-00BwP0-P2; Tue, 29 Mar 2022 11:14:11 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZ9nc-00BwO9-F3; Tue, 29 Mar 2022 11:14:09 +0000 Received: by mail-ed1-x534.google.com with SMTP id r23so20311626edb.0; Tue, 29 Mar 2022 04:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9VcDy2eNu6zj3ojAJOI8YY4Y8u6xcG4aGKHl4udgapM=; b=V5QsH+2onl3V2K7/qMMnP3xRE7D2OQSwXl+udTtOIeKGKu52DRJkFiQs9pRlTb9VXz MUIL91319MYihfoMWGVum2bYCPSgWBUy6xbVZ18NfDwN7VpUroxuxcFaxkO/ckvIxkkc LdbvnX1OrkJHaXzW4yscUl1oxvh9YvXS4Tu+hSRKa6kfy1iRouEfI/tB0n3IF8GYuUN9 7Z09PAnMGQ6A3SIgNXVVsVSMrD6dqav7oCZQuNKV6BnnTkYo/cftyq9FxOPcxdqx6Qvb aUhj/8KducT6DxqRjlUUUbGdD4YqCUmisPnGr3DS5tTKFvx3WKTN4o61RoBngQOXEzr2 np/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9VcDy2eNu6zj3ojAJOI8YY4Y8u6xcG4aGKHl4udgapM=; b=7oe3V/h7JInob8+yXmZA8ozfbd2ugxI1iaVtNYQ0eDpblYYziu1zKQ/Wg4iDhNbJl3 i8V7/aCUAuqNaBxAS+cEyqmnV7a20okciD2leGKLAtGeCirLePMVCYj2W+Oxji6s4P8o OOseA7Ug9NzJJBLvC0JzCKvmjhqeCCwZB36Mr/9TxD1ECt6nVnXeImD5cieK55fhiUfy 33/l1qSxk0ZP7vRrdBa9ofxI5N6/13CckzmoSwpgzpPlO0xYL83mo3KKd2HjkUDgOqNA lNr2S97PkpwvPcK0EeKxpDt926RAemdHz3H5BZQYiYOkb5MS0HS37VlinWQ1+P/u61RO 54gQ== X-Gm-Message-State: AOAM531iF9ESeu+hIsqJDZMmUFpQaN55EWQFF05kOId7L9ODBQkSRHu+ 64ytJg4IyH4f81EOTLjKFsQ= X-Google-Smtp-Source: ABdhPJyGYRSeP/JOed6F3ZwWdEuBiK2pphyO1xSQQf4WX4orYSxfJ8d/HQYcUZ58o/BQHrXIji52Qg== X-Received: by 2002:a50:bac3:0:b0:418:edb0:4ae8 with SMTP id x61-20020a50bac3000000b00418edb04ae8mr3749755ede.219.1648552446475; Tue, 29 Mar 2022 04:14:06 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id u3-20020a17090657c300b006d01de78926sm7006844ejr.22.2022.03.29.04.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 04:14:06 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de, zhangqing@rock-chips.com Cc: robh+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/2] ARM: dts: rockchip: add clocks property to cru node rk3066a/rk3188 Date: Tue, 29 Mar 2022 13:13:23 +0200 Message-Id: <20220329111323.3569-2-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220329111323.3569-1-jbx6244@gmail.com> References: <20220329111323.3569-1-jbx6244@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220329_041408_554334_7303FA97 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add clocks property to rk3066a/rk3188 cru node to fix warnings like: 'clocks' is a dependency of 'assigned-clocks' Signed-off-by: Johan Jonker --- arch/arm/boot/dts/rk3066a.dtsi | 3 ++- arch/arm/boot/dts/rk3188.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi index c25b9695d..de9915d94 100644 --- a/arch/arm/boot/dts/rk3066a.dtsi +++ b/arch/arm/boot/dts/rk3066a.dtsi @@ -202,8 +202,9 @@ cru: clock-controller@20000000 { compatible = "rockchip,rk3066a-cru"; reg = <0x20000000 0x1000>; + clocks = <&xin24m>; + clock-names = "xin24m"; rockchip,grf = <&grf>; - #clock-cells = <1>; #reset-cells = <1>; assigned-clocks = <&cru PLL_CPLL>, <&cru PLL_GPLL>, diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi index a94321e90..cdd4a0bd5 100644 --- a/arch/arm/boot/dts/rk3188.dtsi +++ b/arch/arm/boot/dts/rk3188.dtsi @@ -195,8 +195,9 @@ cru: clock-controller@20000000 { compatible = "rockchip,rk3188-cru"; reg = <0x20000000 0x1000>; + clocks = <&xin24m>; + clock-names = "xin24m"; rockchip,grf = <&grf>; - #clock-cells = <1>; #reset-cells = <1>; };