Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp504764lqp; Thu, 21 Mar 2024 07:39:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXk1h+O0d9BmxbBs2Ey3wkPz5UdBAg7HeMi3n+S1L8dRIioUMVMkILvU1IQfVnNFOXq46WiCPib3m/Fj3q5OsH73Fc4YFqdAKYSzTM7Ng== X-Google-Smtp-Source: AGHT+IFDLpER7UIMOYPIuQmY7wTiAnwf8WKYvUPHuJIMFqYzhcycU6NmWQQQKtMRJerrJMlDFIsG X-Received: by 2002:a05:6214:d47:b0:696:4754:5fa8 with SMTP id 7-20020a0562140d4700b0069647545fa8mr4263080qvr.17.1711031983129; Thu, 21 Mar 2024 07:39:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711031983; cv=pass; d=google.com; s=arc-20160816; b=BTfJE2UkNQ1qE707Gau8EM+uSa7wjgo+6HqaUz0lb6fpS3egxpCf0X3LNKwWoc7cnP ItpPkdnxmJ/L3dhXKhD6tx9eJ5ekQbpAHfjdI/F5xiHdFVRUfhvQV+I67yVdbp0NvzeU /jj5ELGK5qfRZxkCu6UDvTWdSElhZWVBjZquCQB8Opu8a15ovS/w52DhDXEcvKaokgBQ 9a3k6crB8iAXq4rYgvQoVnZ3QCUxP9ZhrrpEFClu32FSGL9uDIOkjsjqA1W6UHvKSGOR +ti4EqqxBAZd8A/MgFeLOwWu533IHcoD8mOCyK3Y0W2+PGGXANDRntBdDd/Cw9nFpTud KUCw== ARC-Message-Signature: i=2; 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=8qXITx5mQ/vCXW+D4l5s0fzydZH5TzXg2O0bB4XMDMU=; fh=YyMQlx5ZK57tac5deIo76tENJeGZcLQ26Xtv1dcrE5w=; b=s5iVjx8VrNQ2u7RWmpXjGk2/p+ZQMwu4ykKWleCj7H33FTAztcMEcwNIhs3TFngI8u NPJZ8UTQFFjwF1maOLb7dM8qpTKk+UF4DX2liwqL/B1L9PbmugQT0x7LD2L0vmhQiIiG +99TwRanTY4VeNoD8acuLQFKOX5E7CBgLj6VhgDBwJF+ngoLXJwmjDjUHYED8sar8iwN WnajQqyHQMeb40LLrcLHyKEmOoeSIrZobSsq1sFbraTQy2XgKloQIw6dMkcvco0JMApI rECCZANTwnOJO9fMeKXQV9MlrRRsl137kDthmGJGmcJwl5k/h+ishfi0po4OnKCIsW88 y6wA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ITXQpA7x; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-110157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e14-20020a0562141d0e00b0069019d3b4fasi15496512qvd.580.2024.03.21.07.39.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 07:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110157-linux.lists.archive=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=@gmail.com header.s=20230601 header.b=ITXQpA7x; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-110157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D87141C215E8 for ; Thu, 21 Mar 2024 14:39:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB18A8527D; Thu, 21 Mar 2024 14:39:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ITXQpA7x" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.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 4B73FA947; Thu, 21 Mar 2024 14:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711031973; cv=none; b=Mo/sTb1+giAWOwNwnxVaYN1JMR7m3Tnom6De0avLFz7IK4dV+j9bB5BbNl7+nyhr6GyzvMygIK6Rwstbq9AVnbolCckaVpda4CSrA+XeaBksjcbd/AuE5rd4Ox9Nx5l2fyKQS+m26S3yDo1JcEx0Hp45aqD3xYTdBZ4biRAE2r8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711031973; c=relaxed/simple; bh=ooTH7gf09au326sfah1yiJQCIw1o/Ntkez2jlP3EqUA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EJGVyHly0EepaLUepJ89IdDxY6j80giMuCnBkL+11VX8cx+vJerG8ubtCdyFc87y+V8EF7oFi3RE9p+aF2DoS91GgTXpMIBL/oR3TKb0M8xyyU+S77DaLhDgv2HdmaauZqr/RLdzd5Ttj5Liz7sDYYAU5sYEob06m+LnNFFTiSs= 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=ITXQpA7x; arc=none smtp.client-ip=209.85.208.49 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 Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so1495840a12.0; Thu, 21 Mar 2024 07:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711031969; x=1711636769; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8qXITx5mQ/vCXW+D4l5s0fzydZH5TzXg2O0bB4XMDMU=; b=ITXQpA7x3fVvybree77k+XRpSFldQGJ5ntNXV26xMW8DBqcEjhWabb3hAuERd1KLNR 8YlmwCLub6VY+V9JO7bvA/Ac1JHylKqxPKWub3wc56r/pwZRFCR6tb3Syq/sltA6XcL5 13ZuMkuyt8E5tJ+mnNhjyKQkVwC86ouAJojNMDpilpPlNeiov1nU+mTu9tT+3A2aJMGW 7l0z9tWIIbFCVvJNKcieb7+U6LwEmS1ZsxA0pfagsij13bwjaQ2UexEXspLz8JN63ery HAHgxQyNrtK7Jxo75fvtj5jLM+QBqMwyTxz9sk0/o5eHnScz61nWX/qyz9i2XlITUX8V 9xFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711031969; x=1711636769; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8qXITx5mQ/vCXW+D4l5s0fzydZH5TzXg2O0bB4XMDMU=; b=sBUuZICYCC3fVS8z3iHrhf8eiLFnir88UQ7wvye28LwqRMOkr7fPhcaI1frRGfb/oP T0R4WBSJUi8gGq+JkFcPOsCKPGO0RCN06J7ez+09lkCne2Fjhd6enGoznOyyJa+wCaaQ f7a2lTVC/Mu9hDb2FF86NjCKqlXa88wuixZGiHHnuVLeCNZpOHnsmhaRVfAkNz1Fc1vD LJfDHBgihZVXvuIZJkqLKQBoZCF/7porlyNrkb60vhbJufVYDmvXcuqGfcql1zKzvddm vxfFL0+GaXsmcXsEHRdGPHBVCHkenJ9uslqkP+geuhcHu+xyEJjIupwYV5YGOaLFt/lC F94Q== X-Forwarded-Encrypted: i=1; AJvYcCVI+/VKwlh//uIv9p2JsPAgPxpTq//ikDT+5STEWfXnxgjjzJnYLuUfd+oiJWmAzDpggZzQ+5hDH8mMPSQjqx924O5z4sN8u5dGK+x9/Jzu1F3xLAwOXalrL45X6yJ962sXSx3Ex4RiGmaus1W12QKBRzDPiYeCs1/B2GfcZnDceTs4/vw= X-Gm-Message-State: AOJu0YxXpxSHSPh/burmVQZNg08nht1zOqL2XbJTli8iO0FLUUu3sBzh +N+dCVCHgp1tlc2FWjaIhFNheuAliKxaoVUa1sp+wkDBMj7kyqYD5fMFaqc= X-Received: by 2002:a17:906:f757:b0:a46:fb17:8871 with SMTP id jp23-20020a170906f75700b00a46fb178871mr3147904ejb.76.1711031969400; Thu, 21 Mar 2024 07:39:29 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:b39:dab4:8e20:e918]) by smtp.gmail.com with ESMTPSA id e3-20020a170906248300b00a46abaeeb1csm6147923ejb.104.2024.03.21.07.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 07:39:29 -0700 (PDT) From: Alex Bee To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Linus Walleij , Liam Girdwood , Mark Brown Cc: Chris Zhong , Zhang Qing , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Alex Bee Subject: [PATCH 0/5] Add RK816 PMIC support Date: Thu, 21 Mar 2024 15:39:07 +0100 Message-ID: <20240321143911.90210-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series aims to add support for Rockchip RK816 PMIC series. As per datasheet it's targeted for RK3126/RK3128 (RK816-1), RK1108 (RK816-2) and PX3-SE (RK816-3) but might be used for other SoCs as well. The mfd consists of an integrated RTC, a GPIO controller, two 32k clock outputs, a power key (output), 4 buck- and 5 ldo regulators, 3 regulator-switches, and charger with integrated fuel gauge. Charger and fuel gauge are not part of this series. Two of the switches (otg/boost) are part of the binding, but not of the driver. They must only ever by enabled if no battery charging is happening, but it will be enabled automatically if a battery is attached. Thus they need some incorporation of a yet to be added charger driver. Integration in the existing rk8xx-infrastructure was pretty straightforward and only needed very little tweaking. In order to not further bloat the driver(s) too much with additional definitions I tried to re-use existing ones wherever possible. The patches are loosely based on the vendor's implementation, verified against the datasheet and tested/measured on RK3126 board. As they are touching several subsystems I'm sending them (very) early for the 6.10-cycle. Alex Bee (5): dt-bindings: mfd: Add rk816 binding mfd: rk8xx: Add RK816 support pinctrl: rk805: Add rk816 pinctrl support regulator: rk808: Support apply_bit for rk808_set_suspend_voltage_range regulator: rk808: Add RK816 support .../bindings/mfd/rockchip,rk816.yaml | 259 ++++++++++++++++++ drivers/mfd/Kconfig | 4 +- drivers/mfd/rk8xx-core.c | 103 +++++++ drivers/mfd/rk8xx-i2c.c | 45 ++- drivers/pinctrl/pinctrl-rk805.c | 68 +++++ drivers/regulator/rk808-regulator.c | 218 ++++++++++++++- include/linux/mfd/rk808.h | 141 ++++++++++ 7 files changed, 831 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml -- 2.43.2