From patchwork Wed Feb 28 11:28:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 207779 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3288663dyb; Wed, 28 Feb 2024 03:43:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCURN956sg//4wSIYJXlQQ3YplG4/09HVhJBsOjxg6QC+2tzWASinmb6mp+cpYh4H4vtK4Ak6CIYpGnYFsaOSX/YoHP+XA== X-Google-Smtp-Source: AGHT+IEVoDMBAkGx2Gi9b3+h8jtF6CPk9z7sR+gSUZa2PZk6w5/5h6QuC1rvO1yyqO1VbsP+vIF+ X-Received: by 2002:a17:90a:c7c7:b0:29a:b5ab:a0fb with SMTP id gf7-20020a17090ac7c700b0029ab5aba0fbmr8717948pjb.23.1709120602346; Wed, 28 Feb 2024 03:43:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709120602; cv=pass; d=google.com; s=arc-20160816; b=zvhlY6vTxqGPE1kJsFFxiqj7hl4CO+7Sat7tyDNNy0tiL8o+/4TcqwZsRCSSxg1EB/ whQHk2K9qVnMxx48g8EAjR+4QRO338O13KQE9trD/m2jTRGZS4oHrsY59/KqF4OgoR67 +5A9oZDf1yUyrvw/EXd5S9nxzooxMtCkQTKa8bnalQtSXsJPIhY4ABw0lWT4yMOr0gh3 PGQW2G+r+2vlEakppIc60JHfTWTwNQT90lAZbDBj0gDDDS/jjs0nCqDbHRtVpbM6sZcs s30ZEHZLMJK2nZO/XJmd8QLxuRWXJ1hVWWyG27F7+oIlIumA+7myDbRZcsTHGc3hWFsV EZVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=VpV5SvbrLw6BtffS77u0tmC5Cq+M6dFN+xE6ca04/74=; fh=FEGj322JUxHP58NgFBs9atrc2KpQCnFuCu2ueZtAhdY=; b=mRVgzB6/XPOr0BHN1Qxu6qEYqp45zcq4eD8RGXghyNJMcyfJyKvB3LjR3lPbtmNwLx XacICmt2WF3nq4G1H0zMDRUFfjAyIIovuxlq3/6fspH7r5IS2+2z9uR7IE6/AaQ+TxX+ hcW/ngcYiv2+yK742tJwGyq5XqF+9+Tc3+JKuu/Toj3ljVT2L2cXrEa3jVo4U1FPaauL NIOWcpmEMqyzfBaHXDKd6wO0dYbq06Vc2U7eVkehUOyaJmZWZI2LgPpcqU8wwpYiV1GL u/IyDEEwwpvw1UpbgTZctMuEYwakFbGvekGSzxd/YWQgtpSCVRt1Lhyj66Ipgi6Pa23n c8Yw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=V0d5XFLH; 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-84907-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84907-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id fz5-20020a17090b024500b0029a2fddc490si1186427pjb.120.2024.02.28.03.43.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:43:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84907-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=V0d5XFLH; 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-84907-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84907-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9969BB24B5F for ; Wed, 28 Feb 2024 11:37:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E371815CD57; Wed, 28 Feb 2024 11:28:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="V0d5XFLH" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 12FF615D5A2; Wed, 28 Feb 2024 11:28:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119717; cv=none; b=tfPMrbgbxczQSIxfdxX2MrTmd1Xcne0RqnrkZwP9egU/RzxJLoqpLV809ONm2FDbJ5vpPOVXj0GG4lybuU9PR4e0wHuOV0sOk/n+gO2DtJS10BBw/uUI5vUwsNtZW6i6SpODxHSyV5wDb9likyQDScPUB4HfCggQIoX3jVZTjTQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119717; c=relaxed/simple; bh=LZXd37PvNSwXU5xfvI/2wf4xPTyEjUPaJOZPtTjdEuk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HWjLO9EiAJJ1jGAKjJBy9ImUbxn59gkTW/8+fRNlfxdvmwrOr2u5Aiztyyvi+PBzF01tOsBrWNYz0DxfHXc67Cad5omYBpZ0xib3STgRi3iSJ8XT0RIeLWU3Z7VDXwvgG24zesudhB4s2nU2myBZ+A5cD59E7TZBJeWFv/sMzt0= 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=V0d5XFLH; arc=none smtp.client-ip=217.70.183.201 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 F2F7B1BF21A; Wed, 28 Feb 2024 11:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709119713; 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=VpV5SvbrLw6BtffS77u0tmC5Cq+M6dFN+xE6ca04/74=; b=V0d5XFLHmBCXn5TfFeKJHIG2hVLgs1bsqH9BDqqayu45k42SOPN07miDPppVL9EpKui5zt TpUkX5X7TS/35ocivrHFc0O9mHToArmHY+OL66bZIeUMyMqVp1x+4UGlTK7iDDKHB4TsDD NpQq3vLV4eTSl0burMLrMvfbz2hIZk7HPB7hA5ptn0JwICHIhkHJz/vzLvR1nDAnKKH+WM BgKMemBgQ1NPx2ggGomj0OaE8+uWjb3WIBARzcQsarC2XTdSCeU0FNBq3kEwCZ5evoJ/gM rrYr4An8/+JqSNQ3FmfHapmTUoUV9NNPNmt8tQt9YCizfVt1TMpruFrhmp9Q7g== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 28 Feb 2024 12:28:28 +0100 Subject: [PATCH v2 30/30] MIPS: mobileye: eyeq5: map GPIOs to pins using gpio-ranges Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240228-mbly-gpio-v2-30-3ba757474006@bootlin.com> References: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> In-Reply-To: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Thomas Bogendoerfer Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, Gregory CLEMENT , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792142844584213046 X-GMAIL-MSGID: 1792142844584213046 Create a mapping between the GPIO controllers and the pin controllers. GPIO is handled in a one-instance-per-bank manner while pinctrl is done with a single instance for both pin banks. See gpio-ranges documentation: Documentation/devicetree/bindings/gpio/gpio.txt Signed-off-by: Théo Lebrun Acked-by: Linus Walleij --- arch/mips/boot/dts/mobileye/eyeq5.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/boot/dts/mobileye/eyeq5.dtsi b/arch/mips/boot/dts/mobileye/eyeq5.dtsi index 5f00d129c057..68f6c81331d7 100644 --- a/arch/mips/boot/dts/mobileye/eyeq5.dtsi +++ b/arch/mips/boot/dts/mobileye/eyeq5.dtsi @@ -168,6 +168,7 @@ gpio0: gpio@1400000 { interrupts = ; gpio-controller; #gpio-cells = <2>; + gpio-ranges = <&pinctrl 0 0 29>; interrupt-controller; #interrupt-cells = <2>; resets = <&reset 0 26>; @@ -182,6 +183,7 @@ gpio1: gpio@1500000 { interrupts = ; gpio-controller; #gpio-cells = <2>; + gpio-ranges = <&pinctrl 0 29 23>; interrupt-controller; #interrupt-cells = <2>; resets = <&reset 0 26>;