From nobody Sun May 24 22:42:18 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 37B243F88B8 for ; Wed, 20 May 2026 18:23:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301400; cv=none; b=DN+eM5hQxRc8yh26OmMCiVL/wCq8hqUcuXEi70NdrmPMw2DyS4O0UNIE1SL19OpFs6wAB0pyC9NlF9ReQzuG9X6PL7AeN68yEy9YqOvRHBXpEAHHKJgpDNWtTe1eXNlUSCZKAN+3Z/vfw38b1qeLfwDEtdnNiiVa3UhSjoUANJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301400; c=relaxed/simple; bh=DrNGeBlRxTjZoXBtwt3WHPiWKByZ7OZ+6oYAQENqEx8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bmUysX0k1w9gK9seXps/XunyV5UmWD+s5/1zrnjb+n4gJ4CFfEsXJ5h19noIjQ5OverKykkyRa9BX7tv4ms/UmDil+pzIY3gOjCihRUISS14QXFs7GzXhRQA4yVJitpcQMOAODAzmXj5G5ljPDz0W1wkEsWb53wjGhsW5h7shm8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=akt16iCY; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="akt16iCY" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-44e5624c053so3223552f8f.2 for ; Wed, 20 May 2026 11:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779301397; x=1779906197; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KFT7mMG9k0k/BXen8CQg8hnB8vdYe60xOPZB+uYBrVs=; b=akt16iCYWyGuFuq/BySn+yBAP22U+VauCP1VfFjlxMpEu0M2DrcMBMHrTJ9padWPYD BiBtSU0CWO+TPWZ9cpQNi6LhC6EljQflx2K8LEl+lsb/iwLG7y49IGopsXLElVo83Wsc H9iMB1H2w68rIl444/CBLzCxoEVIXN4v9qfoTHrKG8622u16TJ07FF1LOEAWyJw4RPN6 r1XI/8HeaxlPKUV5K/03OEmk8qdrg51CKoX8UPZY9OpN0Ym7O5kaytnAzbxhTVhZGZmH ZwvUb4z6B1A46gCpoZ8D4ljd/zsPNJqWVp9bcvEoMJICk55tzBXaYwW4K16g4468CzDp E/kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779301397; x=1779906197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KFT7mMG9k0k/BXen8CQg8hnB8vdYe60xOPZB+uYBrVs=; b=R7eu+Z8do/F73puWi6BShT2xAObmexnHlBZlom/nIHHZ2rNFWpTp+W0y7nvHRW7OPe io8Y8vgGPG7VQXA68qHQB7WRZ+FkGPOYvuqulQ8Bo3b3rzM/fHR0zq0WbaPF0YuxE79e 4GBXp1QooHMhQWy6SniB96kFLRhXWVm7FLqMfz8+j7DEkkyZeyJuPV3WsOQnvEyjcIl4 1+v0hZ25hHHxSGls/a5xeYT50Y+m6n+0zt0oU4JAILxRzkYmewlxji713pkVZBvSvxQz as39TjSBgQnnmqkxKnjfklt7zdGvbk400fxxRLrBls7NkiuaZlBWReknpN4s6iqwwS3J 62/w== X-Forwarded-Encrypted: i=1; AFNElJ+klliPaVFXYYvkkTaG6eA3uqCOLmdSnXL7jxtdkgx4XzNrhFqYt7kyiatMFJe22DFUdeUHa/oYeEPH/hU=@vger.kernel.org X-Gm-Message-State: AOJu0Yyl6XPMjchHmi6EZ3Ygk9mYHH+tTZPG3ohLkEd5l/yXpUbn5FlP WlLsdAPEqlNSUegpODo5lntjaFDmwTFCeq3Ck7N9URj3dgWwR66u6nKW X-Gm-Gg: Acq92OEYoQWw45nnG0Q7Zrxrwf0vber4SpDTOqFkmiV1YY76xP/r8JiUDQ0k2oIMQ2Q ze4ap1e5JIqYN88vnHAbALZ0AL9Qa+N+jgtJ7K/syUDeCDLj74VnI8temLtZXrhwKaPWlNL2phK Nm23qR7OQ2BT9QkyV2SD/wbAduVyjX5Bfw7eFrUKQPaHFa1GOoJwXin2Ev1Kf3KOvH41r4wIXmA PniVNRgxQA4hqKBC16cuAGevQzNxHmgwv8zyCl06TdkEYRH6HpD0EjJBmt/xOpL/Q+OfhLGmj4h ez6quAVXwCAj/6qaLMqhsauSfiutv3zm2rVPuOUMlviJJ6vF5ewKsj9gCLpuxuHVFQHQaDzKiyr nUg8zw6eSgtWgF3mMloIUANA6+FOP0sDQyD3RDP2yFa0VrxRRuP6OAXlzbTpaOXGPQEpOwgNbla JtZh2UyINsIbZa X-Received: by 2002:a05:6000:24c9:b0:43c:ffee:ee94 with SMTP id ffacd0b85a97d-45e5c5a0198mr43839740f8f.11.1779301396553; Wed, 20 May 2026 11:23:16 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm51297739f8f.11.2026.05.20.11.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 11:23:16 -0700 (PDT) From: Svyatoslav Ryhel To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Svyatoslav Ryhel Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v6 1/6] dt-bindings: leds: leds-cpcap: convert to DT schema Date: Wed, 20 May 2026 21:21:19 +0300 Message-ID: <20260520182124.117863-2-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260520182124.117863-1-clamor95@gmail.com> References: <20260520182124.117863-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert LEDs devicetree bindings for the Motorola CPCAP MFD from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/leds/leds-cpcap.txt | 29 ------------- .../bindings/leds/motorola,cpcap-leds.yaml | 42 +++++++++++++++++++ 2 files changed, 42 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-cpcap.txt create mode 100644 Documentation/devicetree/bindings/leds/motorola,cpcap-l= eds.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-cpcap.txt b/Docume= ntation/devicetree/bindings/leds/leds-cpcap.txt deleted file mode 100644 index ebf7cdc7f70c..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-cpcap.txt +++ /dev/null @@ -1,29 +0,0 @@ -Motorola CPCAP PMIC LEDs ------------------------- - -This module is part of the CPCAP. For more details about the whole -chip see Documentation/devicetree/bindings/mfd/motorola-cpcap.txt. - -Requires node properties: -- compatible: should be one of - * "motorola,cpcap-led-mdl" (Main Display Lighting) - * "motorola,cpcap-led-kl" (Keyboard Lighting) - * "motorola,cpcap-led-adl" (Aux Display Lighting) - * "motorola,cpcap-led-red" (Red Triode) - * "motorola,cpcap-led-green" (Green Triode) - * "motorola,cpcap-led-blue" (Blue Triode) - * "motorola,cpcap-led-cf" (Camera Flash) - * "motorola,cpcap-led-bt" (Bluetooth) - * "motorola,cpcap-led-cp" (Camera Privacy LED) -- label: see Documentation/devicetree/bindings/leds/common.txt -- vdd-supply: A phandle to the regulator powering the LED - -Example: - -&cpcap { - cpcap_led_red: red-led { - compatible =3D "motorola,cpcap-led-red"; - label =3D "cpcap:red"; - vdd-supply =3D <&sw5>; - }; -}; diff --git a/Documentation/devicetree/bindings/leds/motorola,cpcap-leds.yam= l b/Documentation/devicetree/bindings/leds/motorola,cpcap-leds.yaml new file mode 100644 index 000000000000..c8e7b88a05cc --- /dev/null +++ b/Documentation/devicetree/bindings/leds/motorola,cpcap-leds.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/motorola,cpcap-leds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Motorola CPCAP PMIC LEDs + +maintainers: + - Svyatoslav Ryhel + +description: + This module is part of the Motorola CPCAP MFD device. For more details + see Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml. LEDs are + represented as sub-nodes of the PMIC node on the device tree. + +allOf: + - $ref: /schemas/leds/common.yaml# + +properties: + compatible: + enum: + - motorola,cpcap-led-adl # Display Lighting + - motorola,cpcap-led-blue # Blue Triode + - motorola,cpcap-led-bt # Bluetooth + - motorola,cpcap-led-cf # Camera Flash + - motorola,cpcap-led-cp # Camera Privacy LED + - motorola,cpcap-led-green # Green Triode + - motorola,cpcap-led-kl # Keyboard Lighting + - motorola,cpcap-led-mdl # Main Display Lighting + - motorola,cpcap-led-red # Red Triode + + vdd-supply: true + +required: + - compatible + - label + - vdd-supply + +unevaluatedProperties: false + +... --=20 2.51.0 From nobody Sun May 24 22:42:18 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 D2DA33FBB4D for ; Wed, 20 May 2026 18:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301401; cv=none; b=r1vgNi8m/z7D2IRSoDRhGJa14WVvd5+ejyWbrDH+xUqabu3slnfW5IHk0eMZzKJXiUkQybVlpDPvGSaMO2ViZtCBQiP0wSbmSZSsYAk+4n7qjSvp5xNb15pt2mzqhE9KNhZliOLeGEUJ690GM4iBD291a/7uTvrlOxjJOOvt18s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301401; c=relaxed/simple; bh=sJYSHWc09xFtiXGLxIY3eCmrqPgEujr443cRCV1hpP4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NTNCZpLD12LQ05oTNV5zdFwVJip8xjtYiTUUeMZZhiS0LnbNYm9LLA8sfQDL75LPasn7nmczpQ4r4h41uiHZ5WL1PRtapLCt8L2Hcz2NyCt564gnnQ0wXx1ajj9of94iYfGKtpFpeigV0CcNfM7BG2PwgDopiBjx5VQL4bl8ppY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rZPLR0ee; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rZPLR0ee" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so75667355e9.2 for ; Wed, 20 May 2026 11:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779301398; x=1779906198; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eV+WP61ShKOblE3anHz+BLN4XFN+aFPa0yNq3Cy5s6A=; b=rZPLR0eepIKcHVu7bhWkEfBnwl+1KMWEJjyfELBDkkHOv0mMQs04Tg08BdXAYVS4xh vkyfnxjKSALPjSDU+AZ67oj2541mnHaj0ElEK2aFS7egIj6lAn/NupggxKQSLqLi1/tQ Ep+0lXInLFI2pwT03sHEmvoQqNkoDbIbB3Ss/iUQ7iHgM9X9RXckgh5ONKbM0lM9rYLk 9Rz3gLn4MQteOfSL4TmENtwsY9H5ss/J5IJ3BNiS5St/kKmzHfBDQUAifN4ZPaJINYtU sXWCJWjrG5SL4DNaUo6xrHRUXfXzi5bvdNc7w2eRkHBCdxE12ayxymd0Ej2FPACo0dB8 MunQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779301398; x=1779906198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eV+WP61ShKOblE3anHz+BLN4XFN+aFPa0yNq3Cy5s6A=; b=e2WYLZs/AavRYhF7chI/K43Jye+phsg0uB3YRhLCdtq4eUONGydGtPDaZeuTgt9cS5 Ya2v7zj7P43RDkmHVoyp//nndYlwh8zcoCwJ1rK8qoEYa4CJ7ZCelY2JjkaH/HO8YuB7 xOFLq2kzZFoTAUOGJcnhL+B5xyj59rn8QgSVpQ+eT4gR6K8ywOrtPhv0i6um4pCThJ82 MAwlCF5cf65N18pDh/zZoi4nurh+Syx5XfZM3i2azbRW8I09azO4lev3M1Kimt2tBfGX 5YJphU9liRg/9Sd5W5FPL/mzObZtuxP4MmX+5+Dz6olAxjq+PaDJNbZZsu+yaW2n8Du8 oijA== X-Forwarded-Encrypted: i=1; AFNElJ8EKm0fYgL9zad1yirmIpGcik3jwDWVCR0I62L4wy+CqLCdHO46fcMF/341/wKO59K5iJdzEMQdQ3x4+98=@vger.kernel.org X-Gm-Message-State: AOJu0Yzh2KnJDkpbMheZWngJUdw0ZDphgNBGImznxyg7F7RXmqPHvem/ uFJpobQ8dtOQ6Nis/ODSkQg74E0d2WlpZkajfYJKus8tTLb8fbpS4j1W X-Gm-Gg: Acq92OFa0ucVyJ+RTvxbyIYsRhkTEG8UKW4BQafFsS4zYXF2TdbP6qw5wSK2jkVz8gU KrxirEkluC/x4XpURgR/MIhfulEBckH9Mu6/na4vP3tEFiM/h/cNnZDkIMVQEUtZccVkJnhD/ZY urbMC8i2SZCIlc+ERFBQIP/vKwSbgGdOkPlkjSxVMiSQj8/r0FP3HU5+Sqbt1ixyext4QsmDQxV 0IZw2fwQBx6kzXfwT8le9WNWoD56CdFSCNAWb/CNzcUTMvz84NiVwtgovIny36ZWrT8rcKrKKAK al4syF/oNpEDQDWFb0MJXFwatgSNF4vpbZ0Pmme//OSqOmyIFLxHQ9Rd6gztvFs84IQ7hqdieOj FYwRy+1FD2N8sgCMvMftpxGX+aI5Pu8wPyVRlFDBC7AZNlG7P4tMfUix9Hh8q/f0SwMjNcSsSzQ dGN2WE5aWHlcHQ13WSh1623B8= X-Received: by 2002:a05:600c:c494:b0:485:4388:3492 with SMTP id 5b1f17b1804b1-48fe60ed839mr370183445e9.11.1779301397887; Wed, 20 May 2026 11:23:17 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm51297739f8f.11.2026.05.20.11.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 11:23:17 -0700 (PDT) From: Svyatoslav Ryhel To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Svyatoslav Ryhel Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v6 2/6] dt-bindings: input: cpcap-pwrbutton: convert to DT schema Date: Wed, 20 May 2026 21:21:20 +0300 Message-ID: <20260520182124.117863-3-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260520182124.117863-1-clamor95@gmail.com> References: <20260520182124.117863-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert power button devicetree bindings for the Motorola CPCAP MFD from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. Acked-by: Dmitry Torokhov Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring (Arm) --- .../bindings/input/cpcap-pwrbutton.txt | 20 ------------ .../input/motorola,cpcap-pwrbutton.yaml | 32 +++++++++++++++++++ 2 files changed, 32 insertions(+), 20 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/cpcap-pwrbutton= .txt create mode 100644 Documentation/devicetree/bindings/input/motorola,cpcap-= pwrbutton.yaml diff --git a/Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt b/= Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt deleted file mode 100644 index 0dd0076daf71..000000000000 --- a/Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt +++ /dev/null @@ -1,20 +0,0 @@ -Motorola CPCAP on key - -This module is part of the CPCAP. For more details about the whole -chip see Documentation/devicetree/bindings/mfd/motorola-cpcap.txt. - -This module provides a simple power button event via an Interrupt. - -Required properties: -- compatible: should be one of the following - - "motorola,cpcap-pwrbutton" -- interrupts: irq specifier for CPCAP's ON IRQ - -Example: - -&cpcap { - cpcap_pwrbutton: pwrbutton { - compatible =3D "motorola,cpcap-pwrbutton"; - interrupts =3D <23 IRQ_TYPE_NONE>; - }; -}; diff --git a/Documentation/devicetree/bindings/input/motorola,cpcap-pwrbutt= on.yaml b/Documentation/devicetree/bindings/input/motorola,cpcap-pwrbutton.= yaml new file mode 100644 index 000000000000..77a3e5a47d1a --- /dev/null +++ b/Documentation/devicetree/bindings/input/motorola,cpcap-pwrbutton.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/motorola,cpcap-pwrbutton.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Motorola CPCAP PMIC power key + +maintainers: + - Svyatoslav Ryhel + +description: + This module is part of the Motorola CPCAP MFD device. For more details + see Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml. The + power key is represented as a sub-node of the PMIC node on the device + tree. + +properties: + compatible: + const: motorola,cpcap-pwrbutton + + interrupts: + items: + - description: CPCAP's ON interrupt + +required: + - compatible + - interrupts + +additionalProperties: false + +... --=20 2.51.0 From nobody Sun May 24 22:42:18 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 661F43FC5C5 for ; Wed, 20 May 2026 18:23:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301403; cv=none; b=GbytQr7k+smIhTGDIB0/9DdcaeQODz/yrMxdufUSkPgxqASmcINN7961CGCKOfDDbST+Dj8VJAnMTl310Zyi4u8/nw02+QWMkjuPfIXnvtYDjJRs1D+7QWrdhn97FLxfeyjNraEZRYFZqEjKCgVnSJTl3ENZdXcuNKx3FU3rL1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301403; c=relaxed/simple; bh=Fb9arXV57Rfzm17Hzg6SibYbPBdN1vbhKMysu1glpKI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eMaTsdv/sYAEZQQ77PRFzovgn9bmeeI/hgh9elDTt1CeZ199k6MUX/TOGpRxL2OPT/Pl8vVmeGozP0xBocwGM8XEefXuiNuv3Q9ad0ue3ML/IkRtUZuWjmJ+wOoqooc35YYSspt2hUQMKRClbkvWSbq/g3IC8MqB//xAB3x3Wdw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aTW+IX5U; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aTW+IX5U" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-48909558b3aso54555395e9.0 for ; Wed, 20 May 2026 11:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779301400; x=1779906200; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7mfsz7StXrDdiwSwS2HGBls/8al8jeUfkUiP53FKYsw=; b=aTW+IX5USONwPid0BwDzSL4zSBfu1jfgxqfx75PwAZAEcXvY9fUkXLWTVyKgjmQ6xr u42QIMDYCPx0zF28cV1xwOMrdzdVSvF6HhtjWQhqSzP2I4L+8pQr+qo1HSMg0uhPKakR 3V4BtLVZZW/qA4mGTQBWBRXJsIQnjhFj8Jvw1q3Psh6AHd8oqKsY6fN5VxWcVyNh5N2J BToi+rEGL/cj093n6WaUgtLBIKVgZkBTUmFJXb5shPAmbLIVGPS8ISeMiVZkmr2uOu98 43KHEsU+kycsjplzu/1/iosQyyMT2n3dal8doNBoXHDUV304U+EplQvdBzWLG5bHOHSr YJ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779301400; x=1779906200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7mfsz7StXrDdiwSwS2HGBls/8al8jeUfkUiP53FKYsw=; b=bGQA1WzSohn9zdNrNnEYQXB9VMU0WRWE61duiaFuf8PzxBmZ2FP3RFAeGoRi7oqSNr SWpEStag2jORDt1VZhrWw6nuS7lwYjPLn2Y73J95UTbgH/T7cUTRpgjBYBF+SyuIOc4z XqyslxvHuL/qL80yeQiVRvJ/PXEfas2vmFM6VR7KZkTUXEPTJTK8GlMXgcKZx4SEWgDx FMLyNxElc0+rf9DHfC6ISq7bX/2qi86SZyKl4PFlkCUczQFJr6nTj0UN9aDIhOW++Bcs 9uvFCOM6ZfRJPtt7YqX/CGKJy7Ri5QYa/LKnWvKft0mW+lus7chHITq3s+OZ0rdYzm+z 5APA== X-Forwarded-Encrypted: i=1; AFNElJ+gmKyFERYjCAYIqOfjYvNSfwNbX3L4am+U3B+lsCZo3xuRRO8Kd3mAbbOBBSN3zUqaheJTZiyuNk9bIb0=@vger.kernel.org X-Gm-Message-State: AOJu0YzdGHKuWKLJaRo7zGNzgTdOCE4h35MHy47Mafl59CVaHS90jX9J K+aeXu/w2rUmID46navhV3COkEmaHM5Sh0xZVmjc6FNqY/MqS3CrLui8 X-Gm-Gg: Acq92OGf3iI8wLTSK7Q6gMGqlhyqxxMsx21Fa1XW0WgMH0ZT+1LE8E770gwszGxI7Qd Dak/RhJlRCTdgI83PfhXZ6G2rG4tDa+lOEQ7R7WnJL9/TWy0esVaslUevixBCuCp3eBWSOybHF8 HGK0UR8boCxplMF6zQDHm44d+Cg99siUnRK65CN2fynWJvYw7F4c8i+ANTp9fU5ggmVlW+GOPHu 8my+r43DfNP2KsjDfdf4NYKISx6aLIDfx/XUkLErQAhN3g6BKHd9Q+2S9WPNWQCSqTzZmqbdBDR LHdMYhaOOGt1hNWWsflUyAjdd46/XuE2LM2ah1PQLxuTMCtptpejhk9CjolDNsojj/kQ9VS78wc Kn5hOvHid6XmBWz31I2xx6Ldd2LU4EIIwk5GoxevAiiU/ICvIG+KAXwYBR3g1m3sw8sr+kzg22c AJw/SRTJWFQnsa X-Received: by 2002:a05:600c:c087:b0:48d:c0a:3813 with SMTP id 5b1f17b1804b1-48fe60de6a7mr310090975e9.3.1779301399372; Wed, 20 May 2026 11:23:19 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm51297739f8f.11.2026.05.20.11.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 11:23:18 -0700 (PDT) From: Svyatoslav Ryhel To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Svyatoslav Ryhel Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v6 3/6] dt-bindings: mfd: motorola-cpcap: convert to DT schema Date: Wed, 20 May 2026 21:21:21 +0300 Message-ID: <20260520182124.117863-4-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260520182124.117863-1-clamor95@gmail.com> References: <20260520182124.117863-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert devicetree bindings for the Motorola CPCAP MFD from TXT to YAML. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring (Arm) --- .../bindings/mfd/motorola,cpcap.yaml | 403 ++++++++++++++++++ .../bindings/mfd/motorola-cpcap.txt | 78 ---- 2 files changed, 403 insertions(+), 78 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/motorola,cpcap.ya= ml delete mode 100644 Documentation/devicetree/bindings/mfd/motorola-cpcap.txt diff --git a/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml b/Do= cumentation/devicetree/bindings/mfd/motorola,cpcap.yaml new file mode 100644 index 000000000000..76705ea56805 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml @@ -0,0 +1,403 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/motorola,cpcap.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Motorola CPCAP PMIC MFD + +maintainers: + - Svyatoslav Ryhel + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + items: + - const: motorola,cpcap + - const: st,6556002 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + spi-max-frequency: + maximum: 9600000 + + spi-cs-high: true + spi-cpol: true + spi-cpha: true + + adc: + $ref: /schemas/iio/adc/motorola,cpcap-adc.yaml# + + audio-codec: + type: object + additionalProperties: false + + properties: + interrupts: + items: + - description: headset detect interrupt + - description: microphone bias 2 detect interrupt + + interrupt-names: + items: + - const: hs + - const: mb2 + + "#sound-dai-cells": + const: 1 + + VAUDIO-supply: + description: + Codec power supply, usually VAUDIO regulator of CPCAP. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: port connected to the Stereo HiFi DAC + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: port connected to the Voice DAC + + required: + - port@0 + - port@1 + + required: + - interrupts + - interrupt-names + - "#sound-dai-cells" + + battery: + $ref: /schemas/power/supply/cpcap-battery.yaml# + + charger: + $ref: /schemas/power/supply/cpcap-charger.yaml# + + key-power: + $ref: /schemas/input/motorola,cpcap-pwrbutton.yaml# + + phy: + $ref: /schemas/phy/motorola,cpcap-usb-phy.yaml# + + regulator: + $ref: /schemas/regulator/motorola,cpcap-regulator.yaml# + + rtc: + $ref: /schemas/rtc/motorola,cpcap-rtc.yaml# + +patternProperties: + "^led(-[a-z]+)?$": + $ref: /schemas/leds/motorola,cpcap-leds.yaml# + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - "#interrupt-cells" + - spi-max-frequency + +additionalProperties: false + +examples: + - | + #include + #include + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + cpcap: pmic@0 { + compatible =3D "motorola,cpcap", "st,6556002"; + reg =3D <0>; /* cs0 */ + + interrupt-parent =3D <&gpio1>; + interrupts =3D <7 IRQ_TYPE_EDGE_RISING>; + + interrupt-controller; + #interrupt-cells =3D <2>; + + spi-max-frequency =3D <3000000>; + spi-cs-high; + + spi-cpol; + spi-cpha; + + cpcap_adc: adc { + compatible =3D "motorola,cpcap-adc"; + + interrupt-parent =3D <&cpcap>; + interrupts =3D <8 IRQ_TYPE_NONE>; + interrupt-names =3D "adcdone"; + + #io-channel-cells =3D <1>; + }; + + cpcap_audio: audio-codec { + interrupt-parent =3D <&cpcap>; + interrupts =3D <9 IRQ_TYPE_NONE>, <10 IRQ_TYPE_NONE>; + interrupt-names =3D "hs", "mb2"; + + VAUDIO-supply =3D <&vdd_audio>; + + #sound-dai-cells =3D <1>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + /* HiFi */ + port@0 { + reg =3D <0>; + + cpcap_audio_codec0: endpoint { + }; + }; + + /* Voice */ + port@1 { + reg =3D <1>; + + cpcap_audio_codec1: endpoint { + }; + }; + }; + }; + + cpcap_battery: battery { + compatible =3D "motorola,cpcap-battery"; + + interrupt-parent =3D <&cpcap>; + interrupts =3D <6 IRQ_TYPE_NONE>, <5 IRQ_TYPE_NONE>, + <3 IRQ_TYPE_NONE>, <20 IRQ_TYPE_NONE>, + <54 IRQ_TYPE_NONE>, <57 IRQ_TYPE_NONE>; + interrupt-names =3D "eol", "lowbph", "lowbpl", + "chrgcurr1", "battdetb", "cccal"; + + io-channels =3D <&cpcap_adc 0>, <&cpcap_adc 1>, + <&cpcap_adc 5>, <&cpcap_adc 6>; + io-channel-names =3D "battdetb", "battp", + "chg_isense", "batti"; + power-supplies =3D <&cpcap_charger>; + }; + + cpcap_charger: charger { + compatible =3D "motorola,mapphone-cpcap-charger"; + + interrupt-parent =3D <&cpcap>; + interrupts =3D <13 IRQ_TYPE_NONE>, <12 IRQ_TYPE_NONE>, + <29 IRQ_TYPE_NONE>, <28 IRQ_TYPE_NONE>, + <22 IRQ_TYPE_NONE>, <21 IRQ_TYPE_NONE>, + <20 IRQ_TYPE_NONE>, <19 IRQ_TYPE_NONE>, + <54 IRQ_TYPE_NONE>; + interrupt-names =3D "chrg_det", "rvrs_chrg", "chrg_se1b", + "se0conn", "rvrs_mode", "chrgcurr2", + "chrgcurr1", "vbusvld", "battdetb"; + + mode-gpios =3D <&gpio3 29 GPIO_ACTIVE_LOW>, + <&gpio3 23 GPIO_ACTIVE_LOW>; + + io-channels =3D <&cpcap_adc 0>, <&cpcap_adc 1>, + <&cpcap_adc 2>, <&cpcap_adc 5>, + <&cpcap_adc 6>; + io-channel-names =3D "battdetb", "battp", + "vbus", "chg_isense", + "batti"; + }; + + key-power { + compatible =3D "motorola,cpcap-pwrbutton"; + + interrupt-parent =3D <&cpcap>; + interrupts =3D <23 IRQ_TYPE_NONE>; + }; + + led-red { + compatible =3D "motorola,cpcap-led-red"; + vdd-supply =3D <&vdd_led>; + label =3D "status-led::red"; + }; + + led-green { + compatible =3D "motorola,cpcap-led-green"; + vdd-supply =3D <&vdd_led>; + label =3D "status-led::green"; + }; + + led-blue { + compatible =3D "motorola,cpcap-led-blue"; + vdd-supply =3D <&vdd_led>; + label =3D "status-led::blue"; + }; + + cpcap_usb2_phy: phy { + compatible =3D "motorola,cpcap-usb-phy"; + + pinctrl-0 =3D <&usb_gpio_mux_sel1>, <&usb_gpio_mux_sel2>; + pinctrl-1 =3D <&usb_ulpi_pins>; + pinctrl-2 =3D <&usb_utmi_pins>; + pinctrl-3 =3D <&uart3_pins>; + pinctrl-names =3D "default", "ulpi", "utmi", "uart"; + #phy-cells =3D <0>; + + interrupts-extended =3D + <&cpcap 15 IRQ_TYPE_NONE>, <&cpcap 14 IRQ_TYPE_NONE>, + <&cpcap 28 IRQ_TYPE_NONE>, <&cpcap 19 IRQ_TYPE_NONE>, + <&cpcap 18 IRQ_TYPE_NONE>, <&cpcap 17 IRQ_TYPE_NONE>, + <&cpcap 16 IRQ_TYPE_NONE>, <&cpcap 49 IRQ_TYPE_NONE>, + <&cpcap 48 IRQ_TYPE_NONE>; + interrupt-names =3D "id_ground", "id_float", "se0conn", + "vbusvld", "sessvld", "sessend", + "se1", "dm", "dp"; + + mode-gpios =3D <&gpio2 28 GPIO_ACTIVE_HIGH>, + <&gpio1 0 GPIO_ACTIVE_HIGH>; + + io-channels =3D <&cpcap_adc 2>, <&cpcap_adc 7>; + io-channel-names =3D "vbus", "id"; + + vusb-supply =3D <&avdd_usb>; + }; + + regulator { + compatible =3D "motorola,cpcap-regulator"; + + regulators { + vdd_cpu: SW1 { + regulator-name =3D "vdd_cpu"; + regulator-min-microvolt =3D <750000>; + regulator-max-microvolt =3D <1125000>; + regulator-enable-ramp-delay =3D <1500>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_core: SW2 { + regulator-name =3D "vdd_core"; + regulator-min-microvolt =3D <950000>; + regulator-max-microvolt =3D <1300000>; + regulator-enable-ramp-delay =3D <1500>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_1v8_vio: SW3 { + regulator-name =3D "vdd_1v8_vio"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-enable-ramp-delay =3D <0>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_aon: SW4 { + regulator-name =3D "vdd_aon"; + regulator-min-microvolt =3D <950000>; + regulator-max-microvolt =3D <1300000>; + regulator-enable-ramp-delay =3D <1500>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_led: SW5 { + regulator-name =3D "vdd_led"; + regulator-min-microvolt =3D <5050000>; + regulator-max-microvolt =3D <5050000>; + regulator-enable-ramp-delay =3D <1500>; + regulator-boot-on; + }; + + vdd_hvio: VHVIO { + regulator-name =3D "vdd_hvio"; + regulator-min-microvolt =3D <2775000>; + regulator-max-microvolt =3D <2775000>; + regulator-enable-ramp-delay =3D <1000>; + }; + + vcore_emmc: VSDIO { + regulator-name =3D "vcore_emmc"; + regulator-min-microvolt =3D <1500000>; + regulator-max-microvolt =3D <3000000>; + regulator-enable-ramp-delay =3D <1000>; + regulator-always-on; + regulator-boot-on; + }; + + avdd_dsi_csi: VCSI { + regulator-name =3D "avdd_dsi_csi"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <1200000>; + regulator-enable-ramp-delay =3D <1000>; + regulator-boot-on; + }; + + avdd_3v3_periph: VWLAN2 { + regulator-name =3D "avdd_3v3_periph"; + regulator-min-microvolt =3D <2775000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <1000>; + regulator-boot-on; + }; + + vddio_usd: VSIMCARD { + regulator-name =3D "vddio_usd"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <2900000>; + regulator-enable-ramp-delay =3D <1000>; + regulator-boot-on; + }; + + vdd_haptic: VVIB { + regulator-name =3D "vdd_haptic"; + regulator-min-microvolt =3D <1300000>; + regulator-max-microvolt =3D <3000000>; + regulator-enable-ramp-delay =3D <1000>; + }; + + avdd_usb: VUSB { + regulator-name =3D "avdd_usb"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <1000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_audio: VAUDIO { + regulator-name =3D "vdd_audio"; + regulator-min-microvolt =3D <2775000>; + regulator-max-microvolt =3D <2775000>; + regulator-enable-ramp-delay =3D <1000>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; + + cpcap_rtc: rtc { + compatible =3D "motorola,cpcap-rtc"; + + interrupt-parent =3D <&cpcap>; + interrupts =3D <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt b/Doc= umentation/devicetree/bindings/mfd/motorola-cpcap.txt deleted file mode 100644 index 18c3fc26ca93..000000000000 --- a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt +++ /dev/null @@ -1,78 +0,0 @@ -Motorola CPCAP PMIC device tree binding - -Required properties: -- compatible : One or both of "motorola,cpcap" or "ste,6556002" -- reg : SPI chip select -- interrupts : The interrupt line the device is connected to -- interrupt-controller : Marks the device node as an interrupt controller -- #interrupt-cells : The number of cells to describe an IRQ, should be 2 -- #address-cells : Child device offset number of cells, should be 1 -- #size-cells : Child device size number of cells, should be 0 -- spi-max-frequency : Typically set to 3000000 -- spi-cs-high : SPI chip select direction - -Optional subnodes: - -The sub-functions of CPCAP get their own node with their own compatible va= lues, -which are described in the following files: - -- Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml -- Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml -- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt -- Documentation/devicetree/bindings/phy/motorola,cpcap-usb-phy.yaml -- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt -- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt -- Documentation/devicetree/bindings/leds/leds-cpcap.txt -- Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml - -The only exception is the audio codec. Instead of a compatible value its -node must be named "audio-codec". - -Required properties for the audio-codec subnode: - -- #sound-dai-cells =3D <1>; -- interrupts : should contain jack detection interrupts, with headset - detect interrupt matching "hs" and microphone bias 2 - detect interrupt matching "mb2" in interrupt-names. -- interrupt-names : Contains "hs", "mb2" - -The audio-codec provides two DAIs. The first one is connected to the -Stereo HiFi DAC and the second one is connected to the Voice DAC. - -Example: - -&mcspi1 { - cpcap: pmic@0 { - compatible =3D "motorola,cpcap", "ste,6556002"; - reg =3D <0>; /* cs0 */ - interrupt-parent =3D <&gpio1>; - interrupts =3D <7 IRQ_TYPE_EDGE_RISING>; - interrupt-controller; - #interrupt-cells =3D <2>; - #address-cells =3D <1>; - #size-cells =3D <0>; - spi-max-frequency =3D <3000000>; - spi-cs-high; - - audio-codec { - #sound-dai-cells =3D <1>; - interrupts-extended =3D <&cpcap 9 0>, <&cpcap 10 0>; - interrupt-names =3D "hs", "mb2"; - - /* HiFi */ - port@0 { - endpoint { - remote-endpoint =3D <&cpu_dai1>; - }; - }; - - /* Voice */ - port@1 { - endpoint { - remote-endpoint =3D <&cpu_dai2>; - }; - }; - }; - }; -}; - --=20 2.51.0 From nobody Sun May 24 22:42:18 2026 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 75B5E3FCB10 for ; Wed, 20 May 2026 18:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301404; cv=none; b=qL5+EMVCXS7t6T/B6Me4XMuk4pp2prt8pNc3imuMYeLJa5CK2IqYNIGu7t7SdBK/yZtmGtqWvXQJxkb0l8a8DyyuvYsCpUrTjffr0tb36Ko+mkRT++iayqqntOBLVCk8aRFMWi/8iwGhKDBOvTqSbE7moKOTN/8Wa+7OxyieSi8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301404; c=relaxed/simple; bh=J4ST441g4GcL9Qf2m4E79qGEfDOnvVL9JwIy2R9JJ48=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bM93hQ9FFTbPOSZnxBSTLwpVLTvOBx/VnkOJyE3THNl3LcgRunsDyGI5OO3+KnGK+TSPBdbl4ZDGz53IqPxhsSrBhb9bXdji60IYoDccAIiWFWyWsFXggMTgeK+ClUgSNtoklFq/sy/rVwc7ONgHlBdEhOcl5EY74Yz90AWGU84= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=e6dEsgK9; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="e6dEsgK9" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-459bf19e87bso3177667f8f.1 for ; Wed, 20 May 2026 11:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779301401; x=1779906201; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ihKUarJUZQ4s5QQSEeZE4451TwDBF8kmyP9i/ksYTag=; b=e6dEsgK9ifn4czM4/OC+NfK2dCyeL3G6gI3yw6pMGcXfWMXFrk2ETn5lxP74AQLc06 bGMLvHU764GOjoja8mTipUNMWFqnF+y1GVQ7T6GB+KcW5TObXi3JW1vS6A7BqWnG+Twt QnQ0KOb3yy4ihkuo+61OvEZBUtSruf2/U/Bse4l59mftjUV+/wqF1CPVXtOgQIDjj6Mk VWcz5tbiclFmgXVXV43nS+jG4CYtbwca0d0LQDJfC0CoFcK1WTZPAyLXHCHGDsSggL17 LoJ0SmqyJwCYfIV2Qtvm/L7tFJwe/WtUTyJ3dtXUJk7C5sONQ4FadSGi6ztr8LJsccMr JIHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779301401; x=1779906201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ihKUarJUZQ4s5QQSEeZE4451TwDBF8kmyP9i/ksYTag=; b=GFcBePc5ktXR5CtZgrqdTBeMH7qHI8RNx+TPJBN4Ki2KkWAvB4Rm870yFBedDN6dMT b8981CGhhtEIPGm9hPkcKJ/ahsbo4wotKKc0SkthON3WspPaYZGupz6sq9awByE3qnO/ 4vDwgHtTMC0f+3Do7bL++lV8UEt9WXhLD71yQaYTVbYbXl3Bk2pnjYLIFZ747PbmYU3c S7qKvL1FXJ5K2id5EGZGvdL34Hl5WHt64cjiwrxFvEvqmBtEKvrAKP44AoLrnK3GGZPq QsPm1xF88j3hTTH2mnUvt2Bf8MKZhqRrbrYsK4n2XQeujKP3F2UT9X6/bRLOq1z3WOxr XfCg== X-Forwarded-Encrypted: i=1; AFNElJ/stkPLriQCAkF3lt+XPOC+KZNhd4o5SQLZVIRgqzHqhBVwxAeGe4muxWR1loe/AWA24Agl3utIMnzlqGE=@vger.kernel.org X-Gm-Message-State: AOJu0YxKZBZfbfd4okXQ1+vcU9OHAOcMzG21/RBsSJ0fmPGQetKeVeb6 U4IqTkEGpwD7zgWB84wVxkeVGnCPKp9KbzSPxnuT8toGW8eCjYaGN6ZUhRlcfg== X-Gm-Gg: Acq92OFZfZdXl0SZFmdXl1TfpAeubgPpebMAbXiLQ7rgV51dM7xX0D/4iksp58srCHp EZXRuy+miFHapqtC36DTGecEjZsEv8BGUDqvgQee09grjIDM4t12nzMz2QPgSqgJ6APh4g4yMIN 5liAWgXwlhBZnQmzyYo9Wg8gwrpjBssTtt8PgsLLNkKwH2Ly/Zjn6L8hIilOeP06gsFBCwUyREV plG7vaQo+9V1ZpmvA/YPBUcVRDHz0/0u+aJg5+nOftEmPRAwcODUC+/K16x5bfOyqbpOq7F+W+c +LbsLdCzpzIhaeWJPY3bIDkvNkqwnXTXgqgeTYuY0w13RnM0uPJkYqa2BECXV9jDFWEv3U7iy5J QDi3Cfj88UHc+I/GmTGq+Hv+nXgiIjGfridbt7cbmmVQnHgHPtueLkyVXfQaJ9gfS7eoGS2fSgF rkk4LLIBUwlZBxUrP9YSVwlmI= X-Received: by 2002:a05:6000:25c6:b0:454:a12c:6cdb with SMTP id ffacd0b85a97d-45e5c57d4bcmr41302298f8f.2.1779301400746; Wed, 20 May 2026 11:23:20 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm51297739f8f.11.2026.05.20.11.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 11:23:20 -0700 (PDT) From: Svyatoslav Ryhel To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Svyatoslav Ryhel Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v6 4/6] dt-bindings: mfd: motorola-cpcap: document Mapphone and Mot CPCAP Date: Wed, 20 May 2026 21:21:22 +0300 Message-ID: <20260520182124.117863-5-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260520182124.117863-1-clamor95@gmail.com> References: <20260520182124.117863-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add compatibles for Mapphone and Mot CPCAP subdevice compositions. Both variations cannot use st,6556002 fallback since they may be based on different controllers. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/mfd/motorola,cpcap.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml b/Do= cumentation/devicetree/bindings/mfd/motorola,cpcap.yaml index 76705ea56805..da7abe2ec912 100644 --- a/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml +++ b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml @@ -14,9 +14,14 @@ allOf: =20 properties: compatible: - items: - - const: motorola,cpcap - - const: st,6556002 + oneOf: + - enum: + - motorola,mapphone-cpcap + - motorola,mot-cpcap + + - items: + - const: motorola,cpcap + - const: st,6556002 =20 reg: maxItems: 1 --=20 2.51.0 From nobody Sun May 24 22:42:18 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 1A04B3FE348 for ; Wed, 20 May 2026 18:23:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301406; cv=none; b=u8qeGNlaGHsyyXdaZ4/zSpFQyNYmT4+O0ZT71JMFBZoZuzt5NOARirWYpZXyHOiIQx2zVltsvIOKM85USFawezKClAKGNcci05MzV3Kz4xG0G5ZFB3bMPtX3vXjxY0e+jVYcPpK0V9wz9o4ayqLl6m5rNzTe7Ydkip4SiA/aOL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301406; c=relaxed/simple; bh=RIfTQDHCQ2YqnNoaJ2ewpxoWS8B+PH190RGJwefZxN4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ilO/HCZg0iayq5VRUGwtko6Una6z+xCImO6nseczXofGvW0Z/WgCA+83+zltGSRQGTjrM+kj7RZDSj1dU2AgVnHFVn88jIimYTWKtdf1af8GB0z5BFqtWX6DZ6E1JHgM2XWEs2uZdM2oAx1ERM7URlaSLHa4pgPyb1GPlJ1Jx9U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=j7JDCgZW; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j7JDCgZW" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4893940bb5eso29239955e9.3 for ; Wed, 20 May 2026 11:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779301402; x=1779906202; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ODwRsMFDaNCx2SgXogkfXBT7irmxGG50JjasciSXEuM=; b=j7JDCgZWMbfezpZQSKIglKcmm6N0Vj7F73wRUMn9+KwyHHnIr2G2m/uvdyx6m0oBSr RBV5dOsAsbePTf0rjyP/Ur32qxrtKeeCMv2aGnuwFouHNptpt3AB+ITye5EQM7FPetki G7uP2Yfq0IgAqVVZ8e9Sd5RNXqwhmp424vYwgKFQh5AmSR9FHjRBFF4aSHkuX/tMgWhZ VxSQX6RxPnmswtGCXpM4YM8O5pajjKxWZGxHPy9Ht3MzWgdZZhTPvM8KhyLPWJ2iTEz/ dD53qRBGio+TD0YcZO0luX8R1BUkuQ06kU7lZCPneCRT7sqicimGeYWzumETl03svzc/ yX1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779301402; x=1779906202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ODwRsMFDaNCx2SgXogkfXBT7irmxGG50JjasciSXEuM=; b=blfkb6afAzSMMHZFAUKQHi399YRMht7SqDi4ixtS/qZC7IpY4zLbzWm1A7FdY76wWK yCU9Joia5kvGsHUQB77vnX68uXPkFSlUiISaBlkcyokcHOlJ+5jqEppOnGilup9IqeYC +141gcZjNQrmQThiHHaWH74sUFVNG7bGzlEFPnrPadVRUclwBJE6dFe7LCsBHfGj6zRd JI9HxYr5+2cQOBiUBuAtXQIp1oblGa0597xRFDbrN3RFCqLpt4W6AljlOoewrpOcP7KY rFyM3of7gpWBvr9LRKSg8A785Vw57Um5tkHF4al/Tkh4t1QASK3fHM6LskpG/QqDw0Gi a0gw== X-Forwarded-Encrypted: i=1; AFNElJ96vru9X9G0VHpwAPTWphKUD6FuLX0xQ8nUn1luruBxxs1ZNST+7pGHmoOZ7bKV1GE88j+UXxvO6s79TXI=@vger.kernel.org X-Gm-Message-State: AOJu0YzOtg1OXuXrHNCdLJqVRhiEIxSQQOsAi3juAX/j3o9SypBtFs/W iKUnNODBHVGcy89cG2W39iJiBZeXsZfxB+Y6yvbaOw80a3EYcmLYDMKS X-Gm-Gg: Acq92OFXaEUh3e3cY9NOPz6RLQ6u4acSxYz2zj+GG6gGe8gHPpX3medJHjq+rVbojR7 kBFheKnyUlezBCABPVuAelp1HZ/ysFxCOnt7wtTsyRae23dhU38RerEx4MuYlqy6UV+VLRXKc8S oUFcZVqScZOJK4CKccDs01vAQjmdC241La3EwYThbNTVqRwzWIIELciaBO2fgqm5ff466Sn4R6v s15fHKGg/psY3sBfvaP8UhYOJRFfKD3WzQt6nS/wj52s7YLLhLqNIlZsKrRBm6U0vAffV99z0iV xYL1nWxl5MiXo9cme61AtB9Jj+iXowYQOkO1W1T6g4lHJBXEa6iQmsvSem7dS5kOAx5TTBW3JRZ jKQtJkWqmPfq8HX8SKh67+5y1NMc8XCVRGs+yFuGDcPikSaiXFvmtCfwXN4C6qVnSC877cJ1qH7 s2+OBzF6FtZWWM X-Received: by 2002:a05:600c:1e24:b0:488:aa33:dcbd with SMTP id 5b1f17b1804b1-48fe63182a2mr389286225e9.26.1779301402152; Wed, 20 May 2026 11:23:22 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm51297739f8f.11.2026.05.20.11.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 11:23:21 -0700 (PDT) From: Svyatoslav Ryhel To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Svyatoslav Ryhel Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v6 5/6] mfd: motorola-cpcap: diverge configuration per-board Date: Wed, 20 May 2026 21:21:23 +0300 Message-ID: <20260520182124.117863-6-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260520182124.117863-1-clamor95@gmail.com> References: <20260520182124.117863-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" MFD have rigid subdevice structure which does not allow flexible dynamic subdevice linking. Address this by diverging CPCAP subdevice composition to take into account board specific configuration. Create a common and default subdevice composition, rename edit existing subdevice composition into cpcap_mapphone_devices since it targets mainly Mapphone board. Removed st,6556002 as it is no longer applicable to all cases and duplicates motorola,cpcap, which is used as the default composition. Signed-off-by: Svyatoslav Ryhel --- drivers/mfd/motorola-cpcap.c | 125 +++++++++++++++-------------- include/linux/mfd/motorola-cpcap.h | 6 ++ 2 files changed, 70 insertions(+), 61 deletions(-) diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index d8243b956f87..5b6ca6b81c23 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include =20 @@ -30,6 +31,7 @@ struct cpcap_ddata { struct regmap_irq_chip_data *irqdata[CPCAP_NR_IRQ_CHIPS]; const struct regmap_config *regmap_conf; struct regmap *regmap; + enum cpcap_variant variant; }; =20 static int cpcap_sense_irq(struct regmap *regmap, int irq) @@ -195,20 +197,6 @@ static int cpcap_init_irq(struct cpcap_ddata *cpcap) return 0; } =20 -static const struct of_device_id cpcap_of_match[] =3D { - { .compatible =3D "motorola,cpcap", }, - { .compatible =3D "st,6556002", }, - {}, -}; -MODULE_DEVICE_TABLE(of, cpcap_of_match); - -static const struct spi_device_id cpcap_spi_ids[] =3D { - { .name =3D "cpcap", }, - { .name =3D "6556002", }, - {}, -}; -MODULE_DEVICE_TABLE(spi, cpcap_spi_ids); - static const struct regmap_config cpcap_regmap_config =3D { .reg_bits =3D 16, .reg_stride =3D 4, @@ -241,62 +229,58 @@ static int cpcap_resume(struct device *dev) =20 static DEFINE_SIMPLE_DEV_PM_OPS(cpcap_pm, cpcap_suspend, cpcap_resume); =20 -static const struct mfd_cell cpcap_mfd_devices[] =3D { - { - .name =3D "cpcap_adc", - .of_compatible =3D "motorola,mapphone-cpcap-adc", - }, { - .name =3D "cpcap_battery", - .of_compatible =3D "motorola,cpcap-battery", - }, { - .name =3D "cpcap-charger", - .of_compatible =3D "motorola,mapphone-cpcap-charger", - }, { - .name =3D "cpcap-regulator", - .of_compatible =3D "motorola,mapphone-cpcap-regulator", - }, { - .name =3D "cpcap-rtc", - .of_compatible =3D "motorola,cpcap-rtc", - }, { - .name =3D "cpcap-pwrbutton", - .of_compatible =3D "motorola,cpcap-pwrbutton", - }, { - .name =3D "cpcap-usb-phy", - .of_compatible =3D "motorola,mapphone-cpcap-usb-phy", - }, { - .name =3D "cpcap-led", - .id =3D 0, - .of_compatible =3D "motorola,cpcap-led-red", - }, { - .name =3D "cpcap-led", - .id =3D 1, - .of_compatible =3D "motorola,cpcap-led-green", - }, { - .name =3D "cpcap-led", - .id =3D 2, - .of_compatible =3D "motorola,cpcap-led-blue", - }, { - .name =3D "cpcap-led", - .id =3D 3, - .of_compatible =3D "motorola,cpcap-led-adl", - }, { - .name =3D "cpcap-led", - .id =3D 4, - .of_compatible =3D "motorola,cpcap-led-cp", - }, { - .name =3D "cpcap-codec", - } +static const struct mfd_cell cpcap_common_devices[] =3D { + MFD_CELL_OF("cpcap_battery", NULL, NULL, 0, 0, "motorola,cpcap-battery"), + MFD_CELL_OF("cpcap-rtc", NULL, NULL, 0, 0, "motorola,cpcap-rtc"), + MFD_CELL_OF("cpcap-pwrbutton", NULL, NULL, 0, 0, "motorola,cpcap-pwrbutto= n"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 0, "motorola,cpcap-led-red"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 1, "motorola,cpcap-led-green"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 2, "motorola,cpcap-led-blue"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 3, "motorola,cpcap-led-adl"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 4, "motorola,cpcap-led-cp"), + MFD_CELL_NAME("cpcap-codec"), +}; + +static const struct mfd_cell cpcap_default_devices[] =3D { + MFD_CELL_OF("cpcap_adc", NULL, NULL, 0, 0, "motorola,cpcap-adc"), + MFD_CELL_OF("cpcap-regulator", NULL, NULL, 0, 0, "motorola,cpcap-regulato= r"), + MFD_CELL_OF("cpcap-usb-phy", NULL, NULL, 0, 0, "motorola,cpcap-usb-phy"), +}; + +static const struct mfd_cell cpcap_mapphone_devices[] =3D { + MFD_CELL_OF("cpcap_adc", NULL, NULL, 0, 0, "motorola,mapphone-cpcap-adc"), + MFD_CELL_OF("cpcap-charger", NULL, NULL, 0, 0, "motorola,mapphone-cpcap-c= harger"), + MFD_CELL_OF("cpcap-regulator", NULL, NULL, 0, 0, "motorola,mapphone-cpcap= -regulator"), + MFD_CELL_OF("cpcap-usb-phy", NULL, NULL, 0, 0, "motorola,mapphone-cpcap-u= sb-phy"), }; =20 static int cpcap_probe(struct spi_device *spi) { struct cpcap_ddata *cpcap; + const struct mfd_cell *cells; + unsigned int num_cells; int ret; =20 cpcap =3D devm_kzalloc(&spi->dev, sizeof(*cpcap), GFP_KERNEL); if (!cpcap) return -ENOMEM; =20 + cpcap->variant =3D (enum cpcap_variant)spi_get_device_match_data(spi); + + switch (cpcap->variant) { + case CPCAP_DEFAULT: + cells =3D cpcap_default_devices; + num_cells =3D ARRAY_SIZE(cpcap_default_devices); + break; + case CPCAP_MAPPHONE: + cells =3D cpcap_mapphone_devices; + num_cells =3D ARRAY_SIZE(cpcap_mapphone_devices); + break; + default: + return dev_err_probe(&spi->dev, -ENODEV, + "Unknown device %d\n", cpcap->variant); + } + cpcap->spi =3D spi; spi_set_drvdata(spi, cpcap); =20 @@ -331,10 +315,29 @@ static int cpcap_probe(struct spi_device *spi) spi->dev.coherent_dma_mask =3D 0; spi->dev.dma_mask =3D &spi->dev.coherent_dma_mask; =20 - return devm_mfd_add_devices(&spi->dev, 0, cpcap_mfd_devices, - ARRAY_SIZE(cpcap_mfd_devices), NULL, 0, NULL); + ret =3D devm_mfd_add_devices(&spi->dev, 0, cpcap_common_devices, + ARRAY_SIZE(cpcap_common_devices), NULL, 0, NULL); + if (ret) + return dev_err_probe(&spi->dev, ret, + "Failed to add common child devices\n"); + + return devm_mfd_add_devices(&spi->dev, 0, cells, num_cells, NULL, 0, NULL= ); } =20 +static const struct of_device_id cpcap_of_match[] =3D { + { .compatible =3D "motorola,cpcap", .data =3D (void *)CPCAP_DEFAULT }, + { .compatible =3D "motorola,mapphone-cpcap", .data =3D (void *)CPCAP_MAPP= HONE }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, cpcap_of_match); + +static const struct spi_device_id cpcap_spi_ids[] =3D { + { "cpcap", CPCAP_DEFAULT }, + { "mapphone-cpcap", CPCAP_MAPPHONE }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(spi, cpcap_spi_ids); + static struct spi_driver cpcap_driver =3D { .driver =3D { .name =3D "cpcap-core", diff --git a/include/linux/mfd/motorola-cpcap.h b/include/linux/mfd/motorol= a-cpcap.h index 981e5777deb7..1a85b06272c8 100644 --- a/include/linux/mfd/motorola-cpcap.h +++ b/include/linux/mfd/motorola-cpcap.h @@ -25,6 +25,12 @@ #define CPCAP_REVISION_2_0 0x10 #define CPCAP_REVISION_2_1 0x11 =20 +enum cpcap_variant { + CPCAP_DEFAULT =3D 1, + CPCAP_MAPPHONE, + CPCAP_MAX +}; + /* CPCAP registers */ #define CPCAP_REG_INT1 0x0000 /* Interrupt 1 */ #define CPCAP_REG_INT2 0x0004 /* Interrupt 2 */ --=20 2.51.0 From nobody Sun May 24 22:42:18 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 3ECD63FE37B for ; Wed, 20 May 2026 18:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301407; cv=none; b=AvcAMdxbnJGb/kOhj7/yWY1jhjXVfMah7cK2kH+gcUlm0Yo0xh0QrKzoOdx61IpA7exXAg0T8jmfN+4xtuGR/KxX489v5F7hGwb4vKK6y9V0Q5Kn4K/G6EWzQ9ceJ0S8ucAu1ZsTOSIJL83vVFG1+/Zsu64pgc9h2z5x6YMw0XE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301407; c=relaxed/simple; bh=OyZE0FTSId5Xw2BLHh/qgzyUvjlvhM+aMzq4+ikPxSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p28yABWHmmilR9wiouB9k5tGkLnzZGLTSo1hfQ0gjHhEab96vsaqlMLmW6wObW01kNZHJlwlwqQHeZ203Mkve4nKl0ppnJf134SFkwe2gRQgHrcPqg4bNehnO+OUBCYlWly2KMRPIZ7ybajLaLKcENcS83tpe4PKOLF2r5e7yzs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jsaKqcYs; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jsaKqcYs" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48909558b3aso54556075e9.0 for ; Wed, 20 May 2026 11:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779301403; x=1779906203; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vaU/m8RkZFKacQOirk2OKWVZO3CMn2gzTIkZTYwhda4=; b=jsaKqcYsz39jWnosGbzDD6+Pimi7MmfIseiAUAM7qhNK/iYBOfXDrbDSaNvazmSOVi Myhir/H2zsaA1UYQsqNmBXfEi2P1z0siThGMHxl5ILyTpYDzmFKbUIPPHJbg1danS4n9 WUL5VSeO7d7HfEzlK7FSDOAHNrQfDEVfZL4UXN1hVdIMSA7+jl0/D1GKExMHaqGJq+xy SlfbaInZ764mIvSFA4E52H1Nh0E0dVIWu5M/4Vr8bBstoRKYsTIqUMNt6Sz+0sd3oa9i d5ogimLhY3tOQkuEv+XaYeVvIWJlYpT6A+DHoCqz6EoLzR17tGg3miMXbAKxL8UTGg+o CHQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779301403; x=1779906203; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=vaU/m8RkZFKacQOirk2OKWVZO3CMn2gzTIkZTYwhda4=; b=OzctXsSQWxD7UNBj01i7cxK09XKeJKDYV53X3Zd3Hc9cpKQLWw8+AsC3eC2eoij2vK N26p2Q80glEQHuSl/asiC2kiQG00ncCXEf8DLtJzY2vCue76C5iNYzyMn3zQAg09KZ2F Ey3Rn5tPwOwKbx6UAhbdcQYc6nCbFp8o8or0777abA6NhT2G4xbPLb2YqqnSsUs6ORH8 ESw4WQOrpKlzV324CnM7UMW2Km6aE/th2o/DPiEWcU/16ZJEvqmka4pfMsjsZvbfYMvU mAArZee9wlItKkFURxwtngiinIDI899h95FPJLab7l7zpNa2NO646ldtc20wl50LiRMn 4Iig== X-Forwarded-Encrypted: i=1; AFNElJ+7hwpXM8Y3ZzY85gZwMf0WjHsKJg6xUs6sBFbjRmy3jOLq3adQYcL1pJqsYfX0ijqAGp4AuQtDJ7bJ3OY=@vger.kernel.org X-Gm-Message-State: AOJu0YzdAnqtNZJSos8CJTEW6vvc7TFpLx1hpNGTs3He7sCErpZ34iis JLZivKAXGa/WKsYPHdKnDFRA3kNNt5TUVaR0dXynVgR7CxuPo6NTU/Om X-Gm-Gg: Acq92OEylJ7eGZJzSDFNcIFSgtcIZnrSYSejjCjZI6MUHLqd4YdkyUtZSJfPKjMLXRf zQ8ypHgXE3q1NohupzWsCJv9Wo4ec9WnOXyVAi5Nse47J3PpsUNIh2ncaXyaKTnvRmcZhMUcupr BZk8e7R//JAxJgzLeakgU7Yur6V/9e19S2ieBAhaantPydZ62gXkreJIIUUH3iBUj1xrRX/lCNC V19glnmEMHzg5tI6EnYUxpF7l2pxiElzkUF+mt4vylHoFaiXWYYGQGBfy2XQUMiKrI43Fj7yMSY ae3lUEooLdzCQ8Fq5xpNQIHVi0pvPERYx6vlHyJuBFwkbOCqQUZknAPPAQZ47EWjs/YSC8paEzx n06c/8Y8x1H9AyZUNRS4Qc3CNzpS9AMadGDMC29HnxEA3mws8SL+DJKM5zEzQUDCsIdGBVXmHYY UpEGTCXcr7AmOtYneXcBbZpDWe8fH7oZDu2w== X-Received: by 2002:a05:600c:6383:b0:488:c014:34da with SMTP id 5b1f17b1804b1-48fe651690fmr390912175e9.26.1779301403428; Wed, 20 May 2026 11:23:23 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm51297739f8f.11.2026.05.20.11.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 11:23:23 -0700 (PDT) From: Svyatoslav Ryhel To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Svyatoslav Ryhel Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v6 6/6] mfd: motorola-cpcap: add support for Mot CPCAP composition Date: Wed, 20 May 2026 21:21:24 +0300 Message-ID: <20260520182124.117863-7-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260520182124.117863-1-clamor95@gmail.com> References: <20260520182124.117863-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a MFD subdevice composition used in Tegra20 based Mot board (Motorola Atrix 4G and Droid X2). Signed-off-by: Svyatoslav Ryhel --- drivers/mfd/motorola-cpcap.c | 20 +++++++++++++++++++- include/linux/mfd/motorola-cpcap.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index 5b6ca6b81c23..f6198276d266 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -237,7 +237,6 @@ static const struct mfd_cell cpcap_common_devices[] =3D= { MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 1, "motorola,cpcap-led-green"), MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 2, "motorola,cpcap-led-blue"), MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 3, "motorola,cpcap-led-adl"), - MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 4, "motorola,cpcap-led-cp"), MFD_CELL_NAME("cpcap-codec"), }; =20 @@ -245,6 +244,7 @@ static const struct mfd_cell cpcap_default_devices[] = =3D { MFD_CELL_OF("cpcap_adc", NULL, NULL, 0, 0, "motorola,cpcap-adc"), MFD_CELL_OF("cpcap-regulator", NULL, NULL, 0, 0, "motorola,cpcap-regulato= r"), MFD_CELL_OF("cpcap-usb-phy", NULL, NULL, 0, 0, "motorola,cpcap-usb-phy"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 4, "motorola,cpcap-led-cp"), }; =20 static const struct mfd_cell cpcap_mapphone_devices[] =3D { @@ -252,6 +252,18 @@ static const struct mfd_cell cpcap_mapphone_devices[] = =3D { MFD_CELL_OF("cpcap-charger", NULL, NULL, 0, 0, "motorola,mapphone-cpcap-c= harger"), MFD_CELL_OF("cpcap-regulator", NULL, NULL, 0, 0, "motorola,mapphone-cpcap= -regulator"), MFD_CELL_OF("cpcap-usb-phy", NULL, NULL, 0, 0, "motorola,mapphone-cpcap-u= sb-phy"), + MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 4, "motorola,cpcap-led-cp"), +}; + +/* + * The Mot board features a USB-PHY and charger similar to the ones in + * Mapphone; however, because Mot is based on Tegra20, it is incompatible + * with the existing implementation, which is tightly interconnected with + * the OMAP USB PHY. + */ +static const struct mfd_cell cpcap_mot_devices[] =3D { + MFD_CELL_OF("cpcap_adc", NULL, NULL, 0, 0, "motorola,mot-cpcap-adc"), + MFD_CELL_OF("cpcap-regulator", NULL, NULL, 0, 0, "motorola,mot-cpcap-regu= lator"), }; =20 static int cpcap_probe(struct spi_device *spi) @@ -276,6 +288,10 @@ static int cpcap_probe(struct spi_device *spi) cells =3D cpcap_mapphone_devices; num_cells =3D ARRAY_SIZE(cpcap_mapphone_devices); break; + case CPCAP_MOT: + cells =3D cpcap_mot_devices; + num_cells =3D ARRAY_SIZE(cpcap_mot_devices); + break; default: return dev_err_probe(&spi->dev, -ENODEV, "Unknown device %d\n", cpcap->variant); @@ -327,6 +343,7 @@ static int cpcap_probe(struct spi_device *spi) static const struct of_device_id cpcap_of_match[] =3D { { .compatible =3D "motorola,cpcap", .data =3D (void *)CPCAP_DEFAULT }, { .compatible =3D "motorola,mapphone-cpcap", .data =3D (void *)CPCAP_MAPP= HONE }, + { .compatible =3D "motorola,mot-cpcap", .data =3D (void *)CPCAP_MOT }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, cpcap_of_match); @@ -334,6 +351,7 @@ MODULE_DEVICE_TABLE(of, cpcap_of_match); static const struct spi_device_id cpcap_spi_ids[] =3D { { "cpcap", CPCAP_DEFAULT }, { "mapphone-cpcap", CPCAP_MAPPHONE }, + { "mot-cpcap", CPCAP_MOT }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(spi, cpcap_spi_ids); diff --git a/include/linux/mfd/motorola-cpcap.h b/include/linux/mfd/motorol= a-cpcap.h index 1a85b06272c8..bb23363eeccd 100644 --- a/include/linux/mfd/motorola-cpcap.h +++ b/include/linux/mfd/motorola-cpcap.h @@ -28,6 +28,7 @@ enum cpcap_variant { CPCAP_DEFAULT =3D 1, CPCAP_MAPPHONE, + CPCAP_MOT, CPCAP_MAX }; =20 --=20 2.51.0