From: Haylen Chu <heylenay@4d2.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Haylen Chu <heylenay@outlook.com>, Yixun Lan <dlan@gentoo.org>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Inochi Amaoto <inochiama@outlook.com>,
Chen Wang <unicornxdotw@foxmail.com>,
Jisheng Zhang <jszhang@kernel.org>,
Meng Zhang <zhangmeng.kevin@linux.spacemit.com>
Subject: Re: [PATCH v4 2/4] dt-bindings: soc: spacemit: Add spacemit,k1-syscon
Date: Sat, 22 Feb 2025 11:36:00 +0000 [thread overview]
Message-ID: <Z7m2oNXbwJ06KtLQ@ketchup> (raw)
In-Reply-To: <3e196e9c-c942-4026-8d6c-69c9930bebd5@kernel.org>
On Sat, Feb 22, 2025 at 10:52:02AM +0100, Krzysztof Kozlowski wrote:
> On 15/02/2025 09:41, Haylen Chu wrote:
> >
> >>> };
> >>>
> >>> For the other two clock controllers (APBS and APBC), syscons are really
> >>> unnecessary and it's simple to fold them.
> >>
> >>
> >> I don't follow. Do we talk about children or syscon compatible?
> >
> > APBS region contains only clock (PLL) bits and APBC region contains only
> > reset and clock bits, so I was thinking about dropping the syscon nodes
> > and changing their compatible to spacemit,k1-plls and
> > spacemit,k1-cru-apbc.
> >
> > In summary, my plan is,
> >
> > - For MPMU, APMU and APBC region, keep the binding in soc/spacemit.
> > They'll be reset, clock and power controllers, with compatible
> > "spacemit,k1-syscon-*".
> > - For APBS region, write a new binding clock/spacemit,k1-plls, as it
> > contains only PLL-related bits. It acts as clock controller.
> > - All split children will be eliminated, there'll be only four device
> > nodes, one for each region, matching the datasheet.
> > - Put all clock-related binding definition of SpacemiT K1 in
> > dt-bindings/clock/spacemit,k1-ccu.h
> >
> > Is it fine for you?
> >
>
> That did not explain hardware to me.
Sorry if my replies haven't made things clear. I'm goint to make a
(hopefully) more clear conclusion,
> You assume that some way, maybe
> through magical crystal ball, I know your hardware and will tell you
> what to do.
>
> No.
>
> I have dozens of other patches in my inbox. It's you who should explain
> the hardware in simple, concise way so we can judge whether DT
> description is correct.
>
> Again: define what is the actual device, what is its address space, what
> are its possible *separate* and *distinctive* children.
The series covers four seperate blocks,
- Application Power Manage Unit, APMU
- Main Power Manage Unit, MPMU
- APB Bus Clock Unit, APBC
- APB Spare, APBS
they're clearly separate blocks and have their own distinct, separate
address spaces, confirmed by the Address Mapping section in the TRM[1].
These four blocks provide hardware bits for three purposes: power
management, reset signals and clocks. Not every block is capable of all
the three functionalities,
- APMU, MPMU: power, reset, clock
- APBC: clock, reset
- APBS: clock
Reset and clock bits, if present, always stay in the same register.
Power management bits stay in others. These two types of registers
interleave if present in the same block (APMU and MPMU case).
These blocks have no child: power, clock and reset definitions differ
from block to block, no reusable nodes could be split from them.
Hope this conclusion will help the reviewing. Please tell if something
is unclear.
>
> Best regards,
> Krzysztof
Thanks,
Haylen Chu
[1]: https://developer.spacemit.com/documentation?token=LzJyw97BCipK1dkUygrcbT0NnMg
next prev parent reply other threads:[~2025-02-22 11:36 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 21:56 [PATCH v4 0/4] Add clock controller support for SpacemiT K1 Haylen Chu
2025-01-03 21:56 ` [PATCH v4 1/4] dt-bindings: clock: spacemit: Add clock controllers of Spacemit K1 SoC Haylen Chu
2025-01-04 9:58 ` Krzysztof Kozlowski
2025-01-15 7:29 ` Haylen Chu
2025-01-03 21:56 ` [PATCH v4 2/4] dt-bindings: soc: spacemit: Add spacemit,k1-syscon Haylen Chu
2025-01-04 10:07 ` Krzysztof Kozlowski
2025-02-11 5:15 ` Haylen Chu
2025-02-11 8:03 ` Krzysztof Kozlowski
2025-02-13 11:14 ` Haylen Chu
2025-02-13 18:07 ` Krzysztof Kozlowski
2025-02-15 8:41 ` Haylen Chu
2025-02-21 23:40 ` Alex Elder
2025-02-22 9:59 ` Krzysztof Kozlowski
2025-02-22 10:48 ` Haylen Chu
2025-02-22 11:50 ` Krzysztof Kozlowski
2025-02-24 10:17 ` Haylen Chu
2025-02-25 8:12 ` Krzysztof Kozlowski
2025-02-25 21:14 ` Alex Elder
2025-02-22 9:52 ` Krzysztof Kozlowski
2025-02-22 11:36 ` Haylen Chu [this message]
2025-01-03 21:56 ` [PATCH v4 3/4] clk: spacemit: Add clock support for Spacemit K1 SoC Haylen Chu
2025-01-16 5:25 ` Samuel Holland
2025-01-21 17:01 ` Haylen Chu
2025-02-14 4:04 ` Alex Elder
2025-02-16 11:34 ` Haylen Chu
2025-02-21 21:10 ` Alex Elder
2025-02-22 9:57 ` Haylen Chu
2025-02-22 9:40 ` Haylen Chu
2025-03-03 9:41 ` Haylen Chu
2025-03-03 14:10 ` Alex Elder
2025-01-03 21:56 ` [PATCH v4 4/4] riscv: dts: spacemit: Add clock controller for K1 Haylen Chu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z7m2oNXbwJ06KtLQ@ketchup \
--to=heylenay@4d2.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=heylenay@outlook.com \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=unicornxdotw@foxmail.com \
--cc=zhangmeng.kevin@linux.spacemit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).