From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18C31594809 for ; Thu, 10 Sep 2026 19:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789067712; cv=none; b=WSaspM51+hXCVwySs5eaxsooiEyAIFNuIC3R4ZwvAlbLFrGKK9v9TYwZqv+IzvVnWe+Krr5sCKfJD7EKN2AT5NRca3DyfhtCGzOGu6rN78nC3MmZ9JjtyXhP7NAfBFQ95EBcv5boQFTEOzcKllAdgqqsIVmC+JgKiNOTXmkI5sE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789067712; c=relaxed/simple; bh=SIjCw6vu2Nolc5BGLxkzrlpiPylpl82CNVXXbYaAcVo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aOyy9e4EXbxChG0l9BdA8KCi/Hao/dFFJrxC9ZVQgAdLZ3q8t83080UwRaROD6PTc/hr+u22qJgdsP5Pq8zlJU28vJyy0405dOc1DQBjhMHcTMskT2JMQ35Kg0GZmAhIEwf/Vz8eJnfYb84KpQjzjYt/ZEDm1WxSjvXKPsz7K78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=sVgfi3CC; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sVgfi3CC" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-49b0d8bc2aaso2468965e9.0 for ; Thu, 10 Sep 2026 12:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789067708; x=1789672508; darn=vger.kernel.org; h=content-type:mime-version:references:in-reply-to:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=4fbV+eT9jOuG2Qn7UfINqLkpoy41J2mIUSyeK6YfW10=; b=sVgfi3CChuwLTM+233Ebm3W2XQR5ob8Xmj2hxYfYfBh6UdzmZAd1F8P50WlsFsU/AZ psvIeuA7urpNdHC2OKN7WLUacvzOHSzyoK/yWr4EvMZhEwlAOrrd4qZ9wbIAMYT/wK8i lSShDdJYiQFVx7of2GRr06kIfjHJpM4xRLWjwXxno3BVR7+ZVlFqyqNzU+yOOuCw2cF+ wN8myad8Eud2RRGywrPRDk/FoSdbXXUNLVzpgDWHMNVjK0204CXFQZbmQt4ZB6onKvg2 lMiY6Ew7FJo8UYojSKirkpmc+BC8Y3Le64BX8nt+4+wAjjUsAbpkmHFyr7PRoY9dOMBa T3aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789067708; x=1789672508; h=content-type:mime-version:references:in-reply-to:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=4fbV+eT9jOuG2Qn7UfINqLkpoy41J2mIUSyeK6YfW10=; b=NEO+Z3BwSGB9au2828KP7JftBH8uB7saBNMdOQvvpFspbcy+SxzANrOOxO0zj5iD3H C4Z/Ai9b8qF/U2m43NGdnYQQD4PzGNcNYlWtbeNh5wFX+pZJd3i/9Zhqk5aQer8R9tN/ dFFUy21WWOznCdIeRZEn1+KOLUSYRH6LztS0JFZpywH6Qu7RKlD18JsQo4SmZ3zB1vSt 8LBcFf2+jXeubK8PiA8+wnwjDkoQv+0QUhaFGNZNAfmZ5rILP8MYj86yPOWEVnWYkx7B 3IeyU/7WHQsyAR/wr99/dVJ8o9R8fco+IpO8izcTTLbl8UWocRaqXPOHZfKGoKI9TfpL 6rHg== X-Forwarded-Encrypted: i=1; AKwUvBz4T3GRbW+iZGy+0QadaH5VD3a1/E3FgFpP0lmkNBuY+/x2CsD8PxL+SKPPCeJu815u3obqcgPOWlyN@vger.kernel.org X-Gm-Message-State: AFuF++nJxTl+gy7qKggpL18sT6b5VryCrwXrlZ+ehYqwNi02gRV6cnk7 WIFufG48VGviFQnXHPB1GdFW7zNEagkcbBOrCvaqMlpEH54jTfRkXIKj X-Gm-Gg: AYBFou0vVK5igxDZKxhXxK66f0lacuJHmVu3VY2WUKOcgNeYXRZhm5nrevCoN4z4SQ5 Rsq5vcPY93OMh/oIIezhp2PanDJ5e5a8lHUY/Nvt3yXMHuVG2yXptTw71jE7+RQLnGnW+TIU6w7 7gwrobYpgx0USkiHCh28234UfRRbgE/Ou/4YMv3vPX75dHnQxgb4a1J0lM6pML78AuUgomSTvVQ ZqLyq+hM20GFiKO/d6LSztxP74SRq2r7Zs6FbwP9vio7UUfmQMWgVDcOtj7oX14O9ET8DFN0ZAJ Qia+uNz+6eWhz4iWUmt7hBd/X5j5rL8dw2REeO/Jp17uVGtr8YBuvigTNaXL5Pt6sq8NtWdKJUz yOP+KcL3qacmBDIWXfUCQW1eX4L3Kpexm+nsPe2hZXTKfK5jJRpuDQuEfcwSnyasf2cftPsWSdN o9WO+6Wup9WQBuU5B6y3ZTmI1KXjcwDDoV8P0G8MsfG6zeQG6Mtg6Oaw0gi6KAapUn2ge2mar1P XQxXnFExw== X-Received: by 2002:a05:600c:a07:b0:49c:fc6c:be0d with SMTP id 5b1f17b1804b1-49e619bd19cmr5097405e9.19.1789067707645; Thu, 10 Sep 2026 12:15:07 -0700 (PDT) Received: from strix.localnet ([197.250.227.248]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e61a33d72sm4385485e9.2.2026.09.10.12.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2026 12:15:06 -0700 (PDT) From: Stefan =?UTF-8?B?RMO2c2luZ2Vy?= To: Lee Jones Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Brian Masney , Vinod Koul , Neil Armstrong , Russell King , Brian Masney , Jerome Brunet , Manivannan Sadhasivam , 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 Message-ID: In-Reply-To: <20260910161711.GK1051768@google.com> References: <20260826-zx29clk-v11-0-f8ad59c6426c@gmail.com> <20260826-zx29clk-v11-5-f8ad59c6426c@gmail.com> <20260910161711.GK1051768@google.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPartKW3nFVAkQr2M_09ZHSiKcQ"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPartKW3nFVAkQr2M_09ZHSiKcQ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Stefan =?UTF-8?B?RMO2c2luZ2Vy?= To: Lee Jones Date: Thu, 10 Sep 2026 22:14:54 +0300 Message-ID: In-Reply-To: <20260910161711.GK1051768@google.com> MIME-Version: 1.0 Hi Lee, Thanks again for your review! Am Donnerstag, 10. September 2026, 19:17:11 Ostafrikanische Zeit schrieb Le= e=20 Jones: > On Wed, 26 Aug 2026, Stefan D=C3=B6singer wrote: > If you use of_platform_populate() there is no issue with this living in > soc/. >=20 > 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=20 inner split of the CRM devices in the DT, which Conor and Krzysztof advised= =20 against. > > + * Copyright (C) 2026 Stefan D=C3=B6singer >=20 > 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= =20 coordination with ZTE or payment from them. I only took information about t= he=20 hardware from their GPL dumps and not code. In my understanding the copyrig= ht=20 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=20 public before. Sadly they provided no material on their LTE components. I didn't explicitly ask them for permission to upstream self-written driver= s=20 for their platform because I don't think I need it and I'd just expect a=20 request like this to languish in their legal department. The kernel once had support for a related zx296702 and zx296718 support tha= t=20 was removed in 89d4f98ae90d ("ARM: remove zte zx platform"). This code was= =20 written by Linaro and I believe commissioned by ZTE, so I don't think they = are=20 upset about me doing their work for free. At some point I'll resurrect some= of=20 the drivers from back then, which will then of course carry the appropriate= =20 Linaro and ZTE copyright notices. > > +enum zx_device_type { > > + TYPE_INVALID =3D 0, > > + TYPE_TOPCRM, > > + TYPE_MATRIXCRM, > > + TYPE_LSPCRM, > > +}; >=20 > What do each of these mean? >=20 > Is the nomenclature taken from the datasheet? >=20 > If not, can we improve it to make them easier to read for humans? >=20 > Failing that, more comments would be helpful. >=20 > > + > > +static const struct mfd_cell zx297520v3_topcrm_cells[] =3D { > > + MFD_CELL_NAME("zx297520v3-topclk"), > > + MFD_CELL_NAME("zx297520v3-topreset"), >=20 > Why are these works concatenated together like this? >=20 > Same with zx_device_type above? I don't have datasheets. The names are from ZTE's mmio defines, which I exp= ect=20 to match whatever is in the datasheet. zx297520v3 is the name ZTE gave that SoC (printed on the chip, in their ker= nel=20 sources and boot messages). Yeah I wish it were less of a random string of= =20 letters and numbers. I believe it should be in the MFD cell name as a kind = of=20 namespacing. In the (unlikely) event hat support for a different ZX SoC is= =20 added some day it will bring similarly named "top"/"matrix"/"lsp" controlle= rs topcrm / matrixcrm / lspcrm are the names ZTE gave the 3 clock/reset/misc=20 controllers. The DT binding docs in patches 1-3 elaborate on the respective= =20 roles of these controllers (although that understanding is based on reverse= =20 engineering, so it might be wrong) =46inally, "clk", "reset" are the names I gave the child nodes. Rather than write zx297520v3-topcrm-clk, zx297520v3-matrixcrm-reset I cut o= ut=20 the "crm-" part. Can you think of better names? Are you OK with the names if I add the above= =20 explanation as a comment - a little bit shortened, and making sure I don't= =20 repeat information that's in the bindings more than necessary? Cheers, Stefan --nextPartKW3nFVAkQr2M_09ZHSiKcQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEQxb0tqoFWyeVMl1sPRO8yFRPGiIFAmqjAa4bFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJED0TvMhUTxoi1l4P/j2RW0zmocuD81Wb5sZv znns4ujhGapOszlboqNQmeHKggVJawfrXfzWDfrJjPPoh/CtxKqMnktV0jNxud+F 2epOFBD7UpM75AM6FVhx++ol5zDBVsuGFUjJMTmJ8m9jji4bNEuZcD2mTtlAt9Hr E19NYXZLQ1QsWdUi05+JaAx40GfP3swda/sENz78aOm4KNkcbbnE9OGaG4JaTbb5 xfNh3OZ5AlBeIKlfsZFdtJSKsb/iBpEIc24hMHVaWm+h+KjbFKpP4034lGwshYzT tB1BoP+jJ+ebVTKzKTpT3xiuW+cLQDegDAyKhzYZulk4ILuzIq7JomMVn4P8UzHR 3YNTu8DdCEZbAqDDMNlWWTkpYRPTSvYtSbivB6DeCM6oO46o7WvlnFqcjWRqN4/z j0s062KBfAkiodcaVaeLCjmg6aPqYKf0/yjhDTsjZRiDSn6nIs58JPh8PNhfgNhw 4XHOVKRhzTYxOrOJxP33xgwbQf9IeJQT6n3UFqw62ieLCpR5uFd31vIHHS+bH2kd dAv3ER5fhNZcladCb4H4Nbx4TwiQ+ry3+KIPEJWre3zFNW0F79AGo1yz21/Buy6h NBjFRtosY8KazSjZqVHFdCn9N6N0X+1x3R79gJgTRSXrCbk/icBx9pACGfOb0pET wvukjxM7IWssDtOA0cwG+zAr =PTj7 -----END PGP SIGNATURE----- --nextPartKW3nFVAkQr2M_09ZHSiKcQ--