From patchwork Sun Dec 17 13:16:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 18195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp704277dyi; Sun, 17 Dec 2023 05:30:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFj0mGTgimBGPoVzHTccnr5CFQKoSChM7fRKAus9A+4MSvH8ZiouTKVmezuArAGkb5B/6bp X-Received: by 2002:ad4:5ce8:0:b0:67f:135e:17ff with SMTP id iv8-20020ad45ce8000000b0067f135e17ffmr7717285qvb.45.1702819830558; Sun, 17 Dec 2023 05:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702819830; cv=none; d=google.com; s=arc-20160816; b=sPVhesrMn/aH/02yF7c+g0Ui/yeFgpRTNPIR8FoDRzBaCYS/dAfTxrdQLjJ8HbJAep 8X/nW4HuF3jXCR8kjrN4LmIrPRfQFv/NZ5yj+pzrA0UKq5sCR0CxIhNZ3uLzoIfkd2vy S9L04TpH8nTw2wxQwliCrDM/IxEdIkvMj0/SQ/Y4blMBpoQN45prXdMJZxTdh/OE56XM bjP4j5meIRh4vZRnO4wknsq+ynQAtfgrvKPLyC97yjKb41xhT0AmdrpZ+UdVeM5fus5W Kq3IN4pQ897xHzIrHzDYmhTonMIyyE91J/5IJlig/wj4R+fIjQTLSqIMX37/SIcZNRtq 6sXA== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=mcphuoLJD5YV2j+1XZvlO20/5rV+jn37j0Ofr9Ge1UA=; fh=byZQJBCQWs0FCWKszxE7A5Om/MlZEW9RXICqsSfEzlA=; b=er8ztIEXbGQy0VX5PWTrmGJErziL4zVyOHen65M3zYusPhqFEpG98kh/NWWtzWhZrf H3/XN6I/uvCTKMvoLu/B2Yvc7YaPalpg+WHMBR9PITc2Cd7mIQx+bbUAkEolG8JWQUr4 tWn0lIoLuud27m0razDcIMBtHssS/aKCnoLS9UWzMvyyBPb6V13cKL7TSNfUXZg8xq3D KK3Hv5eSKQEOVfERLAJOm7jka76mOMbU3YGAHysrWUZY7i6M0101/BG5UEUAuEgvLGNY 5PPL3N1OB1MpUw3lg/jtiQsUZVsMDZ13gSf3ZN5LgJ9ITjoUw4gMoi5UUqosBbTZoBZF dViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b="D1/q7tLg"; spf=pass (google.com: domain of linux-kernel+bounces-2611-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2611-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s18-20020a05620a255200b0077f0313e0f4si15403064qko.419.2023.12.17.05.30.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 05:30:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2611-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=@gimli.ms.mff.cuni.cz header.s=gen1 header.b="D1/q7tLg"; spf=pass (google.com: domain of linux-kernel+bounces-2611-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2611-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 404101C210F7 for ; Sun, 17 Dec 2023 13:30:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 502DD44399; Sun, 17 Dec 2023 13:30:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="D1/q7tLg" X-Original-To: linux-kernel@vger.kernel.org Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 10C3544379; Sun, 17 Dec 2023 13:30:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 63C3028C341; Sun, 17 Dec 2023 14:19:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1702819199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mcphuoLJD5YV2j+1XZvlO20/5rV+jn37j0Ofr9Ge1UA=; b=D1/q7tLg4K1YnC/lDT8haKfDphMurp5pRh6ZlLYOOTukl/xGHTyxCyvlil5E5dbzMT8EHt up0LLf03CXEkb6sAp19Oa+S9mT+AbVlqHVjpI8+tnxS+TYlWTmEbLt4hu9ZGPf3g4gZeT5 dRRGQAuFz2GqxTk7N2ZSyvuzjpasmqQ= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 3A39B44AF99; Sun, 17 Dec 2023 14:19:59 +0100 (CET) From: Karel Balej To: Karel Balej , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [RFC PATCH 0/5] support for Marvell 88PM886 PMIC Date: Sun, 17 Dec 2023 14:16:58 +0100 Message-ID: <20231217131838.7569-1-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785536006805840964 X-GMAIL-MSGID: 1785536006805840964 From: Karel Balej Hello, the following implements basic support for Marvell's 88PM886 PMIC which is found for instance as a component of the samsung,coreprimevelte smartphone which inspired this and also serves as a testing platform. The code for the MFD is based primarily on this old series [1] with the addition of poweroff based on the smartphone's downstream kernel tree [2]. The onkey driver is based on the latter. I am not in possesion of the datasheet. The vendor version of this driver includes support for a similar chip: 88PM880. While that is not included here it was written with it in mind and it should be quite straighforward to add it. [1] https://lore.kernel.org/all/1434098601-3498-1-git-send-email-yizhang@marvell.com/ [2] https://github.com/CoderCharmander/g361f-kernel Thank you and kind regards, K. B. Karel Balej (5): dt-bindings: mfd: add entry for the Marvell 88PM88X PMICs mfd: add 88pm88x driver dt-bindings: input: add entry for 88pm88x-onkey input: add onkey driver for Marvell 88PM88X PMICs MAINTAINERS: add myself for Marvell 88PM88X PMICs .../bindings/input/marvell,88pm88x-onkey.yaml | 30 +++ .../bindings/mfd/marvell,88pm88x.yaml | 59 ++++++ MAINTAINERS | 9 + drivers/input/misc/88pm88x-onkey.c | 103 +++++++++ drivers/input/misc/Kconfig | 10 + drivers/input/misc/Makefile | 1 + drivers/mfd/88pm88x.c | 199 ++++++++++++++++++ drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 1 + include/linux/mfd/88pm88x.h | 60 ++++++ 10 files changed, 483 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/marvell,88pm88x-onkey.yaml create mode 100644 Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml create mode 100644 drivers/input/misc/88pm88x-onkey.c create mode 100644 drivers/mfd/88pm88x.c create mode 100644 include/linux/mfd/88pm88x.h