Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1709616rdb; Tue, 20 Feb 2024 04:59:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUV6/6tH6o1C/tymtXVzKIf1bMlQnyMqAcYHHBckR0GXkdkpV/TvQyRTZALtbwXRwlQ8dO5Y9XhSSYQwLCu4+t+EtzGl+mqc8njs+lBzQ== X-Google-Smtp-Source: AGHT+IHPbzGV4ex4XhPn0RUTrBSfJO3sSdpnV1JNoC+jtl1DlGn6tWiWeGCEh5He6IDzI424y4fe X-Received: by 2002:a17:906:40ce:b0:a3e:69d7:3514 with SMTP id a14-20020a17090640ce00b00a3e69d73514mr4552654ejk.26.1708433995938; Tue, 20 Feb 2024 04:59:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708433995; cv=pass; d=google.com; s=arc-20160816; b=DGixChBNWB18mfKTzCa+nP6YRHI5DGGdvOTBNCeZTupOobE6gGdtt+QcgQdsdASNyX 0mKMNcf6zgy2ZM8DVqPhE1BhUdgyDENi3QTsD7ZFSKNsQGkTrn3p19ki1btvOzOmvTuF gTzdLV8B6GBj1vKOONC3mwUCIw7tjZBXdsBmBuF0tol04Yf4jaIHSnX4L8c+me5CisfO V9pdl3Em/FKCxAEJWzj3XUSBDvguoV9z7QSVv7WRNP5A/8fyxAlT4Ya3aMPMz4OgemYF O6F9AH6GRG4Oj0dWmtZEnwBBy/y/jn7FawNBS4ZFi+Mfj4hl56BcQnJOandMH29kklMp tRPQ== 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=s+jWLQZPWAIdbIYTCxMRCQCGWqDgnyzVf1WiIb5Hkco=; fh=DA4swtfDgLDR1+Dny1LJk+9NgDKVN1KC02gmV9HP/7I=; b=Iaq5Qle49LCgw2CrZRmTbRVVcxOaMwXMu1qfJ/9S0NdveLLJwoO7iFZfevruSEEVVy eskUh5xobXrOE/RPAn2K3ZD8msMpHi9Z83x4Vj+Q5Qfihan0idgplHOh2cpLdghO/ELy QBAc2DUD+eLIyLK39A6vJnTtT0KK2rxGCRt9iX4bteUzIOGnK+O9tBY1PCAnlC3LKOe3 zr7Ac5XrWdf3EiFjQRtq7uKsz1Jj+Wr/EFouJXLwRTDU5KPIt4DxiyfyFHlp7MJ/LoQx 79voqTQDTnltLEpwbKeKh7S170t8220xv9zZINjVrZ7PZr0HsedE/h2FbHE3P+sZ7sJe hn+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Bk/m0D0d"; 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-73047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g13-20020a1709067c4d00b00a3e482b1b92si2561176ejp.905.2024.02.20.04.59.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 04:59:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Bk/m0D0d"; 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-73047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73047-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 837BC1F2142E for ; Tue, 20 Feb 2024 12:59:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F20A69E09; Tue, 20 Feb 2024 12:59:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Bk/m0D0d" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 7B5D0433CB for ; Tue, 20 Feb 2024 12:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708433981; cv=none; b=T7iO9A51Wnie5RFDdcquIjpWO73Lt6hKVqxDJOLcVzQzS7VF5UzTxB8PzNNKuh8+Jx8Q9skWMl6wh7eR2TOc8czUrLBC8GGtsOf7tbCkb8RupvLL08Yx6fXaVj+bDAdNrJulSLeOMAj6R1tELvi4lHQC1CLiS0w8cotkKhANH3Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708433981; c=relaxed/simple; bh=4kaUomWdFKTMnYewnlbW8ksZWZl5gVePGgFlT/90Ucw=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Xqh0y6i5wUNXHCZ0lo9k58Erai98vc0R79kgNNUfRziAm7EKWdG0t8wKw6nFMEg4XJxvHmLZ/+IknVyBDe8fHln13Tvk0uWh8YzRN9fNY7mFi/pYxTzE8wrSocu9r61qYSZ3sSHeel2wAgjDWP7Wvus9/T2gpHsY+GANLhznVbs= 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=Bk/m0D0d; arc=none smtp.client-ip=209.85.218.49 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-f49.google.com with SMTP id a640c23a62f3a-a293f2280c7so764038866b.1 for ; Tue, 20 Feb 2024 04:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708433977; x=1709038777; 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=s+jWLQZPWAIdbIYTCxMRCQCGWqDgnyzVf1WiIb5Hkco=; b=Bk/m0D0d8fm4dHw9cb3+N+vFHYm0B3oSOJ6anw+aVu9gmsg5FKTY+eSAkAP3Zl/0vR vSo+6FRO7AAnTYKcN7i6eCQedj7KbZ7xd6UuIZTTNmrOEquHZE3B8TNQhuMBQrOi7XO6 p8iBg2lmMqo6PDQjrvf2kcxzePMvEXxQN7PgxVy8hO5oXqqh3lc9G9r5JzEB9SNrfR4q eJAh5CU/CCvHyhTcGoRwen1xcCcOdZ27L9HOlwZ7WaNsbYOg7EQQWJzu8v1ZjhcqNv5C 4eeRa5rOzUs/A4rDWDxnMJgjzjuMttxXSvIvQe750u0kFyopC5sF5fg21nGxQ9xXyCGY S1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708433977; x=1709038777; 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=s+jWLQZPWAIdbIYTCxMRCQCGWqDgnyzVf1WiIb5Hkco=; b=rmZulWHJjPbxYbtk8Qq9SjY+2TAfb5HjUgqGqBWFYHR5y2g3JfaJBMfyKUAu0fmOMl HQlosTHsZpx4lEJpe+oii68USCP6VqjU6oGtfKSjdwSjDQrXHVShqIN+YjazYOIra86r Ij8GHOeZrWmcQr67PaAf2oCTsPakpW3bV5DOEU7DTT4vjoPKzU04+dUXSXS+7iPfdt7o RyJKooSS92WvQAH26TPfhE2niOlPPGZpCU5xn+DaXaSixTQRWEEw2WimAAz5lnW2o9Y0 zOSzvHPpgBvcSykcfSRJJU5rhtnly34+1JOqokJ2JhODxF2NGR5plbsj5j2QsGUchRaE 6J+A== X-Forwarded-Encrypted: i=1; AJvYcCUFTy50ymOCwOESk0vtDOdkRBwDo20eOTdE3piGWbBM0jhHLWaKdv8WfwFX/nS22TyF0s6FoNQdhZRyTio9s3uIF6wBi4Cxs7CeG0yi X-Gm-Message-State: AOJu0Yy/nGZMVM4GxmfElCJHi2HUVZ9w4xmqakBze7kVFZnYwypM1UYQ zrWDQSwJGnIBRYDxkPUq8zleU1HKM1+LM3WWFFD7saWdPmSlGuVzFxWByZ9DOSo= X-Received: by 2002:a17:906:bc8d:b0:a3e:6628:f70f with SMTP id lv13-20020a170906bc8d00b00a3e6628f70fmr3998963ejb.55.1708433976812; Tue, 20 Feb 2024 04:59:36 -0800 (PST) Received: from [127.0.1.1] ([188.24.162.93]) by smtp.gmail.com with ESMTPSA id rf23-20020a1709076a1700b00a3ce36ce4f9sm3948802ejc.83.2024.02.20.04.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 04:59:36 -0800 (PST) From: Abel Vesa Subject: [PATCH RFC v4 0/4] spmi: pmic-arb: Add support for multiple buses Date: Tue, 20 Feb 2024 14:59:20 +0200 Message-Id: <20240220-spmi-multi-master-support-v4-0-dc813c878ba8@linaro.org> 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="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACii1GUC/43OzQrCMAwH8FeRno2kH1rnSRB8AK/iod3SrTDX0 c6hyN7dspMiiJfAPyG/5MkSRU+J7RZPFmn0yYcuB7VcsLIxXU3gq5yZQKFQoIbUXz1cb+2Qq0k DRUi3vg9xgK0URqOyWheW5f0+kvP32T6z0/HALrnZ+DSE+JjvjXwe/UGPHBBKWmsnkZfaVfvWd yaGVYj1zI7ijeLyFyWAg5WWo5BiU+Dmi5LvlPpFyfwVWkNIDpUz7oOapukF2ag4j14BAAA= To: Stephen Boyd , Matthias Brugger , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , Neil Armstrong , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Srini Kandagatla , Johan Hovold , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, Abel Vesa X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2213; i=abel.vesa@linaro.org; h=from:subject:message-id; bh=4kaUomWdFKTMnYewnlbW8ksZWZl5gVePGgFlT/90Ucw=; b=owEBbQKS/ZANAwAKARtfRMkAlRVWAcsmYgBl1KIuXSH5UMGSA81CQbo8VMYCmVJwJzeoi106z O0yLBTZvWGJAjMEAAEKAB0WIQRO8+4RTnqPKsqn0bgbX0TJAJUVVgUCZdSiLgAKCRAbX0TJAJUV Vh64D/9KA3g4aKNkyzLJfGpz/zWGhefbVTp3yqRNrZP4g+nMZkOm5oo1rqX1Y1a/QjaVijo7p8g 870BF7ezB/UvwM6jfLZdWwDcKnJaHxHFKMVXYCMqlZVCgK6HokTp9ITYiOk4Q72F28jvFPgWvm2 RbZKjI1hSDDnp9Yn7PsDS4c7BAOkJU/piefh/Krltgjs4jVTjKi7oa9TU8jh4+oTuerOL35nvxc p8yAcD/zxVBqv9IVpseLSjE0baZ7xV5pArTf3RKt6fisEcL0pC9adRLs98gKWIgmnC72s1TCwFu QnX+uwTntjlp43v+ufmFp43XJbjj4mncJC0H4Yi/ek3OCPSnfuh1owkE2iHe/6IJznVsVbgDtdN sIzz9xE0dsqpbRQexP4gZODy6YYpBGCzIXRC69dNwb3WpXc0wboBU9lRikNfLR0g5cBbNX3lLiV BzRG+qAWvbpNwdfc1//7zt0zjQmY9f64QTiYyEAQ9NA+6Svm0J1F8JJ5eo/7XNz3X5GDxmyd0Eb iVTWRKg+9HyVSWbMZmFWf2j8jfO1nK03PjhD0htQEiJhwdFhEVSt+D/2AT6ooPErrbLRkYv6aCx fPVWABAGmCxlZqxyry7WbfWKWNzVW/dt2oeD25MOMYQ44LFSWGOSMbC12mRiVWQ9WYjMIztQ+8e bBLylOZoBR4fGcg== X-Developer-Key: i=abel.vesa@linaro.org; a=openpgp; fpr=6AFF162D57F4223A8770EF5AF7BF214136F41FAE This RFC prepares for and adds support for 2 buses, which is supported in HW starting with version 7. Until now, none of the currently supported platforms in upstream have used the second bus. The X1E80100 platform, on the other hand, needs the second bus for the USB2.0 to work as there are 3 SMB2360 PMICs which provide eUSB2 repeaters and they are all found on the second bus. Signed-off-by: Abel Vesa --- Changes in v4: - Fixed comment above pmic_arb_init_apid_v7 by dropping the extra "bus" word - Swicthed to devm_platform_ioremap_resource_byname for obsrvr and chnls. The core remains with platform_get_resource_byname as we need the core size. - Dropped comment from probe related to the need of platform_get_resource_byname as it not true anymore. - Dropped the qcom,bus-id optional property. - Link to v3: https://lore.kernel.org/r/20240214-spmi-multi-master-support-v3-0-0bae0ef04faf@linaro.org Changes in v3: - Split the change into 3 separate patches. First 2 patches are moving apid init and core resources into version specific ops. Third one is adding the support for 2 buses and dedicated compatible. - Added separate bindings patch - Link to v2: https://lore.kernel.org/r/20240213-spmi-multi-master-support-v2-1-b3b102326906@linaro.org Changes in v2: - Reworked it so that it registers a spmi controller for each bus rather than relying on the generic framework to pass on the bus (master) id. - Link to v1: https://lore.kernel.org/r/20240207-spmi-multi-master-support-v1-0-ce57f301c7fd@linaro.org --- Abel Vesa (4): dt-bindings: spmi: Add PMIC ARB v7 schema spmi: pmic-arb: Make the APID init a version operation spmi: pmic-arb: Make core resources acquiring a version operation spmi: pmic-arb: Add multi bus support .../bindings/spmi/qcom,spmi-pmic-arb-v7.yaml | 119 +++ drivers/spmi/spmi-pmic-arb.c | 951 +++++++++++++-------- 2 files changed, 700 insertions(+), 370 deletions(-) --- base-commit: 2d5c7b7eb345249cb34d42cbc2b97b4c57ea944e change-id: 20240207-spmi-multi-master-support-832a704b779b Best regards, -- Abel Vesa