From patchwork Thu Jul 6 14:52:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 700447 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59EF6EB64D9 for ; Thu, 6 Jul 2023 14:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233396AbjGFOwy (ORCPT ); Thu, 6 Jul 2023 10:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233455AbjGFOwq (ORCPT ); Thu, 6 Jul 2023 10:52:46 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2A081FC1 for ; Thu, 6 Jul 2023 07:52:38 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3fbc5d5746cso8835825e9.2 for ; Thu, 06 Jul 2023 07:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688655157; x=1691247157; 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=Tgt1p8sy0oGunSDCWV0j5lPoQeDljE/MaOAC6lCXXgE=; b=FSkN26OeMBfVG3OuXyOtDkoQeDhpUvfGaNAABofoNK7Rvh5J69YzgOu7oxqqtPSl5b 8BgvNQvbnMu/DtNqB35n0x7VupnpmoijDrs6zugjm/AUQOagR53bZaKFqW2bYfE1aZh+ q4TVzds20S9m1Je/C8vcO94SNWalmYRm1+XRqh+078X3XDnjS14E/qbHKcimel4r/R89 Esy+3vYiDCUlm5kw0PjdgjU2h+Qsie2JQz3+4KjwGymb3phVvTRdcZQQ+i0mVrmaQEjc bD+yniiGA1dKflaR7wdibhBt22I78e4IUik9k45X8ogvOqAdgvLnj7rU6VEGcNWXEU2s Nosg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688655157; x=1691247157; 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=Tgt1p8sy0oGunSDCWV0j5lPoQeDljE/MaOAC6lCXXgE=; b=VGRbJr8gCeeM0/LhvSZLh2/oFdySGybt0clg5E7u1AYeUHmHux/AT9MVkDwJAzWDth MN8fkQD+6nL+iF/2rDEjvCp+kyslIK9tRwxN6o1qh8pI/bAuGX7mhd/eY4nEaHCQnimg wNkHXobPKExfeVAv0NONVku24ArCrTFdVX3Mpv7gk0bSAoixkyzq725PzIabXdsfq6VZ WjAKu/hh4MmU4B8s8FPj7R/EYTLUoOocT1TOFfCpDmoLdT6DdPf6rBZ1dSmvjzlOl7bP wAxAp8BAzYz56ycmqLp5j9ftK7rUDE+u0LSFMzFPMyYEA5FuV0AZvTdAL+2txtFc12A9 p1Uw== X-Gm-Message-State: ABy/qLZB3eRanuB3U24ufQjYa6kIQzyuOov/F6SA87hk1qO6RCKNfYbU sJ7ehNcSDo1ktm4Xmn0puOle/w== X-Google-Smtp-Source: APBJJlEIWFEjg5OfUYqYD4cgNfDb9ALlIk0LdkS/Yfpr7j0OZ3FTsa6wPhr3QTnoI/WNpei7s7s1Yg== X-Received: by 2002:a7b:c458:0:b0:3fa:98f8:225f with SMTP id l24-20020a7bc458000000b003fa98f8225fmr1676602wmi.26.1688655157421; Thu, 06 Jul 2023 07:52:37 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b003fbaf9abf2fsm5371070wmi.23.2023.07.06.07.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 07:52:37 -0700 (PDT) From: Neil Armstrong Date: Thu, 06 Jul 2023 16:52:32 +0200 Subject: [PATCH v3 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema MIME-Version: 1.0 Message-Id: <20230706-b4-amlogic-bindings-convert-take2-v3-1-f63de6f12dcc@linaro.org> References: <20230706-b4-amlogic-bindings-convert-take2-v3-0-f63de6f12dcc@linaro.org> In-Reply-To: <20230706-b4-amlogic-bindings-convert-take2-v3-0-f63de6f12dcc@linaro.org> To: Jerome Brunet , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong , Rob Herring X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3467; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=zRbK49pvWYMA+yYmekkxJvgW5BT1+BkF4rrA/iqBPJ8=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkptUy3qMpVJpV/xABo+DQ9rAzAWItvRphGtwtZ6TL TjSEOtWJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZKbVMgAKCRB33NvayMhJ0cZ1D/ 9GL9++c0NqGj8oDicL66WEM3LQ/Fu3DHbB36o/XX9lxzQwHwCHs9Z9G8m3CuUI4ZpRhLansQffZoOu IIz4tcfe9Vpq/MVvzpUnQYgaY4W2nOjj7kXPxt5WoIe2CewrmcXnQlf+GIheImLJk52oPSLPrA4G9U UTzxG6+Xg1qJayntdoERXTbwvd0EHuhhIV3EvVPu5ayr8o8HdVMqp3SkYb236QUOLEx0O5rtaFRAlq cHbZ7D5WI6ZckhFAX7zW3oszRre8nepqxGrvCcGVCZlvY7iGDjSxXzFj2leOMuz9eGqnwEePjm3Bxb AmaYruNjrqte4PTciOvZ811KrEozqcWCFxjnAFHXag9dLBCZm7FFCFOrnYiTnTwMlddVDKJjfZkYJH /H6ZWms6vDWTHQZOredTDpsx9Cg/7CUyjrgDC19VztnPtx1jfYv7ELaYpsq9OCJ/FA8KiuIyM4Tsv5 Qon8H34gqN18Si+22N6v2epAP/NdEMW1lExdnaS5owEj7+b3Ec/Nytc46PdZ8wSR51109EYP82Kob3 v9HQs0fK8dtt37xYA8gdMeevOYzccYf25AQ64bzYMKO/vbAp9YSHhIqqKIgDnQUAo/KbSPJRtP6CZq 8R6p89lGF14w0CM2hsAKAs/YNFFbag2XClz3FSo5g/ngyc2IpnFjxGOsPz2A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the Amlogic Clock Controller bindings to dt-schema. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong --- .../bindings/clock/amlogic,gxbb-clkc.txt | 53 ---------------------- .../bindings/clock/amlogic,gxbb-clkc.yaml | 37 +++++++++++++++ 2 files changed, 37 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..63246f1cb539 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml @@ -0,0 +1,37 @@ +# 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' + +additionalProperties: false From patchwork Thu Jul 6 14:52:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 699836 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46A50EB64DC for ; Thu, 6 Jul 2023 14:52:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233528AbjGFOwz (ORCPT ); Thu, 6 Jul 2023 10:52:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbjGFOwr (ORCPT ); Thu, 6 Jul 2023 10:52:47 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC8361FC8 for ; Thu, 6 Jul 2023 07:52:39 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fbdfda88f4so8545975e9.1 for ; Thu, 06 Jul 2023 07:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688655158; x=1691247158; 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=pCHzxbE1tjKBR243NKKB0jh3lIoMBebnovktMIwTJXM=; b=h9JMtcl66g/4tPGm7btANV5d1c+uRCxtqlOgJCJxN2ei8gg3iQOFHiAA7bMLWMBK45 664r8b3taGi2y1IGgyGwQ8uvpw/X43E0vMG6BWHDhe0hM5iF161O7x8IklEKRJX4jV59 IVnvgyCQfmNv3WcqlidCbyGrymOEK/uhamRFno1ChvbpCp77b+XpJp0jWS2KhpFfJ1Lb FEXg0imh0tSoSVwJVSwdYBBASfYM1W/mQi6QJmcmuXUdB1vI7ekV5SoJ03InHMKQxF/8 UUAJAW4ppfd17yaLzq1aDqVkcyIpxS/HBfayeeUxHXydL7kleW39suk8BxDhlN3V/CSr TVpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688655158; x=1691247158; 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=pCHzxbE1tjKBR243NKKB0jh3lIoMBebnovktMIwTJXM=; b=PnD+oghAV2zo8ZyreGQLMUYY8LVkPHr+bSMc1MQR8Xo8TK72HZrmafSZsj1IZTVd1L KV1RvTYPo7FD5BYQDN4g7wAg2irm6k7KnZhH6Z9SegA9xhy+Nube2F/3s7ETNGAIfFJZ ACgZsR0OYXw0nNw2P4Z5blk8t4znjHR5qfcN3QfLQOGugX8m2neToyiXCobWuhKMQg2I FTYSEklzvgQ7nwiCvlzHtHeoHRkxOC1S9RKWcCN+trWOMFpqOQgKJmVLcWSviDEnfwCb h9xLCcnoKXMzFasbRGmwZpxmHmwn949Yc+KlivHF/sfP4kj8+tg7Tb7tGKfE1Md3B1iS o5gA== X-Gm-Message-State: ABy/qLZ6T3pblktU4fBfTB5QUWm4Ex6L+OwM47ajpz1xKOtUK8Pam597 kZw9jKjSxCMPTj6Bv9gSW04nbg== X-Google-Smtp-Source: APBJJlHL40/tnp4tA32KZoqJjBFDGDLXJfQj0Jucmj1iI+1GdOHNjUuvwAkYSfcyf0NZ2uV11eVrww== X-Received: by 2002:a1c:7410:0:b0:3fa:984d:7e9f with SMTP id p16-20020a1c7410000000b003fa984d7e9fmr1547546wmc.6.1688655158350; Thu, 06 Jul 2023 07:52:38 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b003fbaf9abf2fsm5371070wmi.23.2023.07.06.07.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 07:52:37 -0700 (PDT) From: Neil Armstrong Date: Thu, 06 Jul 2023 16:52:33 +0200 Subject: [PATCH v3 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema MIME-Version: 1.0 Message-Id: <20230706-b4-amlogic-bindings-convert-take2-v3-2-f63de6f12dcc@linaro.org> References: <20230706-b4-amlogic-bindings-convert-take2-v3-0-f63de6f12dcc@linaro.org> In-Reply-To: <20230706-b4-amlogic-bindings-convert-take2-v3-0-f63de6f12dcc@linaro.org> To: Jerome Brunet , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5324; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=ADzNxsLZVUxAZGHQV6SIC+lyehu2X1Yd3uQQxNSVb9U=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkptUyeY4kIEpNhbeZYiASH2BaNo4jhbR+2TfJEz83 n1pmjQaJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZKbVMgAKCRB33NvayMhJ0YlRD/ 9hh+MaaIHwPRWr36uZnokNXvrdmMWHunis+f39l0fFem5BH207RC0YhWf7twGA5uDeg7+9rtaETSLp Bi/l4VM+Jm/71uooqDfuPL3GqVaeT2KG4QXJL/G9SVzFV1gk0XNrX/ICt1j1wyAIBE7c1RB2h/9LjI techukyzYATpCj2JQA85dA/x/3epx5G+9MM2h5CHcoZEuxnLozh/AEK1mmvIP+jk6S0eJB0objvMdp p5B8c0GHZ9q0jJ9p38QUlhYFARnyEYa70SMV5C91wVi2LgeeAdbhw60c3xzijHSdx793IjAMAP3Y9s h+vz4dLNMjvItnKm0TuMM2O0NdCYLgmipN1U8gnx7Hop8kSwSeyAExF7voD9yvAYYCFCEni/0tF1pU 5SEJ2+aAPvjCo+lQTc0VwRggAuqoFGv7dOe/WveCpwzjz6PmP4Kt36K31X+bVy8s1gDiE2Pj/r3rau 9M8SVIFAhFOfFgieYv17guQiKpgMnzZ5imKDFmxyW58Z+v7vlTX85b80J8MPaiU/ZeULgX4nUHTRAX HsGMspiIs9ORvHrwlhj71mueNz+nCNALr9JU0xvRN7Fsj3aLSe+TNDBelCkum3dxqRyfIaGyL7kiZX vfR3gjGTLEF6H/IYStQ7J2zGVFLnKkXd5gO0sl64fbVJyPRkokQV044SBo3g== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 | 85 ++++++++++++++++++++++ 2 files changed, 85 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..25daf313172a --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml @@ -0,0 +1,85 @@ +# 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 + - enum: + - amlogic,meson-axg-aoclkc + - amlogic,meson-g12a-aoclkc + + 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 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + +required: + - compatible + - clocks + - clock-names + - '#clock-cells' + - '#reset-cells' + +allOf: + - if: + properties: + compatible: + enum: + - amlogic,meson-g12a-aoclkc + + then: + properties: + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + maxItems: 3 + + - if: + properties: + compatible: + enum: + - amlogic,meson-gxl-aoclkc + - amlogic,meson-gxm-aoclkc + - amlogic,meson-axg-aoclkc + + then: + properties: + clocks: + maxItems: 2 + + clock-names: + maxItems: 2 + +additionalProperties: false From patchwork Thu Jul 6 14:52:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 700446 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF6E9EB64DD for ; Thu, 6 Jul 2023 14:52:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233530AbjGFOwz (ORCPT ); Thu, 6 Jul 2023 10:52:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231860AbjGFOwt (ORCPT ); Thu, 6 Jul 2023 10:52:49 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 093381FD5 for ; Thu, 6 Jul 2023 07:52:41 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-307d20548adso762235f8f.0 for ; Thu, 06 Jul 2023 07:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688655159; x=1691247159; 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=yCxpHr7ST1gyjjiHsf0Ym9vUzb7jDX0bdoH7ToQxooQ=; b=ctHBu4D4eWOvY1vhlhWWRi1JY9y199mXvS+xifBt00LHrzgTD5agOcRLMMEXCRn1ri N2gQhaYLkMP5NYD5tyKC60TuMfC77O0ToeTguO2Q1vNbmo9YLgVJ4VGnAO33k5794Tot /JhYkEfY7ESIk20EbEhNq90bya7pkuTSxajDj1tckPgIOXSHNaRPJ9smCEwsCjQbvGe1 Pe8Qb/svXCWC5mGGpJCO5KYL+zznaZ1K4C997/fk9dEi0qfTFoX9RUG9C/6fWXkt0w4t GCwDagVMpnlUPo1VzU6/Jj5UTg71l9xxvfpj8058N52pU64sbLiKspyJRLQDvrbGTHRs +Oqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688655159; x=1691247159; 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=yCxpHr7ST1gyjjiHsf0Ym9vUzb7jDX0bdoH7ToQxooQ=; b=Qc3tNiB8L1Nf3xy5R1QI3QSlEHaDy4cNfZhpTU/Ex7w/k4lZXQt1Z6msbmUC4cTwqp bqo0nICjble2as4gztmTw66xsqMykWeTgknxshkU/jXpsICDw7RNxcuEikrxFFFT13N2 6l9XKohA7KsPPbO0FTKg0bZpbTtiWuzX2ASDU7IIlrOivWAKR+ldVbpMAWTCDGAv/n7q loWKPDEE6J9zIb2HwkNECfYRLMn/2SyM2fnjSl4P2ytdfXq2hu8ZgOdvwsXnS76LECvW SmOFBLI63f10TXiDgg+nzMW0uXD1BBOJA0/cCcsaVdSCpMRzOXGJPgoyZs3CEaEdW0g5 afHQ== X-Gm-Message-State: ABy/qLYfVyxbg5c05+vaoW5UnqKgRtYkUptFguZq2rABXCIoU2FzbxLr Tc4WaMp5tvOPcIEfahXktkS8rg== X-Google-Smtp-Source: APBJJlFvpVcWpUh3M0t+NPz1LvgTADtSmNoMTs3YLkhnDqxLZ6gA649UQtWL0x8NZIvvbrDzWu1hfA== X-Received: by 2002:a5d:6649:0:b0:314:1443:7fbe with SMTP id f9-20020a5d6649000000b0031414437fbemr1696888wrw.36.1688655159364; Thu, 06 Jul 2023 07:52:39 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b003fbaf9abf2fsm5371070wmi.23.2023.07.06.07.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 07:52:39 -0700 (PDT) From: Neil Armstrong Date: Thu, 06 Jul 2023 16:52:34 +0200 Subject: [PATCH v3 3/3] dt-bindings: soc: amlogic: document System Control registers MIME-Version: 1.0 Message-Id: <20230706-b4-amlogic-bindings-convert-take2-v3-3-f63de6f12dcc@linaro.org> References: <20230706-b4-amlogic-bindings-convert-take2-v3-0-f63de6f12dcc@linaro.org> In-Reply-To: <20230706-b4-amlogic-bindings-convert-take2-v3-0-f63de6f12dcc@linaro.org> To: Jerome Brunet , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong , Rob Herring X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5307; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=NbfTsYHnZmtHpY+kfS7TXdskEZKGyXWSvlrM9BNnNL8=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkptUzceAn1e4iK/a42JUr3mAZCOG/FHs+rLZyyrrX 9IO1UY6JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZKbVMwAKCRB33NvayMhJ0StSD/ 9udp9aUQ0hXE9YU/qEgdiuzbtMKbY+YMhqHdN0ZoOc4FqsGF1Ut1oguv4uuFNFHTC/VGckvDHJrQdM dLryp4rHX1ugq6mlBjPjsCuOg40Dgdr77uA5/iRDD+useqcRwBdpJcEgS/LhilRy4nXpZCxSP7nDRb 7nBC+mZceU552xriesLQHmqR8dVUl8PYUxF1Zn1VOvuBJ+Rncos1fTAKPqE7xtuQv7DFhXPGF6lD6M rOFrYk64hCTAirh5rumcNgTyUzd+WqMVfdFCmW6fq79DI5hEdAN8667d2L+RjGM95gSm4nrf11tZ2n QM1NAa7UpbvLjvRJ8p7BGFnv+SwVHtiPEBBr3fprZYIpSqqWiax48g5qJ0Z9BPnLVhbNGi4z3suAAD UJnQymKhNIkmGghSbyQWIj2kYq/XAL+40ezR/4PVy4MQLHw5fWzZO6Q94VChMcUGxLoqXQT1l+0ybD 3JJral19a0UWDK8e+9mfATq3BXtBuctOy1yFLvlooDX4Q7c+ixVcH7U3+jxAIVwlmbmwpk2460MRXc Np7d64UmCd1YyuYqePPmPrJr/xEBdbpQVnyxYQMegdim6JaPI0F6GFjta4zWaNXLtn8SIMxv5rjFaM K3ip0gNXZh4zAZ9xjFVs4HzGwc6DdlpsYKX/sI+z8A9W71u8aSuKk+EYOzVw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong --- .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 160 +++++++++++++++++++++ 1 file changed, 160 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..16977e4e4357 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml @@ -0,0 +1,160 @@ +# 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: + properties: + clock-controller: + $ref: /schemas/clock/amlogic,gxbb-clkc.yaml# + + required: + - power-controller + + - if: + properties: + compatible: + enum: + - amlogic,meson-gx-ao-sysctrl + - amlogic,meson-axg-ao-sysctrl + then: + properties: + clock-controller: + $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml# + + power-controller: false + phy: false + + - if: + properties: + compatible: + enum: + - amlogic,meson-gx-hhi-sysctrl + then: + properties: + phy: false + + - 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 + +additionalProperties: false + +examples: + - | + bus@c883c000 { + compatible = "simple-bus"; + reg = <0xc883c000 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xc883c000 0x2000>; + + sysctrl: system-controller@0 { + compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"; + reg = <0 0x400>; + + clock-controller { + compatible = "amlogic,gxbb-clkc"; + #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; + }; + + 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"; + }; + }; + }; + + bus@c8100000 { + compatible = "simple-bus"; + reg = <0xc8100000 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xc8100000 0x100000>; + + sysctrl_AO: system-controller@0 { + compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon"; + reg = <0 0x100>; + + 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"; + }; + }; + };