From patchwork Sat Mar 23 08:58:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13600568 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50505C54E67 for ; Sat, 23 Mar 2024 09:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4h9mqi8hk6mXmAccahinWdhCyPO0Kc2/h/kbi/KzkjA=; b=ZoMhOSGbv5HnRp oYsgXSjfivN3e00GMewdvlko3G1h3yvR4VtVI5pEWUQd3IArCpT5kpB/SQ0E1yCb7+9B9/Cy9ZDxI s3VEDdYBS5QHM9940WBjg4GoQIG8zYLL9vSpQDrUXQvgCJVeIfl6HUUpMPzKNEoZ+W8CKbWVrfTVi H3IBQf9fdT9kDuKFdxIYjBE1FER3kczhbMEl3trFudDMi7dNWlgsCrEAbUW4RkxocUnYIHNExJQ/U 1R94BT0RAeZ3SZ3BcyzKFdq32ylOGi/TdLMJqr+lEHzV9QjixIBuQOOg3SZHXtwaly1isqcK1oIks pPzWhaOAWuI+lhWvCkaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnxEE-0000000A1GD-2Ies; Sat, 23 Mar 2024 08:59:50 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnxDc-0000000A0rz-17EK; Sat, 23 Mar 2024 08:59:15 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-33d90dfe73cso1550130f8f.0; Sat, 23 Mar 2024 01:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711184348; x=1711789148; darn=lists.infradead.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=oeiDpdLt3OHpoJFzv4AowOVwoakno99KYbuX0Mq1LqI=; b=PST5eaAterOxlSJTCscp5xONvhq+Od1dlyntsng7OHLDyiBWm+3bL+WeNfX+EiR1mp /WZe7i75Q1YdRqI2HsZfV2uLMq/Mj/ZIz+t7UknG76oXNmgPPLvnF7Sr3A62LZmr+siO sz1sDqgdmxaYGo73luNz+TAjlGkwQNun+z4qgGI9WQt9/KKnJBmWcjSFxfjxom7MUskN 2bH9JBRP64vfjfmzkgtfrmjL50UYrcb9pEnZxh+8JdGwtRwHfpy0JVt7KforRuN5d09e C6h6FtZXxwoIREft+qx5hxEvTswIp8hj//HllgAmiDbnYJYmT8D7TQh4z0nOsvKLEmqW BTHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711184348; x=1711789148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oeiDpdLt3OHpoJFzv4AowOVwoakno99KYbuX0Mq1LqI=; b=LVKGgtFxf/ysB0LK9wtPdzo+acQyxcm5sQolf3OEIU4Adfh7YGmOXvL+wUn+/o6Fke F4SMHxr5shzzVhzH1DNUY58//0NKTFEbVbcYtzXZXiyTAlCmwsftpBm5087Alyr5jeF/ 8FUbEOU9Uj69mbENvF0NbS41ZcX84HKmA5k3ugHgxGVEhwW4tvYgdOB9MhOJH8iCW+FU DlxJcZfG38nYhMdu5OKmoxMz7Du6OHnkqSsEkqbynGXaULIhZTO4Q3t8U43eTBPg+b1T VXESYb92eCOeon6c5OS68OmZ72/bBdCbAayL7aTNfQ5nURz8mh4s1WnZGOnu+gFVUu7s CIOg== X-Forwarded-Encrypted: i=1; AJvYcCUeVtoRakUncc7/nUsA6qHGT9eEn9ChSrhEsqa9Si7LGLibdVokkOrIN3eJpt4U8IGj/ssjogYzgsFNALV8TVbdLYK3QEbiEsgb4rp1qAaw0+YfLBcPLDgRzSY18YNyZT0CJ88NU/Tn77rb2cn1EeQa+Xe6qoGfKLw= X-Gm-Message-State: AOJu0YwNZsCCTFf9Z3U6dSiX21E/UU5BPUymPZK0S/wRSY3QANLsuvKq T0AtG2HaAPegFF9FiwL7DcwA89qMOVELbigJZQW7N6El9mox/LQ= X-Google-Smtp-Source: AGHT+IFOvXxg88CSUJQXEc5P5ooxQCKvpLZAAZkdRjM2xnjqNZ3oVD3uh0QNymxTTgJ4P35FSGROAQ== X-Received: by 2002:a5d:6acf:0:b0:341:c487:fb44 with SMTP id u15-20020a5d6acf000000b00341c487fb44mr285574wrw.11.1711184348345; Sat, 23 Mar 2024 01:59:08 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:fbb8:7547:139d:a40f]) by smtp.gmail.com with ESMTPSA id x16-20020a5d6b50000000b0033e93e00f68sm3965031wrw.61.2024.03.23.01.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 01:59:08 -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 v2 1/5] dt-bindings: mfd: Add rk816 binding Date: Sat, 23 Mar 2024 09:58:48 +0100 Message-ID: <20240323085852.116756-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240323085852.116756-1-knaerzche@gmail.com> References: <20240323085852.116756-1-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240323_015912_472903_FA0CBB22 X-CRM114-Status: GOOD ( 15.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add DT binding document for Rockchip's RK816 PMIC Signed-off-by: Alex Bee --- changes since v1: - lowercase/hyphens for regulator node names - rename "-reg" to "-regulator" to make node names generic - dropped superfluous description for clock-output-names and wakeup-source - dropped "|" for text blocks that don't require to preserve formatting - use full path for `$ref`s - added pins description to the binding - added charger function to description .../bindings/mfd/rockchip,rk816.yaml | 269 ++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml new file mode 100644 index 000000000000..9664162f4f75 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml @@ -0,0 +1,269 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/rockchip,rk816.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RK816 Power Management Integrated Circuit + +maintainers: + - Chris Zhong + - Zhang Qing + +description: + Rockchip RK816 series PMIC. This device consists of an i2c controlled MFD + that includes regulators, a RTC, a GPIO controller, a power button, and a + battery charger manager with fuel gauge. + +properties: + compatible: + enum: + - rockchip,rk816 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + '#clock-cells': + description: + See for clock IDs. + const: 1 + + clock-output-names: + maxItems: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + system-power-controller: + type: boolean + description: + Telling whether or not this PMIC is controlling the system power. + + wakeup-source: + type: boolean + + vcc1-supply: + description: + The input supply for dcdc1-regulator. + + vcc2-supply: + description: + The input supply for dcdc2-regulator. + + vcc3-supply: + description: + The input supply for dcdc3-regulator. + + vcc4-supply: + description: + The input supply for dcdc4-regulator. + + vcc5-supply: + description: + The input supply for ldo1-regulator, ldo2-regulator, and ldo3-regulator. + + vcc6-supply: + description: + The input supply for ldo4-regulator, ldo5-regulator, and ldo6-regulator. + + vcc7-supply: + description: + The input supply for boost. + + vcc8-supply: + description: + The input supply for otg-switch. + + regulators: + type: object + patternProperties: + "^(boost|dcdc[1-4]-regulator|ldo[1-6]-regulator|otg-switch)$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + unevaluatedProperties: false + +patternProperties: + '-pins$': + type: object + additionalProperties: false + $ref: /schemas/pinctrl/pinmux-node.yaml + + properties: + function: + enum: [pin_fun_gpio, pin_fun_thermistor] + + pins: + $ref: /schemas/types.yaml#/definitions/string + const: gpio0 + +required: + - compatible + - reg + - interrupts + - "#clock-cells" + +additionalProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rk816: pmic@1a { + compatible = "rockchip,rk816"; + reg = <0x1a>; + interrupt-parent = <&gpio0>; + interrupts = ; + clock-output-names = "xin32k", "rk816-clkout2"; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + gpio-controller; + system-power-controller; + wakeup-source; + #clock-cells = <1>; + #gpio-cells = <2>; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc5-supply = <&vcc33_io>; + vcc6-supply = <&vcc_sys>; + + regulators { + vdd_cpu: dcdc1-regulator { + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <1>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_logic: dcdc2-regulator { + regulator-name = "vdd_logic"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1250000>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <1>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vcc_ddr: dcdc3-regulator { + regulator-name = "vcc_ddr"; + regulator-initial-mode = <1>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc33_io: dcdc4-regulator { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc33_io"; + regulator-initial-mode = <1>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vccio_pmu: ldo1-regulator { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_pmu"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_tp: ldo2-regulator { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc_tp"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_10: ldo3-regulator { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-name = "vdd_10"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vcc18_lcd: ldo4-regulator { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc18_lcd"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vccio_sd: ldo5-regulator { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_sd"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vdd10_lcd: ldo6-regulator { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-name = "vdd10_lcd"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + }; + }; + };