Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp77135lqb; Tue, 16 Apr 2024 09:13:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVVszZBT4+vAbeImyEDjRFmHPNRrhHdoWc9dYHTXu8kTb2j/ZgBDgH/XARS8EuBHr4rrpBg9qesGFIw5rmaklHJpz0zTIdsDXeBgWvfw== X-Google-Smtp-Source: AGHT+IE2qy4duxdeZjM5d8Le/pcUD7CwIBzaG8zHH1TQ2P8TPIY6fUgHx3O91qDpj3L5bnlXgc05 X-Received: by 2002:a17:907:7d8d:b0:a51:f46a:b000 with SMTP id oz13-20020a1709077d8d00b00a51f46ab000mr3631145ejc.20.1713283984366; Tue, 16 Apr 2024 09:13:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713283984; cv=pass; d=google.com; s=arc-20160816; b=KkGhPzT2n0wnkgC+5OCrq9490xwjMZj6vaX9F6rgbLHUHeYx0jyRxQI3A9Bn6oAaTE e9j8/i1PHq1DQKEfpqmrzTW5xfZU30prUxj6nOrZky8EnHSVcQnIJXr8uurug8dHyqGN 4IJPMQ0KY5Z7Yrbrq2Zobf5m/s7O7aOjZ3Pnki9h8UVezQIJs8UVRLv2OxGHapqyU0LB afNm015Q+jqv3ILruimcU2Nf5azXIVuQoiUmXL80R1NCjz4tRh7PE1+bnrJIi4yfuzu8 yy3K8kI5WBRoyGze5MtFQXU5/XSYFdRpw83+cnoP9M8so/9YRG1QSnkmPeVmW3Hru3fg JmjQ== 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=lE0iIAKwN26IHZrOzJQ+UkxUYWi8S6bm+npmiEEpfoU=; fh=J74c9YOSNTlwyYnUkrYvH/jiuatdMDggIqYArFbqu5U=; b=X6dSw7A0ECs3hIUwqBpo2OtNfqbM4wzRm6o73GMbdmpXObWohtPJy8x5OnA5xVSK2i uVBgu76VUWJsz7n2aqENXUeZYzDRgaSJV+PVOJAKRVDf8jYs2x5e0sv3/2M2a/P1h3aB clF2l8tySQoejGs+LPDkU1vFaPJ7fh+YlFtdZj01cyutHKgJJc6I6wtW9ZT+ChoJ0Kp0 abcLblbjAFobwr76WuwRy8Ap6kpFw1tVVWIqdOpC5Bes4LwYRAQ9qIILLQEKYW5l9tXJ 7aMksN62z6nG+6PZRBDTKmSeMTM+yFuw6k9k9Bxr2s2zMxYnkAQEGlcGNYkNc98B3Ft8 df6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jgeZcO62; 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-147204-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bo13-20020a170906d04d00b00a51946ff633si5788029ejb.990.2024.04.16.09.13.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 09:13:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147204-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=@gmail.com header.s=20230601 header.b=jgeZcO62; 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-147204-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147204-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C601C1F22633 for ; Tue, 16 Apr 2024 16:13:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E915131E21; Tue, 16 Apr 2024 16:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jgeZcO62" Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 9857D13172A; Tue, 16 Apr 2024 16:12:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713283976; cv=none; b=eIC+flYH6RJxox+AztmDUIIE6gI7iUt/3weDW51cjNomRjKPOf8RVJNtF22kG3aeG6TSeVrT2wM6LxvrVsnc0W8P7Fb9B5UL4KbEAWzu84LcVTsiaeL4SFTmm/JkjaAQo4kx5r8ly1UklEpbbjPeI17pHM/fCxJ6QvcderjpYwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713283976; c=relaxed/simple; bh=/Y3zo1KcddHRAAx9chnFCnaj6B+PNjuHwGVWXwXYUVs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZinnrcTH9gnM5Dvr0jVKLXTGk7zRdDS/oywH/12LQ49YOeHkAsxVbFOE0wRhUJ37HhP6LM4EbVlN6FeCyvCVckNiA75M3TxwGsVRB8TW1k6FgwgL5d6XPEhtBTmL4GMqZS2bNYYCRT23j15gfL0vtEVSKGy8d5qiFe5Dpy9Ezpk= 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=jgeZcO62; arc=none smtp.client-ip=209.85.221.44 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-wr1-f44.google.com with SMTP id ffacd0b85a97d-3499f1bed15so214899f8f.1; Tue, 16 Apr 2024 09:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713283973; x=1713888773; 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=lE0iIAKwN26IHZrOzJQ+UkxUYWi8S6bm+npmiEEpfoU=; b=jgeZcO62rlTkt2EpF+NykjONmJN1O/oMswfDCZfhs6kV+cDDesdn62aKBLNcKE0pYG vC7Ebo+AVHi6MFrfopLw1WhrJ4tfSdfhuDdobCkriHs5DpO6mr6t9vJeHFULFHuOHg2Z iAZ/pbQj6uf1P6p48UMmI6UOG2d56h6ky5OiNQgNcWZ0l/BALsKP5iXWYLEVLaTC7hPx x7yKURhXNTw91spy/E/n/TJJmctYIX+WX3ikIbj4FslD6gwcKceGs6++yXlWaGKm9f6c e+dCCdF7+W8XhrBpr8nXOxHGyXYy6S/WFWEYCintqIDv6i3FaP3PRzL5kxzAxmzF6Kgh duPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713283973; x=1713888773; 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=lE0iIAKwN26IHZrOzJQ+UkxUYWi8S6bm+npmiEEpfoU=; b=gSsDaq/QD6TGcfKm6n9XYeSRkg00S56kjDmsWcrqtL5JizFaAtRj3jzt6ePpNsNGBJ z/jvpQ/L2sSANDc+7/xSNZ4k0mcu4/8nF6Pv+LJhYiJIeBLTKnQ6caaQftpcyBsUdMYJ nxA0e4d8sVQX48AORWUz5ZTPXaSkAob2IbdWYwiREuF3xlD1LBwZjSLJMPASqa7wputd m7SmRvQU2h72EQpIqsTRq34YmQhTzlI2TNK4g35Jsh4nfyTvxKblEg1veSgetYFbIds9 rN7r6vntQT4YWzBEPvG4esvxR/BRHC3PJuhzURn1fLyehpOZqRizEgdR5seUn66BY9Fl CTjA== X-Forwarded-Encrypted: i=1; AJvYcCVWBzdsxe9Bz8BYl2PG0i7F3BffyzlY93L+HTW8i49IU52fGQpeaJfEwhC1JvcdWwYMZ+JRWY1cPuOwglMXBInWbwr7gFplmsshzpWeVQI/0w2RMB/Z76w22/FVQBR0CHky3LR5ytJ8ei64hki7TPcBa3zmtMEQM8a4VWZiCLWftyzu+os= X-Gm-Message-State: AOJu0Yyh0vJUIWPGH5qckW1wIhuhdMFGXjP+Y9+C0+jlVnVPlA5TgvNA gp/tZcvEi6eGNeUFiNzFkV2OTmKg7sMt2U/vFW8RQvSQU4yO3l+7075W X-Received: by 2002:a05:6000:1041:b0:33e:d139:412c with SMTP id c1-20020a056000104100b0033ed139412cmr2499659wrx.30.1713283972768; Tue, 16 Apr 2024 09:12:52 -0700 (PDT) Received: from U4.lan ([91.66.160.190]) by smtp.gmail.com with ESMTPSA id t7-20020adfe447000000b00343eac2acc4sm15350743wrm.111.2024.04.16.09.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 09:12:52 -0700 (PDT) From: Alex Bee To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Linus Walleij , Liam Girdwood , Mark Brown , Sebastian Reichel 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 v4 0/5] Add RK816 PMIC support Date: Tue, 16 Apr 2024 18:12:32 +0200 Message-ID: <20240416161237.2500037-1-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, 3 buck- and 6 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 be enabled if no battery charging is happening, but it will be enabled automatically if a battery is attached and an external power source is connected. Thus that needs 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 `#define`s 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 a RK3126 board. I'd like to gently ping pinctrl and regulator maintainers: please have a look at this series. I've now added Sebastian Reichel to the recipients, as he recently added RK806 support and re-worked parts of the rk8xx drivers. changes since v1: - integrated Krzysztof's feedback for the bindings and the resulting driver changes - fixed a sparse warning link to v1: https://lore.kernel.org/lkml/20240321143911.90210-2-knaerzche@gmail.com/ changes since v2: - integrated Krzysztof's feedback to v2 of the bindings and the resulting driver changes link to v2: https://lore.kernel.org/lkml/20240323085852.116756-1-knaerzche@gmail.com/ changes since v3: - integrated Krzysztof's feedback to the bindings of v3 - integrated Lee's feedback to the mfd part of v3 link to v3: https://lore.kernel.org/lkml/20240323132757.141861-2-knaerzche@gmail.com/ Please see individual patches for details about the changes. 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 | 274 ++++++++++++++++++ drivers/mfd/Kconfig | 4 +- drivers/mfd/rk8xx-core.c | 104 +++++++ drivers/mfd/rk8xx-i2c.c | 45 ++- drivers/pinctrl/pinctrl-rk805.c | 69 +++++ drivers/regulator/rk808-regulator.c | 218 +++++++++++++- include/linux/mfd/rk808.h | 144 +++++++++ 7 files changed, 851 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml -- 2.43.2