Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp756692lqo; Thu, 16 May 2024 23:58:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPZvZnws4wt4U1gTJlieztJKxfL2/4O+UlIRrWM7/w5d/T88116F1Sqylej0HMNaPSPft2lSW2N2RmN07vFxkT6ccy8kLX6MJ6FF0gIA== X-Google-Smtp-Source: AGHT+IFx7cc8NR1u98tAglpGxNwBSfsKqR+i6y8vWReNujUtNlsH0GMduve7iWL9vUU6fHW6LmCT X-Received: by 2002:a17:902:f552:b0:1ed:1d37:267e with SMTP id d9443c01a7336-1ef43e281b0mr272705145ad.16.1715929133950; Thu, 16 May 2024 23:58:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715929133; cv=pass; d=google.com; s=arc-20160816; b=vS+8wkNvTHIR2EJWz6eYAugyEb6G5rgA03Up+0hWcm5IH0ZZH8mjCIxJFPqR/9/Yob YXe2HNZMoeQ24p2cCmpd0odWORBKv97EcoiV9clNt2zyA0M2ecAqwjJtjvYSjZbBMMBl XcJ7SjekH4IYUbAvoDR0vNCxwo1GgLJQ38qtDQoy2IHisReHCPNpXhjn6piRQpHfpRXr rnvi8ya+qQ3BdmNeGCLWQjLfhBuIf1H8Sh9PRzspLIPu5sc7k9Yo+r7cvWSBQeuMFEjk tskgKT4hbzdavry8auk6/lBJju1Jscj001X1yaq3LygXdIooLuo5jBC+3/X3F/JnEwrh z2Sw== ARC-Message-Signature: i=2; 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:dkim-signature; bh=8+WtpG+JowVcU8bh3DYjQQ6K0ukhxfEGwefCmJzc8YA=; fh=zJoxeCS20oWfsTskvjxYCyNbge0zYvEYZ2722nQc2L8=; b=R3vacVhk+Eeo7f0zJnW/WHiNh4+WWCJj7prYjB8x3KjKkoZyq4SwW6gFkJlraDhmZY aVW709CwIcGxW5VbEAF74Hy46+yTwaq4hFtUOYoxqzyUJeDG+lA90LNCSO5ahJKYeNiu 7ZT1a9hmyK6S0Dw+y/LZCY4ZHOEhvpHH2KXA6G6/oJiKX2TMy5m9bUAwlroLXDceFL+e T7ODWme+L2lZ+dQD2YJhBuPMmWdBEHDV1EVlsWunTCP92lrrlr07bmuh/NqmpXiIUZKh 4M0p2c3zAYLjvtS03d8KIlyH5Tj6JAYtVFJQT/aQJw/S00KLVV0V0xI0OjVH48Q71/AI xuEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=f8KVFHeN; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-181773-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181773-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 d9443c01a7336-1ef0c03b2desi178200095ad.415.2024.05.16.23.58.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 23:58:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181773-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; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=f8KVFHeN; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-181773-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181773-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 5A76F283A4F for ; Fri, 17 May 2024 06:58:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DE2315E85; Fri, 17 May 2024 06:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="f8KVFHeN" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98A4E14A8D; Fri, 17 May 2024 06:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715929126; cv=none; b=VLqn52wxqx/2rWfxCVjPvSWNA0ws7zGM2WsqVc62CcuYmYZUesucRBMVBVX61IKsLLW/+32ztB2ZVuceL3D8dSUCM8wGm21pwsCt4zniahz+C+ktxmbw8vY5HkCXRUE4gXIR26GChD+wd+b8XZ3qkXJRA+5uoNV87+sLhfIYf6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715929126; c=relaxed/simple; bh=vEIiADZtH0GuW0hNucCCzsAmTERzBSekKmZgJqaVvNQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nph3ncLbh8XeRstBi9VATrS+5C6qrz7DDAS/gXA5YvEhxHo55o0w9Q9grVnw1sLFLt+1j09RErRrWIViR6xa67/Vn5OWwSilpSSO/kBaqWLewrePWkLhqstJrdRW46dhlyTomJkYHq2YVGzVY4RmVs6IT5KHio+QB6HXcAvyhWg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=f8KVFHeN; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 5366060016; Fri, 17 May 2024 06:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715929116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8+WtpG+JowVcU8bh3DYjQQ6K0ukhxfEGwefCmJzc8YA=; b=f8KVFHeNh2VvHZZ6hzRy0KYo2z1+B2wGwXn7zUG349l2A4tKLI0ZDhpexlh3IUzFtK/cnH G4vfuEDwNMPNJmSzzVKJTqJkec3UDkhb7Ri4LEuTyTyQUy6andM+Hdr7ASxso739ADCNPf Ko2E4NMePCqgMC1A7+eqx3f8QeIF3NA3fUwPrU+0d2wbbE4Xl5hJJ2PXaQO6+G79OZlB49 Vj8Yl1i5JyjqZXeJ6PFT0cGNZNX4RmNQb3gU6C55uHf8H9w8r1JsdI8Hp2gyLKvg/YudPM 6YxX7AHARvGW/6A5RRP+N28w/ZyAq10mTdiG1jEHqlveht7usBO2Q8V8FqmNjQ== Date: Fri, 17 May 2024 08:58:32 +0200 From: Luca Ceresoli To: Dmitry Yashin Cc: Linus Walleij , Heiko Stuebner , Krzysztof Kozlowski , Conor Dooley , Rob Herring , Jianqun Xu , devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] pinctrl: rockchip: add rk3308b SoC support Message-ID: <20240517085832.365ac878@booty> In-Reply-To: <81aa0e4e-a3c7-41d1-8cd2-4d060730b37a@gmail.com> References: <20240515121634.23945-1-dmt.yashin@gmail.com> <20240515121634.23945-4-dmt.yashin@gmail.com> <20240515182954.03c4a475@booty> <81aa0e4e-a3c7-41d1-8cd2-4d060730b37a@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-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 X-GND-Sasl: luca.ceresoli@bootlin.com Hello Dmitry, On Thu, 16 May 2024 17:06:46 +0500 Dmitry Yashin wrote: > Hi Luca, > > On 15.05.24 21:29, Luca Ceresoli wrote: > > I'm skeptical about this being bound to a new DT compatible. As far as I > > know the RK3308 and RK3308B are mostly equivalent, so it looks as the > > pinctrl implementation could be detected at runtime. This would let > > products to be built with either chip version and work on any without > > any DT change. > > > Thanks for your feedback. > > Indeed, these SoC's have a lot in common, but as I can see the rk3308b > has more blocks, like extra PWM's (rk3308 datasheet 1.5 [0] shows only > 1x PWM 4ch, when rk3308b and rk3308b-s have 3x PWM 4ch), 1-wire and > CAN controller (mentioned in the TRM, but dropped from rk3308b > datasheet for some reason). > > So, in my view, it really makes sense to add rk3308b.dtsi, where extra > PWM's, pinctrl compatible and its pin functions can be moved. And if > its not worth it, then I will try to adapt the entire series to runtime > config based on cpuid like you suggested. Having a rk3308b.dtsi would probably make sense, yes, as there are several differences as you described. However for the pinctrl it seems probably not necessary. I've seen actual products being manufactured with two different RK3308 variants in different lots of production, but with the same DT that has rockchip,rk3308-pinctrl in it. Those would need a _selective_ DT upgrade in order to benefit from your changes. And even if a product had always used the B variant, it would need DT upgrade when upgrading to a kernel with your changes. Otherwise with patch 1/3 of this series the pictrl driver would lose many routes after upgrading the kernel (but not the DT): can this lead to previously-working devices to stop working? I think this is a fundamental question to reply. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com