Message ID | 20221123021346.18136-5-yu.tu@amlogic.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2548926wrr; Tue, 22 Nov 2022 18:20:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf7WywWj4xp2AhhedRhzTK+HiiTkysWqUHBwFTEuFZ+07mH3AiA4gMpVYclODE/saVSA/Bcg X-Received: by 2002:a17:906:2b8f:b0:7a0:3125:f1e5 with SMTP id m15-20020a1709062b8f00b007a03125f1e5mr21411494ejg.314.1669170032687; Tue, 22 Nov 2022 18:20:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669170032; cv=none; d=google.com; s=arc-20160816; b=a/yQJraj/L9lDKVGY9tFLtVc5ZtsDSVIZk3P/SVexDoYDBQjmRrKkpXHiB38nwqnY5 56QyXODUWq7JLgOx4xtucjiQHDw5XK6PAOvMEYMjt/JNFgMJfRQ/RIebWZiMu7Mav7wM JwxuAjrcJowRlZC1V0RfePUJVYkSZTzr4xkfx130fNfbWRjALA6nB7fdf6n7vmtOIkFa sWwDwR60Xl/nDXDDUQUUasf7VKncfR68C7DZDjkBanOAnLYgIja4jdfEWXx8q6BfvAli FFBtzIGGZEdhbPYF69ZE7QyMJZAmuH+ZKHw23oYOroBK5Zz5M1XV55fQOMivFK3aila/ fxdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/ztgiPeIyidsQmKZHTbmqnXIFECXka2/o27y4ubRBzg=; b=y+f9vJ3baUXeUPG+VktBHs9rwBuIcIYOe6csm+ROkJW5PGC2PWm4r1jiWmKBUfKMWO nDp5Cj9eu2zz/6+bt+GR4yqo6iOLSmlWks/EI//Nf+m7CL1K+LORMepf2BCva7zEAX7k svtusqeZRdo4u1+QCa6u+hZvJ3gf3zdqmkH80/DQBqTecoc8IAh5oHZDr3sL2N9spe/t xzXBhLekwYSHDmmFDuTrjdG+bQxfI47nQsH0myeTpn3EVH93eVOvIAuwXIhOZZxNckgk NTlc6q7yRohjoAKq26UgTeIdK1R+qPmBxYvULGzYggIXSife/44ynEtAkqlEZZZWw4Xp RJ7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a0564020e8900b0046771df01d7si11713018eda.467.2022.11.22.18.20.09; Tue, 22 Nov 2022 18:20:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235519AbiKWCRP (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Tue, 22 Nov 2022 21:17:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235516AbiKWCRC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 22 Nov 2022 21:17:02 -0500 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1239DBAE80; Tue, 22 Nov 2022 18:16:06 -0800 (PST) Received: from droid06.amlogic.com (10.18.11.248) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.13; Wed, 23 Nov 2022 10:16:03 +0800 From: Yu Tu <yu.tu@amlogic.com> To: <linux-clk@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>, Neil Armstrong <narmstrong@linaro.org>, Jerome Brunet <jbrunet@baylibre.com>, Kevin Hilman <khilman@baylibre.com>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Martin Blumenstingl <martin.blumenstingl@googlemail.com> CC: <kelvin.zhang@amlogic.com>, Yu Tu <yu.tu@amlogic.com> Subject: [PATCH V5 4/4] arm64: dts: meson: add S4 Soc Peripheral clock controller in DT Date: Wed, 23 Nov 2022 10:13:46 +0800 Message-ID: <20221123021346.18136-5-yu.tu@amlogic.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20221123021346.18136-1-yu.tu@amlogic.com> References: <20221123021346.18136-1-yu.tu@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.18.11.248] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750251636448814652?= X-GMAIL-MSGID: =?utf-8?q?1750251636448814652?= |
Series |
Add S4 SoC PLL and Peripheral clock controller
|
|
Commit Message
Yu Tu
Nov. 23, 2022, 2:13 a.m. UTC
Added information about the S4 SOC Peripheral Clock controller in DT.
Signed-off-by: Yu Tu <yu.tu@amlogic.com>
---
arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
Comments
On 23/11/2022 03:13, Yu Tu wrote: > Added information about the S4 SOC Peripheral Clock controller in DT. > > Signed-off-by: Yu Tu <yu.tu@amlogic.com> > --- > arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi > index bd9c2ef83314..e7fab6e400be 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi > @@ -6,6 +6,8 @@ > #include <dt-bindings/interrupt-controller/irq.h> > #include <dt-bindings/interrupt-controller/arm-gic.h> > #include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> > +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> > > / { > cpus { > @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { > #clock-cells = <1>; > }; > > + clkc_periphs: clock-controller { > + compatible = "amlogic,s4-peripherals-clkc"; > + reg = <0x0 0x0 0x0 0x49c>; This is broken... did you check for warnings? Best regards, Krzysztof
Hi Krzysztof, On 2022/11/23 18:10, Krzysztof Kozlowski wrote: > [ EXTERNAL EMAIL ] > > On 23/11/2022 03:13, Yu Tu wrote: >> Added information about the S4 SOC Peripheral Clock controller in DT. >> >> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >> --- >> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >> index bd9c2ef83314..e7fab6e400be 100644 >> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >> @@ -6,6 +6,8 @@ >> #include <dt-bindings/interrupt-controller/irq.h> >> #include <dt-bindings/interrupt-controller/arm-gic.h> >> #include <dt-bindings/gpio/gpio.h> >> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >> >> / { >> cpus { >> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >> #clock-cells = <1>; >> }; >> >> + clkc_periphs: clock-controller { >> + compatible = "amlogic,s4-peripherals-clkc"; >> + reg = <0x0 0x0 0x0 0x49c>; > > This is broken... did you check for warnings? Yes, i do. You can have a look at the results of my test, as follows. total: 0 errors, 0 warnings, 0 checks, 38 lines checked ../patch_clk_v5_1122/0004-arm64-dts-meson-add-S4-Soc-Peripheral-clock-controll.patch has no obvious style problems and is ready for submission. > > > Best regards, > Krzysztof > > .
On 23/11/2022 12:27, Yu Tu wrote: > Hi Krzysztof, > > On 2022/11/23 18:10, Krzysztof Kozlowski wrote: >> [ EXTERNAL EMAIL ] >> >> On 23/11/2022 03:13, Yu Tu wrote: >>> Added information about the S4 SOC Peripheral Clock controller in DT. >>> >>> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >>> --- >>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >>> 1 file changed, 26 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> index bd9c2ef83314..e7fab6e400be 100644 >>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> @@ -6,6 +6,8 @@ >>> #include <dt-bindings/interrupt-controller/irq.h> >>> #include <dt-bindings/interrupt-controller/arm-gic.h> >>> #include <dt-bindings/gpio/gpio.h> >>> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >>> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >>> >>> / { >>> cpus { >>> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >>> #clock-cells = <1>; >>> }; >>> >>> + clkc_periphs: clock-controller { >>> + compatible = "amlogic,s4-peripherals-clkc"; >>> + reg = <0x0 0x0 0x0 0x49c>; >> >> This is broken... did you check for warnings? > Yes, i do. > You can have a look at the results of my test, as follows. > > total: 0 errors, 0 warnings, 0 checks, 38 lines checked > > ../patch_clk_v5_1122/0004-arm64-dts-meson-add-S4-Soc-Peripheral-clock-controll.patch > has no obvious style problems and is ready for submission. > This is a checkpatch output. I am talking about DTS broken. dtc should warn you. Best regards, Krzysztof
On 2022/11/23 21:02, Krzysztof Kozlowski wrote: > [ EXTERNAL EMAIL ] > > On 23/11/2022 12:27, Yu Tu wrote: >> Hi Krzysztof, >> >> On 2022/11/23 18:10, Krzysztof Kozlowski wrote: >>> [ EXTERNAL EMAIL ] >>> >>> On 23/11/2022 03:13, Yu Tu wrote: >>>> Added information about the S4 SOC Peripheral Clock controller in DT. >>>> >>>> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >>>> --- >>>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >>>> 1 file changed, 26 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>> index bd9c2ef83314..e7fab6e400be 100644 >>>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>> @@ -6,6 +6,8 @@ >>>> #include <dt-bindings/interrupt-controller/irq.h> >>>> #include <dt-bindings/interrupt-controller/arm-gic.h> >>>> #include <dt-bindings/gpio/gpio.h> >>>> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >>>> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >>>> >>>> / { >>>> cpus { >>>> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >>>> #clock-cells = <1>; >>>> }; >>>> >>>> + clkc_periphs: clock-controller { >>>> + compatible = "amlogic,s4-peripherals-clkc"; >>>> + reg = <0x0 0x0 0x0 0x49c>; >>> >>> This is broken... did you check for warnings? >> Yes, i do. >> You can have a look at the results of my test, as follows. >> >> total: 0 errors, 0 warnings, 0 checks, 38 lines checked >> >> ../patch_clk_v5_1122/0004-arm64-dts-meson-add-S4-Soc-Peripheral-clock-controll.patch >> has no obvious style problems and is ready for submission. >> > > This is a checkpatch output. I am talking about DTS broken. dtc should > warn you. Do you mean I will have wraning in compiling? I actually compiled without warning. ccf$ make ARCH=arm64 dtbs -j12 DTC arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dtb > > Best regards, > Krzysztof > > .
On 23/11/2022 11:10, Krzysztof Kozlowski wrote: > On 23/11/2022 03:13, Yu Tu wrote: >> Added information about the S4 SOC Peripheral Clock controller in DT. >> >> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >> --- >> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >> index bd9c2ef83314..e7fab6e400be 100644 >> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >> @@ -6,6 +6,8 @@ >> #include <dt-bindings/interrupt-controller/irq.h> >> #include <dt-bindings/interrupt-controller/arm-gic.h> >> #include <dt-bindings/gpio/gpio.h> >> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >> >> / { >> cpus { >> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >> #clock-cells = <1>; >> }; >> >> + clkc_periphs: clock-controller { >> + compatible = "amlogic,s4-peripherals-clkc"; >> + reg = <0x0 0x0 0x0 0x49c>; > > This is broken... did you check for warnings? This is actually fine, the parent node has a ranges property: https://github.com/torvalds/linux/blob/eb7081409f94a9a8608593d0fb63a1aa3d6f95d8/arch/arm64/boot/dts/amlogic/meson-s4.dtsi#L93 Neil > > > Best regards, > Krzysztof > > > _______________________________________________ > linux-amlogic mailing list > linux-amlogic@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-amlogic
Hi Neil, Thanks for your reply and explanation. On 2022/11/23 21:27, Neil Armstrong wrote: > [ EXTERNAL EMAIL ] > > On 23/11/2022 11:10, Krzysztof Kozlowski wrote: >> On 23/11/2022 03:13, Yu Tu wrote: >>> Added information about the S4 SOC Peripheral Clock controller in DT. >>> >>> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >>> --- >>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >>> 1 file changed, 26 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> index bd9c2ef83314..e7fab6e400be 100644 >>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> @@ -6,6 +6,8 @@ >>> #include <dt-bindings/interrupt-controller/irq.h> >>> #include <dt-bindings/interrupt-controller/arm-gic.h> >>> #include <dt-bindings/gpio/gpio.h> >>> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >>> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >>> / { >>> cpus { >>> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >>> #clock-cells = <1>; >>> }; >>> + clkc_periphs: clock-controller { >>> + compatible = "amlogic,s4-peripherals-clkc"; >>> + reg = <0x0 0x0 0x0 0x49c>; >> >> This is broken... did you check for warnings? > > This is actually fine, the parent node has a ranges property: > https://github.com/torvalds/linux/blob/eb7081409f94a9a8608593d0fb63a1aa3d6f95d8/arch/arm64/boot/dts/amlogic/meson-s4.dtsi#L93 > > > Neil > >> >> >> Best regards, >> Krzysztof >> >> >> _______________________________________________ >> linux-amlogic mailing list >> linux-amlogic@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-amlogic > > .
On 23/11/2022 14:23, Yu Tu wrote: >>> ../patch_clk_v5_1122/0004-arm64-dts-meson-add-S4-Soc-Peripheral-clock-controll.patch >>> has no obvious style problems and is ready for submission. >>> >> >> This is a checkpatch output. I am talking about DTS broken. dtc should >> warn you. > > Do you mean I will have wraning in compiling? > I actually compiled without warning. > ccf$ make ARCH=arm64 dtbs -j12 > DTC arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dtb > Nope: ../arch/arm64/boot/dts/amlogic/meson-s4.dtsi:105.35-127.6: Warning (unit_address_vs_reg): /soc/apb4@fe000000/clock-controller: node has a reg or ranges property, but no unit name Test your patches better before using reviewers time for trivial compile-time fixes. The same rules for C code apply for DTS. Best regards, Krzysztof
On 23/11/2022 14:27, Neil Armstrong wrote: > On 23/11/2022 11:10, Krzysztof Kozlowski wrote: >> On 23/11/2022 03:13, Yu Tu wrote: >>> Added information about the S4 SOC Peripheral Clock controller in DT. >>> >>> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >>> --- >>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >>> 1 file changed, 26 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> index bd9c2ef83314..e7fab6e400be 100644 >>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>> @@ -6,6 +6,8 @@ >>> #include <dt-bindings/interrupt-controller/irq.h> >>> #include <dt-bindings/interrupt-controller/arm-gic.h> >>> #include <dt-bindings/gpio/gpio.h> >>> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >>> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >>> >>> / { >>> cpus { >>> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >>> #clock-cells = <1>; >>> }; >>> >>> + clkc_periphs: clock-controller { >>> + compatible = "amlogic,s4-peripherals-clkc"; >>> + reg = <0x0 0x0 0x0 0x49c>; >> >> This is broken... did you check for warnings? > > This is actually fine, the parent node has a ranges property: > https://github.com/torvalds/linux/blob/eb7081409f94a9a8608593d0fb63a1aa3d6f95d8/arch/arm64/boot/dts/amlogic/meson-s4.dtsi#L93 The parent ranges do not change here anything. You cannot have a reg without unit address and the tools report it. No need to use reviewers for this... Best regards, Krzysztof
On 23/11/2022 15:13, Krzysztof Kozlowski wrote: > On 23/11/2022 14:27, Neil Armstrong wrote: >> On 23/11/2022 11:10, Krzysztof Kozlowski wrote: >>> On 23/11/2022 03:13, Yu Tu wrote: >>>> Added information about the S4 SOC Peripheral Clock controller in DT. >>>> >>>> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >>>> --- >>>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 +++++++++++++++++++++++ >>>> 1 file changed, 26 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>> index bd9c2ef83314..e7fab6e400be 100644 >>>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>> @@ -6,6 +6,8 @@ >>>> #include <dt-bindings/interrupt-controller/irq.h> >>>> #include <dt-bindings/interrupt-controller/arm-gic.h> >>>> #include <dt-bindings/gpio/gpio.h> >>>> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >>>> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >>>> >>>> / { >>>> cpus { >>>> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >>>> #clock-cells = <1>; >>>> }; >>>> >>>> + clkc_periphs: clock-controller { >>>> + compatible = "amlogic,s4-peripherals-clkc"; >>>> + reg = <0x0 0x0 0x0 0x49c>; >>> >>> This is broken... did you check for warnings? >> >> This is actually fine, the parent node has a ranges property: >> https://github.com/torvalds/linux/blob/eb7081409f94a9a8608593d0fb63a1aa3d6f95d8/arch/arm64/boot/dts/amlogic/meson-s4.dtsi#L93 > > The parent ranges do not change here anything. You cannot have a reg > without unit address and the tools report it. No need to use reviewers > for this... Oh I see now, I simply looked at the reg property, not the unit address. Sorry indeed it's wrong and DTC should complain. Yu, you should probably update your DTC version. Neil > > Best regards, > Krzysztof >
On 2022/11/23 22:12, Krzysztof Kozlowski wrote: > [ EXTERNAL EMAIL ] > > On 23/11/2022 14:23, Yu Tu wrote: >>>> ../patch_clk_v5_1122/0004-arm64-dts-meson-add-S4-Soc-Peripheral-clock-controll.patch >>>> has no obvious style problems and is ready for submission. >>>> >>> >>> This is a checkpatch output. I am talking about DTS broken. dtc should >>> warn you. >> >> Do you mean I will have wraning in compiling? >> I actually compiled without warning. >> ccf$ make ARCH=arm64 dtbs -j12 >> DTC arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dtb >> > > Nope: > > ../arch/arm64/boot/dts/amlogic/meson-s4.dtsi:105.35-127.6: Warning > (unit_address_vs_reg): /soc/apb4@fe000000/clock-controller: node has a > reg or ranges property, but no unit name > > Test your patches better before using reviewers time for trivial > compile-time fixes. The same rules for C code apply for DTS. > Like this: clkc_periphs: clock-controller@0 { compatible = "amlogic,s4-peripherals-clkc"; reg = <0x0 0x0 0x0 0x49c>; You mean it should be, right? > Best regards, > Krzysztof > > .
On 2022/11/23 22:21, neil.armstrong@linaro.org wrote: > [ EXTERNAL EMAIL ] > > On 23/11/2022 15:13, Krzysztof Kozlowski wrote: >> On 23/11/2022 14:27, Neil Armstrong wrote: >>> On 23/11/2022 11:10, Krzysztof Kozlowski wrote: >>>> On 23/11/2022 03:13, Yu Tu wrote: >>>>> Added information about the S4 SOC Peripheral Clock controller in DT. >>>>> >>>>> Signed-off-by: Yu Tu <yu.tu@amlogic.com> >>>>> --- >>>>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 26 >>>>> +++++++++++++++++++++++ >>>>> 1 file changed, 26 insertions(+) >>>>> >>>>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>>> b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>>> index bd9c2ef83314..e7fab6e400be 100644 >>>>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi >>>>> @@ -6,6 +6,8 @@ >>>>> #include <dt-bindings/interrupt-controller/irq.h> >>>>> #include <dt-bindings/interrupt-controller/arm-gic.h> >>>>> #include <dt-bindings/gpio/gpio.h> >>>>> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> >>>>> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> >>>>> / { >>>>> cpus { >>>>> @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { >>>>> #clock-cells = <1>; >>>>> }; >>>>> + clkc_periphs: clock-controller { >>>>> + compatible = "amlogic,s4-peripherals-clkc"; >>>>> + reg = <0x0 0x0 0x0 0x49c>; >>>> >>>> This is broken... did you check for warnings? >>> >>> This is actually fine, the parent node has a ranges property: >>> https://github.com/torvalds/linux/blob/eb7081409f94a9a8608593d0fb63a1aa3d6f95d8/arch/arm64/boot/dts/amlogic/meson-s4.dtsi#L93 >>> >> >> The parent ranges do not change here anything. You cannot have a reg >> without unit address and the tools report it. No need to use reviewers >> for this... > > Oh I see now, I simply looked at the reg property, not the unit address. > > Sorry indeed it's wrong and DTC should complain. > > Yu, you should probably update your DTC version. Okay. > > Neil > >> >> Best regards, >> Krzysztof >> > > .
diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi index bd9c2ef83314..e7fab6e400be 100644 --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi @@ -6,6 +6,8 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/amlogic,s4-pll-clkc.h> +#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> / { cpus { @@ -100,6 +102,30 @@ clkc_pll: clock-controller@8000 { #clock-cells = <1>; }; + clkc_periphs: clock-controller { + compatible = "amlogic,s4-peripherals-clkc"; + reg = <0x0 0x0 0x0 0x49c>; + clocks = <&clkc_pll CLKID_FCLK_DIV2>, + <&clkc_pll CLKID_FCLK_DIV2P5>, + <&clkc_pll CLKID_FCLK_DIV3>, + <&clkc_pll CLKID_FCLK_DIV4>, + <&clkc_pll CLKID_FCLK_DIV5>, + <&clkc_pll CLKID_FCLK_DIV7>, + <&clkc_pll CLKID_HIFI_PLL>, + <&clkc_pll CLKID_GP0_PLL>, + <&clkc_pll CLKID_MPLL0>, + <&clkc_pll CLKID_MPLL1>, + <&clkc_pll CLKID_MPLL2>, + <&clkc_pll CLKID_MPLL3>, + <&clkc_pll CLKID_HDMI_PLL>, + <&xtal>; + clock-names = "fclk_div2", "fclk_div2p5", "fclk_div3", + "fclk_div4", "fclk_div5", "fclk_div7", + "hifi_pll", "gp0_pll", "mpll0", "mpll1", + "mpll2", "mpll3", "hdmi_pll", "xtal"; + #clock-cells = <1>; + }; + periphs_pinctrl: pinctrl@4000 { compatible = "amlogic,meson-s4-periphs-pinctrl"; #address-cells = <2>;