Devicetree
 help / color / mirror / Atom feed
From: "Stefan Dösinger" <stefandoesinger@gmail.com>
To: Lee Jones <lee@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>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Brian Masney <bmasney@redhat.com>, Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Russell King <linux@armlinux.org.uk>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Manivannan Sadhasivam <mani@kernel.org>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-phy@lists.infradead.org, mfd@lists.linux.dev
Subject: Re: [PATCH v11 05/12] mfd: zx297520v3: Add a clock and reset MFD driver
Date: Thu, 10 Sep 2026 22:14:54 +0300	[thread overview]
Message-ID: <x9tzyTnKRAOyrdtSGnka0g@gmail.com> (raw)
In-Reply-To: <20260910161711.GK1051768@google.com>

[-- Attachment #1: Type: text/plain, Size: 3536 bytes --]

Hi Lee,

Thanks again for your review!

Am Donnerstag, 10. September 2026, 19:17:11 Ostafrikanische Zeit schrieb Lee 
Jones:
> On Wed, 26 Aug 2026, Stefan Dösinger wrote:

> If you use of_platform_populate() there is no issue with this living in
> soc/.
> 
> You cannot use the MFD API outside of drivers/mfd though.

I'll keep it in drivers/mfd. of_platform_populate would force me to expose the 
inner split of the CRM devices in the DT, which Conor and Krzysztof advised 
against.

> > + * Copyright (C) 2026 Stefan Dösinger
> 
> Are you sure ZTE are okay with you Copywriting a driver for their IP?

This is my free time work reverse engineering work, not something I did in 
coordination with ZTE or payment from them. I only took information about the 
hardware from their GPL dumps and not code. In my understanding the copyright 
of this code should be mine, and putting (c) ZTE would even be misleading.

ZTE provided U-Boot sources on request. Their kernel sources were already 
public before. Sadly they provided no material on their LTE components.

I didn't explicitly ask them for permission to upstream self-written drivers 
for their platform because I don't think I need it and I'd just expect a 
request like this to languish in their legal department.

The kernel once had support for a related zx296702 and zx296718 support that 
was removed in 89d4f98ae90d ("ARM: remove zte zx platform"). This code was 
written by Linaro and I believe commissioned by ZTE, so I don't think they are 
upset about me doing their work for free. At some point I'll resurrect some of 
the drivers from back then, which will then of course carry the appropriate 
Linaro and ZTE copyright notices.

> > +enum zx_device_type {
> > +	TYPE_INVALID = 0,
> > +	TYPE_TOPCRM,
> > +	TYPE_MATRIXCRM,
> > +	TYPE_LSPCRM,
> > +};
> 
> What do each of these mean?
> 
> Is the nomenclature taken from the datasheet?
> 
> If not, can we improve it to make them easier to read for humans?
> 
> Failing that, more comments would be helpful.
> 
> > +
> > +static const struct mfd_cell zx297520v3_topcrm_cells[] = {
> > +	MFD_CELL_NAME("zx297520v3-topclk"),
> > +	MFD_CELL_NAME("zx297520v3-topreset"),
> 
> Why are these works concatenated together like this?
> 
> Same with zx_device_type above?

I don't have datasheets. The names are from ZTE's mmio defines, which I expect 
to match whatever is in the datasheet.

zx297520v3 is the name ZTE gave that SoC (printed on the chip, in their kernel 
sources and boot messages). Yeah I wish it were less of a random string of 
letters and numbers. I believe it should be in the MFD cell name as a kind of 
namespacing. In the (unlikely) event hat support for a different ZX SoC is 
added some day it will bring similarly named "top"/"matrix"/"lsp" controllers

topcrm / matrixcrm / lspcrm are the names ZTE gave the 3 clock/reset/misc 
controllers. The DT binding docs in patches 1-3 elaborate on the respective 
roles of these controllers (although that understanding is based on reverse 
engineering, so it might be wrong)

Finally, "clk", "reset" are the names I gave the child nodes.

Rather than write zx297520v3-topcrm-clk, zx297520v3-matrixcrm-reset I cut out 
the "crm-" part.

Can you think of better names? Are you OK with the names if I add the above 
explanation as a comment - a little bit shortened, and making sure I don't 
repeat information that's in the bindings more than necessary?

Cheers,
Stefan

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

  reply	other threads:[~2026-09-10 19:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 21:23 [PATCH v11 00/12] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-08-25 21:24 ` [PATCH v11 01/12] dt-bindings: clk: zte: Add zx297520v3 top clock and reset controller Stefan Dösinger
2026-08-25 21:27   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 02/12] dt-bindings: clk: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-08-25 21:24 ` [PATCH v11 03/12] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-08-25 21:28   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 04/12] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
2026-08-25 21:31   ` sashiko-bot
2026-09-02 10:29   ` Stefan Dösinger
2026-09-08 18:22   ` Krzysztof Kozlowski
2026-08-25 21:24 ` [PATCH v11 05/12] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-08-25 21:31   ` sashiko-bot
2026-09-10 16:17   ` Lee Jones
2026-09-10 19:14     ` Stefan Dösinger [this message]
2026-08-25 21:24 ` [PATCH v11 06/12] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-08-25 21:32   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 07/12] clk: zte: Add regmap-based clocks Stefan Dösinger
2026-08-25 21:38   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 08/12] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-08-25 21:35   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 09/12] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-08-25 21:38   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 10/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks Stefan Dösinger
2026-08-25 21:36   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 11/12] clk: zte: Introduce a driver for zx297520v3 LSP clocks Stefan Dösinger
2026-08-25 21:34   ` sashiko-bot
2026-08-25 21:24 ` [PATCH v11 12/12] reset: zte: Add a zx297520v3 reset driver Stefan Dösinger
2026-08-25 21:35   ` sashiko-bot

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=x9tzyTnKRAOyrdtSGnka0g@gmail.com \
    --to=stefandoesinger@gmail.com \
    --cc=bmasney+clk@redhat.com \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=mani@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vkoul@kernel.org \
    /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