Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp133485lqo; Wed, 15 May 2024 09:33:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2oRZTzrdVljy/Bs0P/1dri6ZZfFh2z439ayKCxqBnADXK6WW91R5BEK7wAUiAWbnPH3rXRbppkdQEbYbadWto6c8E5ZLIKom4k9ZaEg== X-Google-Smtp-Source: AGHT+IEOPK6GHo+64Yt0mFY4DYs6k+vRgsC95ova+AgMIUJiX2lMx27JWh3cdb7TidfVG7vSUeqm X-Received: by 2002:a17:902:7b87:b0:1e3:cfc5:589c with SMTP id d9443c01a7336-1ef43d2a8acmr168531045ad.28.1715790788330; Wed, 15 May 2024 09:33:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715790788; cv=pass; d=google.com; s=arc-20160816; b=DUEsptbpGF2Olh932ACAxMvk5+HPSIFfQy8/ayjOiIMC6miRvPGzL/6hZEn45uieRa Rn+dJa+F3jtaJi+uzh1AV8R/8qTyYOT+Sp8xYXHVTU+CDh8RHz52agpSfu6H9t4OgqWR DU66u//rolUMMPzRxxYpqD1khX3CVeqFeAOuT2NoaKoKvP88AWl1quBZLG3A9C6xxi3T bLYOQTFQmEhbvetbKxeieIW1dbJrKE1ho2AQDmihPvbUSC0LlTRqSUFPMYxxvmAndhj4 IBwCn78oRy+HuEkHz0/7tMX1ADIXJGhuxOSUFPgAXfteSOITOi9393b0nM/JiGbOQrw6 V0Fw== 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=eOto8pkdzNcDGrx6zGWKATW1hZHmdFwBb/iquxmXsu0=; fh=zJoxeCS20oWfsTskvjxYCyNbge0zYvEYZ2722nQc2L8=; b=k8rAnk2+0XzNeozsJXKgeMHE+NWuuXD78IqHJrbv91FQZvZCA8tkoQhYS50sBhtDdY sMau4GLEd5Y3omB62UK2LEIF51xpvYEm0FcUU6MMrrLuO7Ypyju4LDriXijGvviMWfiy 81pplKwZGHYgEz93779HF9ppNRhcicShLwdSeBEJEYa6lrLQEHvVH5Qdobih0+hmR5X8 zeOSMw4MCoLIc//8fbuKQ85Le0Q5m4PDcnc8Rt/v3m1iiS+W7Qm/R+1XdjdjpojV0koE 7Cdb63NXdauus4EAs4lCrR8YgHw0pXg/pYeUlSi3AuWfzSXvwNErITMAtCKYO5pMljJQ 2g7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DFxOs1kP; 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-180141-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180141-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. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0b9cfb3asi146182415ad.129.2024.05.15.09.33.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:33:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180141-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DFxOs1kP; 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-180141-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180141-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 E9E79284952 for ; Wed, 15 May 2024 16:30:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A45D5660; Wed, 15 May 2024 16:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="DFxOs1kP" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 6E677156672; Wed, 15 May 2024 16:30:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715790604; cv=none; b=ll+1CUdkeytG4UUC8WCai+gROys5S9Aspt8C0v24pWwL3TRADpgUL6wRqibigHirC8TI+H9K8S8zTfyoniyHug/AtCMYmyOLWovHESH6uNMM1CogzbhtSdtR8QKljr0Yc85OgkcD821hft/40NkuKiWP1069LzOiLQua75aJcnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715790604; c=relaxed/simple; bh=2Fw7EGP5gnCtdsTqAi3dBdIyvt19JoaAOnStGWcs9Fc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JgPJJlEXfu4sUm2ZtrL5m6LXHKzB+wWBIWFfS1WvlScIQmlcnjZusgURNVXWM8R/MOEsBWjHN5tnVaKLKZ6cXz5B5ACbnqLaqDrHvRTSAx7e5YoDb7SGvorYI0Tr+NZ8/vMVjog6BwnG1fWQyAuxbWWNc5qIspgonyDaVl54M4E= 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=DFxOs1kP; arc=none smtp.client-ip=217.70.183.198 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 4AA38C0006; Wed, 15 May 2024 16:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715790599; 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=eOto8pkdzNcDGrx6zGWKATW1hZHmdFwBb/iquxmXsu0=; b=DFxOs1kPZXEjrYT7zrVpLQ8+MV1VFCFSNxIl7VbSNEjAdCF2bHaUQccNGAG08mRZB8TUlu fgeVCNxsSiEgcqiLOERDy+DW8CbrnsyHUBmMYcEW+b+h8JpvUjrbu41sHJ22snoQu8i0ol UasyrI+PHdEmJaMIJVuKVP2lQaa83sn/SfvFslms8zpaJhWH/NELKvdT/jpk2z4LH4regT 8TXZP1I4w3LUEUtoHE0ScTUwknULloPO+KCRoTRf24QmeX+MiNvDceG/ZfLzQXUnon2+0z FiYpY1Fhj1FSeQRJz8aXlHQDdOovu3fTpxXGZi/3ZDzckkFzwtidhYmo0MBCWw== Date: Wed, 15 May 2024 18:29:54 +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: <20240515182954.03c4a475@booty> In-Reply-To: <20240515121634.23945-4-dmt.yashin@gmail.com> References: <20240515121634.23945-1-dmt.yashin@gmail.com> <20240515121634.23945-4-dmt.yashin@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 Wed, 15 May 2024 17:16:34 +0500 Dmitry Yashin wrote: > Add pinctrl support for rk3308b. This pin controller much the same as > rk3308's, but with additional iomux routes and 3bit iomuxes selected > via gpio##_sel_src_ctrl registers. Set them up in the function > rk3308b_soc_sel_src_init to use new 3bit iomuxes over some 2bit old ones. > > Fixes: 1f3e25a06883 ("pinctrl: rockchip: fix RK3308 pinmux bits") > Signed-off-by: Dmitry Yashin Thanks for the effort! I have one high-level remark, see below. Otherwise at a superficial look it looks good. > @@ -3952,6 +4150,8 @@ static const struct of_device_id rockchip_pinctrl_dt_match[] = { > .data = &rk3288_pin_ctrl }, > { .compatible = "rockchip,rk3308-pinctrl", > .data = &rk3308_pin_ctrl }, > + { .compatible = "rockchip,rk3308b-pinctrl", > + .data = &rk3308b_pin_ctrl }, 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. Code for reading the chip ID is in the RK3308 codec driver [0]. [0] https://lore.kernel.org/all/20240305-rk3308-audio-codec-v4-4-312acdbe628f@bootlin.com/ -> search "GRF_CHIP_ID" Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com