Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp20490rdb; Mon, 18 Dec 2023 07:54:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEa1FBnOYRE6cI3H9aKSC+NTSA9ea6k/uG3ICyIPZomAjOWxPaXrXRU3/AtRxWzs7Mo0BZ4 X-Received: by 2002:a17:90a:49cd:b0:28b:750a:8f81 with SMTP id l13-20020a17090a49cd00b0028b750a8f81mr729849pjm.41.1702914861195; Mon, 18 Dec 2023 07:54:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702914861; cv=none; d=google.com; s=arc-20160816; b=e34tFu6lQzhxB4z/cf3FmMkfQQ2wjlOFeTL/kQhahBfIKyygZgJVvMhitW31Jb9z1O xtDRZH0qkNY8maC9swhBlQ8lS2RD/kjfPekuRWIUeqQ7SWOWZbttGYv/TRmdm1pCm9Ns SNVLWkEGYv4vmkJ27sgg4ohSYsDMi4osSEg0A5t0u0QazSG+avsHBhrgSAaeQoNrAFMc stKP8I6oAS+JBPOBySTD7YKeyDKx+5/vW3KhJholvBTKTdKnVmtTiIP5dnmZlx/bQnt7 +9XyHpHC4DcFws8vhImMLSQFlAk7lYqVJ4Vipjz2JDkU0AipZvgoYeIk2ntd15XjUwWZ sElw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=AaK1iZhTq9QFyw5mjCEIp0OR3NwTmm1DvvZmGBsL6yc=; fh=9bJrg2kS64qIxmXRiTMzrJJCzR69SDeiqdnEUR04HIM=; b=fTTuObKoHMt5sNI5hbADKG5u4X2Xicjr7AMAsMiW226YZ+QaiC7a+U9AySBK4wm8UF tnXHjcIV+bP2JQKkV7zgeYKHnT0rHI+enI0jSwNc15W83K0uUQQcEE0AeXRrNoac+Yxm tjOyZrgxnp5/XZSauo4bhHJbAqzjXSPAY1sPDXirJ9nCGxiLk/5xP4DT5+3KJoAfxq4Z xzXl1oExgeJzYLB/RISMQXHzgFGX3K6PMUTm+/0dfJtWAxGJtuS1IHHl9lUTzMNf8HG1 Ot6XfgDTfTL65uIOAa5iBnHdOGQJLU5trKdDEnS9+df5veIissnOSSFgXLvYV/2uNX+r 5VTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z6-20020a17090a66c600b0028b8d09eb69si1595939pjl.181.2023.12.18.07.54.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 07:54:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B6AD4282C58 for ; Mon, 18 Dec 2023 15:54:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38DA03D563; Mon, 18 Dec 2023 15:53:57 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 116FC3D566; Mon, 18 Dec 2023 15:53:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C60E92F4; Mon, 18 Dec 2023 07:54:37 -0800 (PST) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B004F3F5A1; Mon, 18 Dec 2023 07:53:50 -0800 (PST) Date: Mon, 18 Dec 2023 15:53:45 +0000 From: Andre Przywara To: Conor Dooley Cc: Brandon Cheo Fusi , Yangtao Li , Viresh Kumar , Nishanth Menon , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Maxime Ripard , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 3/5] cpufreq: sun50i: Add D1 support Message-ID: <20231218155345.476e71ea@donnerap.manchester.arm.com> In-Reply-To: <20231218-blabber-slapstick-ab7ae45af019@spud> References: <20231218110543.64044-1-fusibrandon13@gmail.com> <20231218110543.64044-4-fusibrandon13@gmail.com> <20231218-blabber-slapstick-ab7ae45af019@spud> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 18 Dec 2023 14:55:30 +0000 Conor Dooley wrote: Hi, > On Mon, Dec 18, 2023 at 12:05:41PM +0100, Brandon Cheo Fusi wrote: > > Add support for D1 based devices to the Allwinner H6 cpufreq > > driver > > > > Signed-off-by: Brandon Cheo Fusi > > --- > > drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c > > index 32a9c88f8..ccf83780f 100644 > > --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c > > +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c > > @@ -160,6 +160,7 @@ static struct platform_driver sun50i_cpufreq_driver = { > > > > static const struct of_device_id sun50i_cpufreq_match_list[] = { > > { .compatible = "allwinner,sun50i-h6" }, > > + { .compatible = "allwinner,sun20i-d1" }, > > I thought the feedback in v2 was to drop this change, since the > devicetree has the sun50i-h6 as a fallback compatible? Well, this is the *board* (fallback) compatible string, so we cannot assign it as we like. The whole (existing) scheme is admittedly somewhat weird, because we not only match on a particular device compatible (like allwinner,sun20i-d1-operating-points), but also need to blocklist and re-match some parts against the *board compatible*, owing to the cpufreq-dt driver. The board name is basically used as a placeholder to find out the SoC, because there is (or was?) no other good way - the CPU DT nodes don't work for this. Back when this was introduced, this was the "least worst" solution. I don't remember all the details, and didn't find time yet to look into this in more detail, but fixing this is non-trivial. If this isn't 6.8 material, I might have a look at this later this week/month. Cheers, Andre