From patchwork Tue Feb 6 23:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 20028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1886931dyb; Tue, 6 Feb 2024 15:34:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWxgakFG8o2VKvZpcrW4nkjJgmMOSjvJQAfj/eemNx8t8JBzjv2+F03WP93hCJIRXZkmlR X-Received: by 2002:a05:6214:2a82:b0:68c:9323:91d6 with SMTP id jr2-20020a0562142a8200b0068c932391d6mr3977087qvb.65.1707262478438; Tue, 06 Feb 2024 15:34:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707262478; cv=pass; d=google.com; s=arc-20160816; b=Ns6jP9vkGeMmobHZpUDMIYI49UK8pGB9ev2keBx+TZr3mjsEQKDJJpqYQ4kMM88y8h Jx1S00ZEIgseOvFTDi/0JmUD0Oy2IiZN5TOvcOL2T++N8eQibacc3ryW/M38I8h56mad P2qnBGet50pc1z27OLg3reX+aw38COQ4M+moY8sADqUYiyiTCdzjiE5LtFmDKeTuWiCp lcaFBMBzOuUw+djpdBEUov7oeiDjJsI7a/BWHIggVXhJGG7DYW4RRRRYMXdOgjq7nCz+ acS+6ZdCzyqbULCQ1UrlD7u0RaiGI53PciGFMf/WyZm2x0c3jByhjCxfZD1BJvsZtSp7 uNlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=J3t/dCk69ENxLEtiFl6GrgXJweCO07ULmDgCmo0QZh4=; fh=3e6xLHPYLim3IIp9ABxt18w8U8AN05obOwJO4UNfcJQ=; b=vTebxg3X7HhSdhnreiIBSLzJTF4E1JbJ08V6bi/DKMrpUItx5v8iuNs/1x5oqqVisN a4yVvfjei7FN5Ptm8GTqQjQb7swg0FGZL3EYexI9GAZ2gPiJaSpw1xZhDQy8ZzUw1o6C 54qDkiRY1VFd+GAoEHLtAo/biL+qY7S05Hn57ulHo8WcJpArMXl1ebaj0agtMGUsZOpy xx7qqRARjAYFqI/HDBIYUrRcG7k0jZ/bEfmiqes/IM8XYjgUS8zIL5yzhpH7OjK9h3j7 p7u54qdJOg9UmJx9PZmfnS18lTfUeZGv5W+3Na6Y3Snwqn3SpuwVV+cMh7qtEGcP034p zx7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PxjrHLUr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-55729-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55729-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCV4hPOpEhuxOcv1Eu/FVxWFXGbdoeNvhrvm8C6N4QKuK1PkV73M6GvnFpvrvoHzYnTCamE2C9CNIMcmISS/uYLIDRLDxg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p4-20020a05621415c400b0068c5c8a4159si3466650qvz.471.2024.02.06.15.34.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 15:34:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55729-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PxjrHLUr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-55729-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55729-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2F9701C24BE0 for ; Tue, 6 Feb 2024 23:34:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E70EE1D553; Tue, 6 Feb 2024 23:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PxjrHLUr" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 C1C5F1C6A8 for ; Tue, 6 Feb 2024 23:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707262437; cv=none; b=kT/OQjBq9u1YsiM8ZJKRUaMX1ZeRCtOkpQ/t5sQnjy9bke0SJTmU3D5Vt7Fz09yyihM2HPE9jnA81r5ZeRaprJUk/SHvjDTC5OcnBk5ZxsCEj+9aly1oU32WN+VDlLsV87pi0hOHc5WEfdIuDT0a4fBqgrknvaoDR2YTmRkrsEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707262437; c=relaxed/simple; bh=uUa/Ho3Wm4SxUj+BbGgsm/fyqzW+5eMAhtSXlwrvm0M=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=t2b6L3biJW/c5mhd80sU/q68RnVMlLr6XtLTMJ71r/Ukyv03vLSiOQWmyk/mcHLp//EXx0rTjOOMRDLkAogR5ZXzEwoKxwb7EU72BJL4/gLiNPe69rlkbaeeL63aIDmma6jeK+SGcqEw3HLv1hufH21gwd2Oso3XNlxGZo1pfbs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PxjrHLUr; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a3510d79ae9so5896266b.0 for ; Tue, 06 Feb 2024 15:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707262432; x=1707867232; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=J3t/dCk69ENxLEtiFl6GrgXJweCO07ULmDgCmo0QZh4=; b=PxjrHLUrxUCNnGAcER0Beix+E3hGnNHyG4frZbI7umIFj2Xx61uFT8EygK4c0tH5hf 7vJAyfI4iQxa1oUC+gSugV65SgpvGbGSbDxG6fhgc8GoMrrdtCk/25leDP1pqlUpuYwR FDA7xFNs8SlbJS8hi0vwuRFjFTVgk3vFMplC7XxIMT2sNgiBDp4qjVc7HGk3tf7tpdPS ooz2/J7pAyzc6rssAp6HqoXiCEfQPlX3tYNd2VOYqJ5pI8Iu/B5HBYUMEDZioKwKyR/1 MWF3Edok2l39symWv0QduFymrIk9L0wWNEiUyrT2a60L3Tx/axm0/CG7fGPxXSErNevi 7F4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707262432; x=1707867232; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J3t/dCk69ENxLEtiFl6GrgXJweCO07ULmDgCmo0QZh4=; b=R96Rk6Kg3Nxruvbke/hRHS6Zhtb3LPc4TK4nvnONord+f2NyGdvJQS5ty+fxklYAU6 hyLhFBs9Fb3zVR1Z6z76UYomRt5MU53tRjqT5q27ORUKXNjSi97xiEIy8zAbmWbxT3DD /24NUG/7t0r9L2cPbHnijGoOJtwr9jrMulLwkhNm2qbp/G7quU9u+/HbRxEGEl1BuXnk 2e1oNGcLvPnbyZYY+fpQNgclrOe3tlYPK2zC+X+vd1xASUKTk5Ie+SONzkVUHOlTorfZ I4mVThGTuI41UdF9fgY8xjQL4hwB7FlPKjGSUFtXlVS6I5WkJsN4NrRJ46L8p4z7sYtU p3ww== X-Gm-Message-State: AOJu0Yw2PoNehTKIOSLPjlQjI85cFhMqJKM9wyR12yHKX5/bcZ6blw5H X/IJPC5XHZpNiejQse2O4NPcNA3dBcImP6691pDCaXbw6fyATcASMGlhIqcFTBg= X-Received: by 2002:a17:906:301b:b0:a38:2694:46f9 with SMTP id 27-20020a170906301b00b00a38269446f9mr2007544ejz.71.1707262432016; Tue, 06 Feb 2024 15:33:52 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVSQTuvLi1jJ2nPud0S4+sepdTgNa2Nigx8K+PbWd4I4nELkynhotStbXMK3XK4l1oPPAlzspPSo7I5EUjyxzeYGtsOJ446PZEfG6TICWzDQKVYHF1VPjs7PKAps+L4kNOzIyuyGyaZ7Xc57+/I6qhT5nID5ty6ydEM5ssVOgApdNVxl7Y8rANft9+lA27/gn52HSi25F5H3Cz0zd0sbjeoZXTXww/rlOJRjY99QCdElgPMIIvVFP/E5NbmYqpuDPsC2safVHqDZfZM6h4SB8+s5jzhIjCBIQ0O9zHgiVMsg+ARJkCDHpEpFo/E1cQlddUr8/SbuUxuAW5f3uBoZ896CZHmM4frx0S/o60mN3K11X9oTCU39WxHPWOneUWS Received: from [127.0.1.1] ([62.231.97.49]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a36ed37683fsm72404ejc.215.2024.02.06.15.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 15:33:51 -0800 (PST) From: Abel Vesa Subject: [PATCH RFC 0/2] spmi: Add multi master support Date: Wed, 07 Feb 2024 01:33:41 +0200 Message-Id: <20240207-spmi-multi-master-support-v1-0-ce57f301c7fd@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIANXBwmUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDIwNz3eKC3Ezd3NKcEiCZWFySWqRbXFpQkF9UomthbJRobmCSZG5umaQ E1F9QlJqWWQE2O1opyM1ZKba2FgBmdoGrcAAAAA== To: Stephen Boyd , Matthias Brugger , Bjorn Andersson , Konrad Dybcio , AngeloGioacchino Del Regno Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Abel Vesa X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1122; i=abel.vesa@linaro.org; h=from:subject:message-id; bh=uUa/Ho3Wm4SxUj+BbGgsm/fyqzW+5eMAhtSXlwrvm0M=; b=owEBbQKS/ZANAwAKARtfRMkAlRVWAcsmYgBlwsHXBTBDUHkw22LNTcEGnFGBZ3ed0WbfJnF1y niQsAL7VQWJAjMEAAEKAB0WIQRO8+4RTnqPKsqn0bgbX0TJAJUVVgUCZcLB1wAKCRAbX0TJAJUV VnnLD/9XlbcGQXYnjM2J4ynDwPwRpDPDYJJrZSrHKt8dkZozLK0uEUvFivSsgRF0Oa2MrJNyeh9 i4ixNnZwvFa4jB5SFVFJuFvwgja1dJwPLwCzdqIm+voss5v9XYt254D+N5uuCxcVcrfHQAPE78m pTBy6rnrXPVYzDjp2jJByWbXPZwPp2GdCQeBGrffVWQOqVfpGQZuU1/MnuDOD/3Lwv6qukgVTHP PrXx012Ts341rhufybu/z9dKotXDjg0kRPL0gdhoxxLpn2/lD3Dt/k2GSnHGutcTft2VPTRIzV2 IGBwztmXS/ACt2EqGFNqEYxnFwu16buKMsusbjPB0fd8pdhXCle+2yHTUGQ3lzcjeBk9i99o+cc BD+dQqVlRWmpvTSmibrAbpGQWdc41TuOW+YAmE443hK3g1/mPrX6GQqooXF15+PMgYshkU0vPNE xZmFp7ilYWRRH9MiuxZfELbYURWAyiFIRxYKhka6XvT1KFD018ttajfW1gqcgY4F1rCfuhIPobq 5bvuBXl3cgQbH2baq5QmIVI0nu5EWjwtMoqIqcZR5xcrECQ4gRl1aLVM5k0iLwdpDdpdDWrLeRJ SfmhNv233g7TsVX9ZE+Zffge/GXh6lfbb7vw8vbVBqEw+a1AfFEF0tGmven58863MIMLeJapq84 W2uCzVA1cmdE42A== X-Developer-Key: i=abel.vesa@linaro.org; a=openpgp; fpr=6AFF162D57F4223A8770EF5AF7BF214136F41FAE X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790194460618343598 X-GMAIL-MSGID: 1790194460618343598 Newer SPMI controller (v7) found on Qualcomm platforms provide support for multiple bus master. So add support for multiple masters in both the generic framework and the Qualcomm SPMI PMIC Arbiter driver. Currently, the DT child nodes of the spmi controller node are the slave devices connected to the bus. This patchset proposes another layer of nodes in between. They would be the master bus nodes. They will not be populated as separate devices as they need to share register regions with the controller. Signed-off-by: Abel Vesa --- Abel Vesa (2): spmi: Add support for multi-master spmi: pmic-arb: Add support for multi-master drivers/spmi/spmi-mtk-pmif.c | 6 +- drivers/spmi/spmi-pmic-arb.c | 711 +++++++++++++++++++++++++++---------------- drivers/spmi/spmi.c | 76 +++-- include/linux/spmi.h | 10 +- 4 files changed, 506 insertions(+), 297 deletions(-) --- base-commit: ac139fc7db67968e5061715508b5fc4aa7c40c56 change-id: 20240207-spmi-multi-master-support-832a704b779b Best regards,