From patchwork Thu Feb 9 13:41:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13134641 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 60DFBC05027 for ; Thu, 9 Feb 2023 13:44:25 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TrBBxEvL0qvKmlfrYGi4ni2fDijlMqalXPqQ6SK/9eU=; b=TKJigh4Jsxilh+ tB3O5HCRKQ2/KFQqHpohU0LgcTysA9VHa/hgqjABi1y4wz4dh63ZKiA/Qef+Ay8vC62AU9iquHjt8 hyfUWZ97s8eb1q3PRkQo1dEozrjNZd3BTKEXFadus04kQUpO6iL4qcBRe08TcwhfXXhR+RLc/98lI 8BZ9+4YhFPtWiW/Y8ztd+Mu3S6aUwwTmoDLq6B/hCPz1VusYz7qi+0JtvPU1kwfVVpwmLNSmgMg+u q7ppVZwLt35QOY1w97xakj3CWL+tSuBWe/fMo9TY2ScZu6Pu/lXolZKGQJDZW+ZHjg6Wn1kl+rR1f o3FH9TBXbuu+LP9OdNzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7Dd-001nZH-Ps; Thu, 09 Feb 2023 13:44:09 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7BG-001mJk-Qx for linux-amlogic@lists.infradead.org; Thu, 09 Feb 2023 13:41:46 +0000 Received: by mail-wm1-x330.google.com with SMTP id bg26so1493485wmb.0 for ; Thu, 09 Feb 2023 05:41:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CU99A3qAz7AXXrQplpT1MuuDMQU9ldkAjGA2AqUf0T0=; b=ImlKFUeQ2taGX0SvIp26PSGxKa3dwwl1tmuZ5M06ujHzWh3hl3rd60sY83lv+qCenI 0qSza1Y/OBLJB+j9fCJpRl32j0bK+sa8GFPagG81MyG0fN7r5iK+CVleCcV/URfEAB0f AVa9JouaiSTi2Viojvw8h2p3FFt9reL9nJzooThQQbCy5F9Awhulg9YjFhRrCKOAIc7y WqVkmKaX9fAxus7LCSrQlMrSF0mzvcuZ8TPCMbhx4G6LEjg8VmfnyCbGQChwu2/Td8uQ CXAgnnxdZ6xPgXTbLqTnea8RHfK0GHRaB/iw/beQkRv2WbIFDVj/qXFiSehgBSb+GDJQ h61g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CU99A3qAz7AXXrQplpT1MuuDMQU9ldkAjGA2AqUf0T0=; b=E9mrTrb1yKspjleY8pPFd1Qp2J9N9bVbfku/HwZVEfjfUNxnpRdhwIVMHeQ/HKDp7s iId3a9dUmnZ+NM439GbhI71EyYylw7XVgL3DXEiyqrygPxx0b95pV6ecNbtKlIdosGNN xoiMl3LwsJcT/gAfPDJgPQBcDTvHhO8x+vK8xLKTxa8dxAiurJgYo+HHgTxVDIpmBpXH jaiijhaOWHAZsM1xmGXObgDe5aXajx9sQJRdU3ma5WJOS0uoN97/ic1nuxvjQToSJacL eVkNw0+guWIOoxBGXWYpX+iv43ugEBGujRRSc9+qD/St35eZziRvbklqyS91m+FG/yfK lnIA== X-Gm-Message-State: AO0yUKVuJ4dmg6sUBQpyj+PlqdZQmlliCbmrAwqR95i+N9Uyf5oXzXdj LReYBOc0ob30LH+2/lJ0oyfMRQ== X-Google-Smtp-Source: AK7set9KbStsFCWSuek/BkTuzJIPXd3DaYisd2ak/58gga5zQlIerOgkiYECAD2ikHl+dqpxsBFq8g== X-Received: by 2002:a05:600c:2e94:b0:3df:e46f:c226 with SMTP id p20-20020a05600c2e9400b003dfe46fc226mr9731856wmn.16.1675950100407; Thu, 09 Feb 2023 05:41:40 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003dfe549da4fsm4946991wmi.18.2023.02.09.05.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:41:39 -0800 (PST) From: Neil Armstrong Date: Thu, 09 Feb 2023 14:41:37 +0100 Subject: [PATCH 1/6] dt-bindings: rtc: convert rtc-meson-vrtc.txt to dt-schema MIME-Version: 1.0 Message-Id: <20230209-b4-amlogic-bindings-convert-take2-v1-1-c4fe9049def9@linaro.org> References: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_054142_992206_C49EE838 X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Convert the Amlogic Virtual RTC bindings to dt-schema. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Reviewed-by: Krzysztof Kozlowski --- .../bindings/rtc/amlogic,meson-vrtc.yaml | 42 ++++++++++++++++++++++ .../devicetree/bindings/rtc/rtc-meson-vrtc.txt | 22 ------------ 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml b/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml new file mode 100644 index 000000000000..1d5694c08965 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/amlogic,meson-vrtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Virtual RTC (VRTC) + +maintainers: + - Neil Armstrong + +description: + The interface is 1 register where an alarm time (in seconds) is to be written. + + The alarm register is a simple scratch register shared between the + application processors (AP) and the secure co-processor (SCP). + When the AP suspends, the SCP will use the value of this register to + program an always-on timer before going sleep. When the timer expires, + the SCP will wake up and will then wake the AP. + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + const: amlogic,meson-vrtc + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + vrtc: rtc@a8 { + compatible = "amlogic,meson-vrtc"; + reg = <0x000a8 0x4>; + }; diff --git a/Documentation/devicetree/bindings/rtc/rtc-meson-vrtc.txt b/Documentation/devicetree/bindings/rtc/rtc-meson-vrtc.txt deleted file mode 100644 index c014f54a9853..000000000000 --- a/Documentation/devicetree/bindings/rtc/rtc-meson-vrtc.txt +++ /dev/null @@ -1,22 +0,0 @@ -* Amlogic Virtual RTC (VRTC) - -This is a Linux interface to an RTC managed by firmware, hence it's -virtual from a Linux perspective. The interface is 1 register where -an alarm time (in seconds) is to be written. - -Required properties: -- compatible: should be "amlogic,meson-vrtc" -- reg: physical address for the alarm register - -The alarm register is a simple scratch register shared between the -application processors (AP) and the secure co-processor (SCP.) When -the AP suspends, the SCP will use the value of this register to -program an always-on timer before going sleep. When the timer expires, -the SCP will wake up and will then wake the AP. - -Example: - - vrtc: rtc@0a8 { - compatible = "amlogic,meson-vrtc"; - reg = <0x0 0x000a8 0x0 0x4>; - }; From patchwork Thu Feb 9 13:41:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13134643 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 51A09C05027 for ; Thu, 9 Feb 2023 13:45:21 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NkmiXTdp3Mw0VoaWyaJSRLW2kwn7zmd4eKFY3fcJwio=; b=RtFsCNAK4/Taty pQhQ4Y5hBouY5ZJfLPUyU6hvrnhZn8OrYzpSK9NIEOV2uYmbKEWmw49+3gAYmVHb8G0dT4YJjLbhN q0v0W52unABnraOB6JcTfOUP8MQhF6nQGYYNdmthFsqZx1YXQ1W06ua41U/aEn7Fp8QoYigXpMRGk Boau3IUi0Fs2M5zgtIL7CSS2cIWb3EQSEiuh2L0cvk848DE0ru0AlyA3o14y6t2Y2yMf7PW+BJ8Iz V9oDTBaAdlcGTTFwZ6z8CrdbYD/RqFFs+LGVsHSg0VPd5uaORzr6FO5wplJ0i6AXvPADP2bLsXFyw LU0lUE7+3ZaSCDNyu8SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7Ec-001o34-Lj; Thu, 09 Feb 2023 13:45:10 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7BH-001mK7-Jw for linux-amlogic@lists.infradead.org; Thu, 09 Feb 2023 13:41:46 +0000 Received: by mail-wm1-x335.google.com with SMTP id l37-20020a05600c1d2500b003dfe46a9801so1585370wms.0 for ; Thu, 09 Feb 2023 05:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RGW2oT94HK6ngpZmBKHolnNTHtBBlnG2dCVlzG6CWeE=; b=Qledw9xPLq/PvO+4IvdhHggxZshP/QGS+twZn4DOnVjLBXRpws8wY3UzjQhwfiMu79 JWq3NT4amqXdro2bvg24B6Cf+b6Iijvzbmdy61S/HZdaYpP/89NIBjQ3bX3A0t0P71Bs MJ2R49zCyJBkDiASjvFg7g4WVnjFqH3VBZ92ljgajD5R4dLyMCL/IfAzBgYD+ycYRxm6 exNEAZVJiFPPoylgypSxcFv6sZY2pp+xVqoIFD4G2NFwy9py+nbEaCv6M+YcH0TAAwGF WLRviEUCziru4V1XyMKO13ycJ6cRFj1nyzRlIN/PBD5QGmtofk2kmwIS8PGyJIsebDOr q9Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RGW2oT94HK6ngpZmBKHolnNTHtBBlnG2dCVlzG6CWeE=; b=KOvwIq2b3Q2lGWMLQVmY9rbqiAKsSIBF2uUDdFphSWH7dPkoJ5kI/9L0sE3ITcG6Ep ebEsbPZMZ+1kdwL882az6hEeHBmUgiztvMa6TmVe/8iceCA3TPcttESZaFJp++v505n/ 4oineNhwpJbVar0AcTcqEaGMca1ay6WEpbYTpoV9DxWcJw4H917z4sa1K0i0L/LpbEYU LYe4Ph3S3YZRIzPrfjj4tnWsekH6VHHBE9qoQmLOsD0lkxin19UqakodhZP2JFfTMFr6 BEFkl4OrvNMuerSKeC66rI6YQdzMV2h3pjoO4xPi+3grLcheA35xFhDh/1vgYHOWmUSC urmw== X-Gm-Message-State: AO0yUKVGlX8hxfyeCiAVOl65+8R4IV4aLQ5R2PfD4APuxa16OuVgB4Lr IXltpBeKMBtvn+M6NZ52ImiVjA== X-Google-Smtp-Source: AK7set8tF+m+2BDy4Jqj9n4mBkHnqUS7RpYgJU7ApYsJuiqWKroRaqouDy7YBCcw28uEE1HvKDcWAQ== X-Received: by 2002:a05:600c:3416:b0:3df:50eb:7ca6 with SMTP id y22-20020a05600c341600b003df50eb7ca6mr10258428wmp.15.1675950101385; Thu, 09 Feb 2023 05:41:41 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003dfe549da4fsm4946991wmi.18.2023.02.09.05.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:41:41 -0800 (PST) From: Neil Armstrong Date: Thu, 09 Feb 2023 14:41:38 +0100 Subject: [PATCH 2/6] dt-bindings: soc: amlogic: convert clk-measure.txt to dt-schema MIME-Version: 1.0 Message-Id: <20230209-b4-amlogic-bindings-convert-take2-v1-2-c4fe9049def9@linaro.org> References: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_054143_696983_094655BF X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Convert the Amlogic Internal Clock Measurer bindings to dt-schema. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski --- .../soc/amlogic/amlogic,meson-gx-clk-measure.yaml | 40 ++++++++++++++++++++++ .../bindings/soc/amlogic/clk-measure.txt | 21 ------------ 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-clk-measure.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-clk-measure.yaml new file mode 100644 index 000000000000..77c281153010 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-clk-measure.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-clk-measure.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Internal Clock Measurer + +description: + The Amlogic SoCs contains an IP to measure the internal clocks. + The precision is multiple of MHz, useful to debug the clock states. + +maintainers: + - Neil Armstrong + +properties: + compatible: + enum: + - amlogic,meson-gx-clk-measure + - amlogic,meson8-clk-measure + - amlogic,meson8b-clk-measure + - amlogic,meson-axg-clk-measure + - amlogic,meson-g12a-clk-measure + - amlogic,meson-sm1-clk-measure + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + clock-measure@8758 { + compatible = "amlogic,meson-gx-clk-measure"; + reg = <0x8758 0x10>; + }; diff --git a/Documentation/devicetree/bindings/soc/amlogic/clk-measure.txt b/Documentation/devicetree/bindings/soc/amlogic/clk-measure.txt deleted file mode 100644 index 3dd563cec794..000000000000 --- a/Documentation/devicetree/bindings/soc/amlogic/clk-measure.txt +++ /dev/null @@ -1,21 +0,0 @@ -Amlogic Internal Clock Measurer -=============================== - -The Amlogic SoCs contains an IP to measure the internal clocks. -The precision is multiple of MHz, useful to debug the clock states. - -Required properties: -- compatible: Shall contain one of the following : - "amlogic,meson-gx-clk-measure" for GX SoCs - "amlogic,meson8-clk-measure" for Meson8 SoCs - "amlogic,meson8b-clk-measure" for Meson8b SoCs - "amlogic,meson-axg-clk-measure" for AXG SoCs - "amlogic,meson-g12a-clk-measure" for G12a SoCs - "amlogic,meson-sm1-clk-measure" for SM1 SoCs -- reg: base address and size of the Clock Measurer register space. - -Example: - clock-measure@8758 { - compatible = "amlogic,meson-gx-clk-measure"; - reg = <0x0 0x8758 0x0 0x10>; - }; From patchwork Thu Feb 9 13:41:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13134642 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 AF45FC636D6 for ; Thu, 9 Feb 2023 13:45:21 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8rAtiKEzJV0ZK2x4LCeOhqEc0//KBiqspovEbryLoiU=; b=4QSKVLn+9Jef5H WRc35h3A+F9Gip8ja2vKOgauka55IOBJHXWN5rDmPn2G6xCgnb+AAkTm+PzhGnfKOV7IAxob4awqa 7skgxlUhtZmnqs+yKQWI9ZiKaPPscbNUIgenQ8CkA4v+d0tduwcewyXLJW0JqSrDAoYq8YbqNHLu3 CU1+ys1Wtwe7grqZpw0zMTim9YsnSuGc3Ufuf3QJNcqgCS6bd6Ux1uX5gO2DDMvnrT+ESSAfn/+4r OG5I+ZtO9V81i3zv3lCuYQetu1pCilIXY6iJyO+8w2CLvjLOljCBSsbqBthCd4bBds30BH7AbDJzX 15ZJiwBAmCNDwZ6KysIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7Ea-001o22-UB; Thu, 09 Feb 2023 13:45:08 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7BI-001mL2-NS for linux-amlogic@lists.infradead.org; Thu, 09 Feb 2023 13:41:48 +0000 Received: by mail-wm1-x332.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so3899652wma.1 for ; Thu, 09 Feb 2023 05:41:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DjLQ6k0eKtXjQgrCbXriLkzXKMYzM/hKWrkASWGobfc=; b=mLWrjSKmdpGUaYDAQZICxLSAs7ZKrnHVZVKfVMia/8ggNhMzJKm1PbELGzCVEp4P6P GV5X7yqJYTmZKPs7A1B73sYqHrQtxASN0f4t9HJnf8snZPE52n4bn4AdbaerH68pSmrH 4430KlCz4zA/sGWku5Dvsq3e5Yq/b/Wkxe419l/FC6AcWdy1HJ31dCU00yftQLoto8qZ 9729k5Draj6qbMyc+XufEqxgtLatzbXK/Mf2+ggx9OisMzo/xoLmVsxGqSnaoogqIrLl pnAGufiAbevEvkTHgCXWgr+pPAjdrO98VbecW+t0wA8kj3rzheusqdkdRI6tkMWHD/zm ABXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DjLQ6k0eKtXjQgrCbXriLkzXKMYzM/hKWrkASWGobfc=; b=g0gF2QffX7rCCIybMPV9GRNpJMg8Mm1oso0wjCgnuz/LiQtCWd8wTz1pbKKU4VY2IH NlQDX120wzKmUZvtpZVh9AJOfZTRNIjnjGo94MSPZxPlWFF1woIhVSJs8vp7BqV0fHuz yqZuoO2JX85JKcROlflsZcV/5/peO6OM33RQduoOGe6EqzbH5HpAkN2AXaYGZuOXBuki ahZzAPGFMlOLcc+uEHczv3ledufNSpsbA66Imoet69nE8gw1Wjpz8cFAOe3A6B9RPj9I ZhopmXBvwrkuDhUFZny+4xCrhVj2Dykz5vL676nu0+OmApewKrIDt3moYDby/2kO/VF7 AicA== X-Gm-Message-State: AO0yUKW2mLtjnO6nnQSrVck2kaQNIlLXkniGLYlOsA6HfGo+MVuraaIF W7d0Atk6oXlfd0oV252XNhnTgvL9dVOuwtg0H9Y= X-Google-Smtp-Source: AK7set9vgmNMX33CebLjgnK/NCuxhWo3nDtnIa0yVi6jVPXlG+ofn9yTRMMHHwUsy0duwDeSmANpIQ== X-Received: by 2002:a05:600c:511e:b0:3df:9858:c038 with SMTP id o30-20020a05600c511e00b003df9858c038mr6116913wms.13.1675950102431; Thu, 09 Feb 2023 05:41:42 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003dfe549da4fsm4946991wmi.18.2023.02.09.05.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:41:42 -0800 (PST) From: Neil Armstrong Date: Thu, 09 Feb 2023 14:41:39 +0100 Subject: [PATCH 3/6] dt-bindings: soc: amlogic: document System Control registers MIME-Version: 1.0 Message-Id: <20230209-b4-amlogic-bindings-convert-take2-v1-3-c4fe9049def9@linaro.org> References: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_054144_865868_1B3A00E7 X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Document the System Control registers regions found on all Amlogic SoC families and it's clock, power, pinctrl and phy subnodes. The regions has various independent registers tied to other hardware devices, thus the syscon compatible. Clock controllers and Pinctrl devices are not yet documented, the definition of those will be updated in a second time. Signed-off-by: Neil Armstrong --- .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml new file mode 100644 index 000000000000..672eabd90c09 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml @@ -0,0 +1,109 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Meson System Control registers + +maintainers: + - Neil Armstrong + +properties: + compatible: + items: + - enum: + - amlogic,meson-gx-hhi-sysctrl + - amlogic,meson-gx-ao-sysctrl + - amlogic,meson-axg-hhi-sysctrl + - amlogic,meson-axg-ao-sysctrl + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + clock-controller: + type: object + + power-controller: + $ref: /schemas/power/amlogic,meson-ee-pwrc.yaml + + pinctrl: + type: object + + phy: + type: object + +allOf: + - if: + properties: + compatible: + enum: + - amlogic,meson-gx-hhi-sysctrl + - amlogic,meson-axg-hhi-sysctrl + then: + required: + - power-controller + + - if: + properties: + compatible: + enum: + - amlogic,meson-gx-ao-sysctrl + - amlogic,meson-axg-ao-sysctrl + then: + required: + - pinctrl + + - if: + properties: + compatible: + enum: + - amlogic,meson-axg-hhi-sysctrl + then: + properties: + phy: + oneOf: + - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml + - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml + +required: + - compatible + - reg + - clock-controller + +unevaluatedProperties: false + +examples: + - | + sysctrl: system-controller@0 { + compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"; + reg = <0 0x400>; + + clock-controller { }; + + power-controller { + compatible = "amlogic,meson-gxbb-pwrc"; + #power-domain-cells = <1>; + amlogic,ao-sysctrl = <&sysctrl_AO>; + + resets = <&reset_viu>, + <&reset_venc>, + <&reset_vcbus>, + <&reset_bt656>, + <&reset_dvin>, + <&reset_rdma>, + <&reset_venci>, + <&reset_vencp>, + <&reset_vdac>, + <&reset_vdi6>, + <&reset_vencl>, + <&reset_vid_lock>; + reset-names = "viu", "venc", "vcbus", "bt656", "dvin", + "rdma", "venci", "vencp", "vdac", "vdi6", + "vencl", "vid_lock"; + clocks = <&clk_vpu>, <&clk_vapb>; + clock-names = "vpu", "vapb"; + }; + }; From patchwork Thu Feb 9 13:41:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13134645 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 C9633C636D7 for ; Thu, 9 Feb 2023 13:45:23 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IZY1F722LpGfv2/jqqBK4L1GDNWjGw5M9AiFjcaVeQI=; b=myxudrv6ozDC4F 5xj5jLOExNCzHMC7cYLCqiK+GQMr+1HyPaGaOQ9vSCn50WjM+A3luiGCf4PtfdZUea/3sO8MB/Skc VS8Ou5nA9VEgi9LJuhz/HlC6t9CFL4EGiwq5yBnUEjr11++7NrWoKgTknZ3qK/TRsimtcBaYA60fQ 0kS/lSjdj6vdqv5CmYoSBnAdA5gniDXYC4vLZ+c2K/KnoZwAeQWNvo4wqWoXc0PnGx60ZQtRTjdEv XT1H26dv3u3XK403950nJ+1wqcmvsal7yXcFLsEON7kiD5xeF1043J/Qkj0cw+ugF8dPFShJ0YoA4 cMTSOvUeqS/q/pBRrmrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7Ef-001o4s-GO; Thu, 09 Feb 2023 13:45:13 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7BJ-001mM2-QC for linux-amlogic@lists.infradead.org; Thu, 09 Feb 2023 13:41:49 +0000 Received: by mail-wm1-x32b.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so1559600wms.1 for ; Thu, 09 Feb 2023 05:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=TtExAhyASjCaoXqGCyD4SFP8HX8WU84xqgiQDTtv4mE=; b=DZ4iuTh3FtikDJN19LSa9P+ch6kwH06TXcGr9O5HsoP3GNbzqz6d3zOWkobQxkNfUu 0cC8pZRAUn/bMNiaFwNSIkrTSmGU4WYQAJ3RbxSupAdJm9hMBEyjmsIUNJkhxFXKpY6J gounMRJc4gd7VaL14Se5D5QxNkW54DZvWDkws+pZthuPynORhmggp5Wi8x29AYV6BciX DgNgLCI8hSuU+tbc28CYbe8joB60yi0BmKiSUH+TfJfH/HIjd1b8Hye/nWtGlVDR1aEH 2An59fO1i3LypUeM/iOTlWN89K26GPchHe4ptteYzlqjjQtl0YiH99+99vNMaQbMKtxN Xbqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TtExAhyASjCaoXqGCyD4SFP8HX8WU84xqgiQDTtv4mE=; b=BjAPAb58wxCcWPHGHqqn/85LxF4SRWncleMxjJbJHxdfRi7ZgghbCfdYSLhI+4LWyP 6KsZIi+p+XHGYwhlqYAxRtRLqecE+JeuysB1JTTYWy6jpLf8LCkWZqPVHZzZpsgRZLLb AY52AB/35DJS244f/9z4r3madYuiZl2T2egE7xuq45tjlQZdqyYQicujU5ZIptvPAiJE hT0Ioqgc74c3gsNuSOp2KKp2BAIJqY3vvN9Z131nksAvQ/tqwYjW/FcAYrM+afwmq/Ug X0Zq8w3/Aes04aI+IGA2dC9h9AwDCKhUJAZgpN2O+101Lq3fUpNRsDG4mU+RoVvUOT6k OZKQ== X-Gm-Message-State: AO0yUKWG8D7+d6dodBJ/ZQpS6CP/QEZML48YKbQ+UJtTcBQXd0TBsk0o D+chQTlZoiLhYyavBUteHq0cGA== X-Google-Smtp-Source: AK7set8OFp887uOX9Ujf+dz1+EFOgo9XzvM2Bd1CPJzipfjT2n3QdC2yiT6YQ+Mf8MBKOgqIE4ewUQ== X-Received: by 2002:a05:600c:13d4:b0:3df:e1e9:200e with SMTP id e20-20020a05600c13d400b003dfe1e9200emr10046874wmg.39.1675950103457; Thu, 09 Feb 2023 05:41:43 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003dfe549da4fsm4946991wmi.18.2023.02.09.05.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:41:43 -0800 (PST) From: Neil Armstrong Date: Thu, 09 Feb 2023 14:41:40 +0100 Subject: [PATCH 4/6] dt-bindings: soc: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema MIME-Version: 1.0 Message-Id: <20230209-b4-amlogic-bindings-convert-take2-v1-4-c4fe9049def9@linaro.org> References: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_054145_919612_54165776 X-CRM114-Status: GOOD ( 15.94 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Convert the Amlogic Clock Controller bindings to dt-schema. Signed-off-by: Neil Armstrong --- .../bindings/clock/amlogic,gxbb-clkc.txt | 53 ---------------------- .../bindings/clock/amlogic,gxbb-clkc.yaml | 51 +++++++++++++++++++++ 2 files changed, 51 insertions(+), 53 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt deleted file mode 100644 index 7ccecd5c02c1..000000000000 --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt +++ /dev/null @@ -1,53 +0,0 @@ -* Amlogic GXBB Clock and Reset Unit - -The Amlogic GXBB clock controller generates and supplies clock to various -controllers within the SoC. - -Required Properties: - -- compatible: should be: - "amlogic,gxbb-clkc" for GXBB SoC, - "amlogic,gxl-clkc" for GXL and GXM SoC, - "amlogic,axg-clkc" for AXG SoC. - "amlogic,g12a-clkc" for G12A SoC. - "amlogic,g12b-clkc" for G12B SoC. - "amlogic,sm1-clkc" for SM1 SoC. -- clocks : list of clock phandle, one for each entry clock-names. -- clock-names : should contain the following: - * "xtal": the platform xtal - -- #clock-cells: should be 1. - -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/gxbb-clkc.h header and can be -used in device tree sources. - -Parent node should have the following properties : -- compatible: "syscon", "simple-mfd, and "amlogic,meson-gx-hhi-sysctrl" or - "amlogic,meson-axg-hhi-sysctrl" -- reg: base address and size of the HHI system control register space. - -Example: Clock controller node: - -sysctrl: system-controller@0 { - compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd"; - reg = <0 0 0 0x400>; - - clkc: clock-controller { - #clock-cells = <1>; - compatible = "amlogic,gxbb-clkc"; - clocks = <&xtal>; - clock-names = "xtal"; - }; -}; - -Example: UART controller node that consumes the clock generated by the clock - controller: - - uart_AO: serial@c81004c0 { - compatible = "amlogic,meson-uart"; - reg = <0xc81004c0 0x14>; - interrupts = <0 90 1>; - clocks = <&clkc CLKID_CLK81>; - }; diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml new file mode 100644 index 000000000000..412453fc75e4 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Clock Controller + +maintainers: + - Neil Armstrong + +properties: + compatible: + enum: + - amlogic,gxbb-clkc + - amlogic,gxl-clkc + - amlogic,axg-clkc + - amlogic,g12a-clkc + - amlogic,g12b-clkc + - amlogic,sm1-clkc + + clocks: + maxItems: 1 + + clock-names: + const: xtal + + '#clock-cells': + const: 1 + +required: + - compatible + - clocks + - clock-names + - '#clock-cells' + +unevaluatedProperties: false + +examples: + - | + sysctrl: system-controller@0 { + compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"; + reg = <0 0x400>; + + clkc: clock-controller { + compatible = "amlogic,gxbb-clkc"; + #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; + }; + }; From patchwork Thu Feb 9 13:41:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13134644 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 1574AC61DA4 for ; Thu, 9 Feb 2023 13:45:23 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X9Be4p6T3Koco2G5wLua/ouyUsV3fA/I2urI8iU2/CQ=; b=b3/Pg+hPCAWwqI EtoLZxj06a0D8chndQcFeQdklL4/Z4IqC8qupcWdysCcEKUhXvjIyXDzG4GmPI09bULYzrhNnCeMT CBFQlzJR4eqydEqfYwz4llTzJSjsv2e+T0vIZzrLAAT6NUGYFnsa76zbBof3aJ+m9uw+Q/WlWtiTb d/eoN/LGmj9Jjm7MTKS3uT5amJQH8N9wrdY6Kkp02wJebyIKn2T6dNPZcAFq9Aj+YIuPdNtesRXHv HD2h957/y6uM/HqWhMKihF4qx0qwzw4fX652OijVvzcQYpXCjVbhN2W2lJv958bTZ8EwWJd1Ag2cK 1W5XigS5oggqu9K74D0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7Ed-001o3o-Tt; Thu, 09 Feb 2023 13:45:11 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7BK-001mNQ-Ut for linux-amlogic@lists.infradead.org; Thu, 09 Feb 2023 13:41:49 +0000 Received: by mail-wm1-x333.google.com with SMTP id o36so1467729wms.1 for ; Thu, 09 Feb 2023 05:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hc8Gzc5w2WaVZNG5CkDqwlYoHGw+jL6hi6qtKT52GZk=; b=kvVm1OmXqPGnpJI5TopR9DfcldzUxQMX1516obRL2PJo0DaXqK4jSN/lcGMxQjCcEy 3L5Vl1H6LPyzp61HgyDIHTXwWD4YcukZckOBPdhpBP+q5+dHc2burS1uP149Pla1w54Z +oBRxx2N+fW1jWKvhUenKAVTjQ550bCAuWpuBqFPj2SoPQM9xJ2lTQZY+9IoRYVVKOBs CyfO1JNHXsNj9TsxYP9fTehIdGqtQwL/acysOAI9Vn6Yibzk1AMwVN/1C7CBtd6SGl4u dVXaZMOQJPfMS4ALVkyOYP304wwbHKcjvBvmr80R5ZrfeSwfW2TXUzeJYwjoLm9mbpWh mkhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hc8Gzc5w2WaVZNG5CkDqwlYoHGw+jL6hi6qtKT52GZk=; b=1uCcsleGwH3Hly+F4/hD3Egv6x6l2zgIt5YlVS+qXyacVj5RrmSDVpapI1svr8eglW ucOwijGTFrNnGuiswb0Z8rQGaQIucbtbt+ih3R1ohGi83LYYfLDqiB71C2FuU8q43uvj 4uqNblVuaNe1vpURHFL1/1E37u7QMJbIxyGh0FyVbxi2fcn/5YNITBNW9cgnwclZU87s D6DpaGnJvpzdYUYBUefJkEVNoQo8nzPeD6D/0W6CO2QGZrP4Oq4ukdao57LxJ8OOQmnn lErLITdBAIApLGs8Fvdhg4NnotpCa00Bt7kC3Oyo+iuju+kvCXG8jnd7epTgMdp4PfBn YqNg== X-Gm-Message-State: AO0yUKXRAYtlb/wck2RQxViJFHCj8A/TDpcM8LlI3bUaaz+S6sjDFl0P 5skwW96L6AVC9qDGZMLbiorj5g== X-Google-Smtp-Source: AK7set+eB8XgdP1CgHE058m1fm6s4izsSPTgG8itWB1RojjvsAe0bKo/TCNVD+hUraIJ7UKQBD/krw== X-Received: by 2002:a05:600c:18a6:b0:3e0:e77:3056 with SMTP id x38-20020a05600c18a600b003e00e773056mr9924752wmp.30.1675950104519; Thu, 09 Feb 2023 05:41:44 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003dfe549da4fsm4946991wmi.18.2023.02.09.05.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:41:44 -0800 (PST) From: Neil Armstrong Date: Thu, 09 Feb 2023 14:41:41 +0100 Subject: [PATCH 5/6] dt-bindings: soc: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema MIME-Version: 1.0 Message-Id: <20230209-b4-amlogic-bindings-convert-take2-v1-5-c4fe9049def9@linaro.org> References: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_054147_049601_FDFBDA06 X-CRM114-Status: GOOD ( 15.79 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Convert the Amlogic Always-On Clock Controller bindings to dt-schema. Signed-off-by: Neil Armstrong --- .../bindings/clock/amlogic,gxbb-aoclkc.txt | 64 ----------- .../bindings/clock/amlogic,gxbb-aoclkc.yaml | 120 +++++++++++++++++++++ 2 files changed, 120 insertions(+), 64 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt deleted file mode 100644 index c41f0be5d438..000000000000 --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt +++ /dev/null @@ -1,64 +0,0 @@ -* Amlogic GXBB AO Clock and Reset Unit - -The Amlogic GXBB AO clock controller generates and supplies clock to various -controllers within the Always-On part of the SoC. - -Required Properties: - -- compatible: value should be different for each SoC family as : - - GXBB (S905) : "amlogic,meson-gxbb-aoclkc" - - GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc" - - GXM (S912) : "amlogic,meson-gxm-aoclkc" - - AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc" - - G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc" - followed by the common "amlogic,meson-gx-aoclkc" -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "xtal" : the platform xtal - * "mpeg-clk" : the main clock controller mother clock (aka clk81) - * "ext-32k-0" : external 32kHz reference #0 if any (optional) - * "ext-32k-1" : external 32kHz reference #1 if any (optional - gx only) - * "ext-32k-2" : external 32kHz reference #2 if any (optional - gx only) - -- #clock-cells: should be 1. - -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/gxbb-aoclkc.h header and can be -used in device tree sources. - -- #reset-cells: should be 1. - -Each reset is assigned an identifier and client nodes can use this identifier -to specify the reset which they consume. All available resets are defined as -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be -used in device tree sources. - -Parent node should have the following properties : -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd" -- reg: base address and size of the AO system control register space. - -Example: AO Clock controller node: - -ao_sysctrl: sys-ctrl@0 { - compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"; - reg = <0x0 0x0 0x0 0x100>; - - clkc_AO: clock-controller { - compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc"; - #clock-cells = <1>; - #reset-cells = <1>; - clocks = <&xtal>, <&clkc CLKID_CLK81>; - clock-names = "xtal", "mpeg-clk"; - }; - -Example: UART controller node that consumes the clock and reset generated - by the clock controller: - - uart_AO: serial@4c0 { - compatible = "amlogic,meson-uart"; - reg = <0x4c0 0x14>; - interrupts = <0 90 1>; - clocks = <&clkc_AO CLKID_AO_UART1>; - resets = <&clkc_AO RESET_AO_UART1>; - }; diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml new file mode 100644 index 000000000000..3ac432a112ca --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml @@ -0,0 +1,120 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Always-On Clock Controller + +maintainers: + - Neil Armstrong + +properties: + compatible: + oneOf: + - items: + - enum: + - amlogic,meson-gxbb-aoclkc + - amlogic,meson-gxl-aoclkc + - amlogic,meson-gxm-aoclkc + - amlogic,meson-axg-aoclkc + - const: amlogic,meson-gx-aoclkc + - items: + - enum: + - amlogic,meson-axg-aoclkc + - amlogic,meson-g12a-aoclkc + + clocks: + minItems: 2 + + clock-names: + minItems: 2 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + +required: + - compatible + - clocks + - clock-names + - '#clock-cells' + - '#reset-cells' + +allOf: + - if: + properties: + compatible: + enum: + - amlogic,meson-gxbb-clkc + + then: + properties: + clocks: + minItems: 2 + maxItems: 5 + + clock-names: + minItems: 2 + items: + - const: xtal + - const: mpeg-clk + - const: ext-32k-0 + - const: ext-32k-1 + - const: ext-32k-2 + + - if: + properties: + compatible: + enum: + - amlogic,meson-g12a-aoclkc + + then: + properties: + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + items: + - const: xtal + - const: mpeg-clk + - const: ext-32k-0 + + - if: + properties: + compatible: + enum: + - amlogic,meson-gxl-clkc + - amlogic,meson-gxm-clkc + - amlogic,meson-axg-clkc + + then: + properties: + clocks: + maxItems: 2 + + clock-names: + items: + - const: xtal + - const: mpeg-clk + +additionalProperties: false + +examples: + - | + sysctrl: system-controller@0 { + compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon"; + reg = <0 0x100>; + + clkc: clock-controller { + compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc"; + #clock-cells = <1>; + #reset-cells = <1>; + clocks = <&xtal>, <&clk81>; + clock-names = "xtal", "mpeg-clk"; + }; + }; From patchwork Thu Feb 9 13:41:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13134646 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 B1FCBC636D6 for ; Thu, 9 Feb 2023 13:46:46 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lAndnm5pCM+p+kqpVV6Qj4/wICy7T1EioL17YDTwb9c=; b=UqOWEZFR8xkO4t qyb8l3/Z29HaZTtyxkyqMaXZYwjUzWhtpf/KPU5Mfgy0MHMcNY6GYp1geDLOOygYx2dE/D+qTiXlO zu335iL1poRhN1rTz+zG9vx8W8E3WK7OMhew79l0Uq+8BUNAtKpH/eC4mtVP4CnqDDwU89YB+bZRB dScedlwjEsTWKi+M5yACUvHCpdtzfhelTi+r2LgVu1wvTf2CStNfP4vbXPk12bi24ORygw8AU7zc5 vhqXFsoJBdIvRA5ueSjXRXvmIvaQfe3SkUzWpoKgu6FplBYGhGY9+H+EOWtvt+Q1MpzueVuxQ1IF5 YIH/xpjo2cPxc1nmmZFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7G0-001or0-P4; Thu, 09 Feb 2023 13:46:36 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ7BL-001mOL-Si for linux-amlogic@lists.infradead.org; Thu, 09 Feb 2023 13:41:50 +0000 Received: by mail-wm1-x336.google.com with SMTP id k8-20020a05600c1c8800b003dc57ea0dfeso3917563wms.0 for ; Thu, 09 Feb 2023 05:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SwVQYGDJxIHxSzhFFyXo6DVH/Gg58TP+SeHZlEpYtaE=; b=G8dQmklTOh+/FvxQUB0Gk5udClxwmsyEKDn7Rp2hrIpRgrY/EeEEmKKoam3xtYneHC wfJPDL5CBU87tibavUNzoPSTcJ2Qk9IegXRWalEqNxsXdz33oTSKFA5qiQYh9SJVmGFQ gsDwoumaVa2S543zVbMQcsIOwaB6bwsHXYRUvyH3rhjRepG4FYbRmRnPAT71wJKyH0WV qV7LBhGK5ouyZUTngAaoXEruf/qZgT+m+YACGoBzOj4im80IXnMvY3AojsAlF3ErNqVA culMEdkUa4YT9uGHDzZ111BX2gho2+jhjJbkJyZTN6m2gJS7BuSUwnSDQCvUf/VWQgyf WrUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SwVQYGDJxIHxSzhFFyXo6DVH/Gg58TP+SeHZlEpYtaE=; b=6CwHBbQnxGnwZ2ddeKkTSWhYWubMjHCSPTa6k0Q+sFo/+THChlhumzkAa1gvHm/VI7 sELr/T1m2DnApF3xK1m5X4HgeAIzboKXCkzgKSShmLqOdp17BKNgafao/RXPRNn4ReBy A6d5aBG9eWI6xuCZCG+kjFn18ZlcfOlEy0dnxsHvNNsPJ75zgckmaQymOP0pm6ihPcwn pr8gCm2BPgx9cbvcaGRFeX04GYtjs0Q2AIfxtwUdq1tusxlt8UhsxaJFYlv563lm2mmN u+f5dySfJZNdECebpsDa4L5eCKzXlDaAFMTHldqm/sqkQG7WUP/5an8GV2C0k/+ExEkK oGmQ== X-Gm-Message-State: AO0yUKVMzW+N4g2bLhgJeeDGl82GRHOWr6tWa2EBJ5K3byhp6r54IcF/ 0XZZyQ0Rymi4spc6Fyf4H8XFaw== X-Google-Smtp-Source: AK7set+E0AI0A+CBa5LewIRNFwdZw77cSx29mVZd6Uam4cfv7UMTtK6R4/ZdsEbQkl5Go57ylXr77g== X-Received: by 2002:a05:600c:4b1d:b0:3de:3ee3:4f6f with SMTP id i29-20020a05600c4b1d00b003de3ee34f6fmr10371624wmp.8.1675950105625; Thu, 09 Feb 2023 05:41:45 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003dfe549da4fsm4946991wmi.18.2023.02.09.05.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:41:45 -0800 (PST) From: Neil Armstrong Date: Thu, 09 Feb 2023 14:41:42 +0100 Subject: [PATCH 6/6] dt-bindings: soc: amlogic: update sysctrl clock-controller subnode type MIME-Version: 1.0 Message-Id: <20230209-b4-amlogic-bindings-convert-take2-v1-6-c4fe9049def9@linaro.org> References: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> In-Reply-To: <20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_054147_989644_65E0CE83 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Since the clock controllers are now documented define the right ref for the clock-controller subnodes and fill up the example node. Signed-off-by: Neil Armstrong --- .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml index 672eabd90c09..57eae355f1b9 100644 --- a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml @@ -43,6 +43,10 @@ allOf: - amlogic,meson-gx-hhi-sysctrl - amlogic,meson-axg-hhi-sysctrl then: + properties: + clock-controller: + $ref: /schemas/clock/amlogic,gxbb-clkc.yaml# + required: - power-controller @@ -53,6 +57,10 @@ allOf: - amlogic,meson-gx-ao-sysctrl - amlogic,meson-axg-ao-sysctrl then: + properties: + clock-controller: + $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml# + required: - pinctrl @@ -81,7 +89,12 @@ examples: compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"; reg = <0 0x400>; - clock-controller { }; + clock-controller { + compatible = "amlogic,gxbb-clkc"; + #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; + }; power-controller { compatible = "amlogic,meson-gxbb-pwrc";