From patchwork Wed Aug 21 21:54:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13772182 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 292CEC52D7C for ; Wed, 21 Aug 2024 22:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QGxHVYptl/mfZ5O11htImf9Dey/T9TeFYQkFJXrtkIg=; b=XIL76Ydf7bisRiW0qG4ArnZGgH cxmdYccUAOEZTaaPs0Y9foOklP+AF4O4Bvnn9iLiavpuaBQ5YKUQeSE2axZhjoxHlQ9YyJbVdKCNN iyGuS1FcJOtta2Cgqa1P29xJylu/XyqgwGxIZCWMtq8s7oEvGZ1HemIvuuhXE3s4s/TJ6qIixKeNd hsXuAVOCSMI8qsk2SOqj3ngf3+4UCHBGQPiq1peCkf3fLVBRQ+Out+ZKw86D2LhGMxEVTh3oRbSPO WLfOdFgmulL0lU8O5B2ejdxTWBgx89PxkqMrihZgrabR6/SheYcw4DM+GGEzm2g+MZAXgnEI0tMj8 NCY9bjWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgtO6-0000000AUip-1Ojh; Wed, 21 Aug 2024 22:01:06 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgtKf-0000000AU5D-2tI9 for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 21:57:35 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3db23a608eeso95276b6e.1 for ; Wed, 21 Aug 2024 14:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724277453; x=1724882253; 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=QGxHVYptl/mfZ5O11htImf9Dey/T9TeFYQkFJXrtkIg=; b=hFs0OChm0IlwfQ8rabkMGEsbYoBp4FK15+IHeDfAk8VJ918ouxGCtfoae2d2xQLsgK eajj7S/4+5xjXGc8OZIv4milvqyTbiY9b35nhQxuz49nIMh0tOvvBLcL6sXQiDBO+qX5 Z1+u3+RpyqfoDnrLfy4H2wa9+5slqC9ik3HfQX9fdvUW7o6ZKzq3AHWY8W4DlFuOtUN7 yfjG71ESj2RYT1TeJKkN8zza94BGTn8mGBMjUNQokaxYdMET/uldbyfGgdfGhNAWfiIC jLLVnBhJwVKBG4GoX41gUC9lOjDzygDNOJkqhcXNRm+Bc8mg2cUjezbv1MZoXxrVrP6a Pbdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724277453; x=1724882253; 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=QGxHVYptl/mfZ5O11htImf9Dey/T9TeFYQkFJXrtkIg=; b=XbqSeZsrayz2V+pxTYEbLRBENUbmfwBs1nGPSWngY/RTo+w21cW3euRk8jH3y6T1Re gr9TrCKDmQbdY5NaGm9DdULlVOMFnn4QY+8kBRmZGypPuAf62SrgabtRky4XxAe+g0ij 6eFRdC8jkq6v29lrpDHGaWEOmdRtzNf5Ww2UrjcY4bIB8o3/FjYJZRXEiDEmxHuXJWLk zOyK8YFjt5eEHrveej5mFtxUZqE4IYJar03H6JjuW9Y3uzOyAHus/ZCSfZUYTkfRrD2d jvuK0UKSnXxVhfKpk9qBdykZA4vgUbNfWIurTve3le8bGq3M2aBRpyYeplLREvT3qYDN P9pg== X-Forwarded-Encrypted: i=1; AJvYcCVIeq2SBkTBxeaUL3unyjP4LEBPS0pqCY0Z5dSoWv3wZk5QWGfQLHFQu5jOVnjCfE+R3ORGvedsbAxYzUtBwNY3@lists.infradead.org X-Gm-Message-State: AOJu0YwHoDx25+GYY8hMqR8AI0Skrd4STD1dUnf/4t9u1D6MZMFI2bar AslY9uNSxuaA+Yz3fudal2RDa9bMmvwlnu6cGFjLM30OJankC3+3 X-Google-Smtp-Source: AGHT+IEEVh05GQZqcfbn4IDKx4nQgV7t9q/7T+7lh7gib4DsRCbvqlfs8kaWytyaNhMT/Lx2z5jZKg== X-Received: by 2002:a05:6808:2f08:b0:3de:220c:ace2 with SMTP id 5614622812f47-3de220cae0amr601913b6e.14.1724277452915; Wed, 21 Aug 2024 14:57:32 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf:81a9:2325:e0f7:7376]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3de225555b6sm47070b6e.17.2024.08.21.14.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 14:57:32 -0700 (PDT) From: Chris Morgan To: linux-sunxi@lists.linux.dev Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, quentin.schulz@free-electrons.com, mripard@kernel.org, tgamblin@baylibre.com, aidanmacdonald.0x0@gmail.com, u.kleine-koenig@pengutronix.de, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, sre@kernel.org, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, lars@metafoo.de, jic23@kernel.org, jonathan.cameron@huawei.com, Chris Morgan Subject: [PATCH V4 05/15] dt-bindings: power: supply: axp20x: Add input-current-limit-microamp Date: Wed, 21 Aug 2024 16:54:46 -0500 Message-Id: <20240821215456.962564-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821215456.962564-1-macroalpha82@gmail.com> References: <20240821215456.962564-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_145733_812975_9DC7DA38 X-CRM114-Status: GOOD ( 12.63 ) 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 From: Chris Morgan Allow specifying a hard limit of the maximum input current. Some PMICs such as the AXP717 can pull up to 3.25A, so allow a value to be specified that clamps this in the event the hardware is not designed for it. Signed-off-by: Chris Morgan Reviewed-by: Krzysztof Kozlowski --- .../x-powers,axp20x-usb-power-supply.yaml | 58 ++++++++++++++++++- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml b/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml index 34b7959d6772..ab24ebf2852f 100644 --- a/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml +++ b/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml @@ -15,9 +15,6 @@ maintainers: - Chen-Yu Tsai - Sebastian Reichel -allOf: - - $ref: power-supply.yaml# - properties: compatible: oneOf: @@ -31,8 +28,63 @@ properties: - const: x-powers,axp803-usb-power-supply - const: x-powers,axp813-usb-power-supply + input-current-limit-microamp: + description: + Optional value to clamp the maximum input current limit to for + the device. If omitted, the programmed value from the EFUSE will + be used. + minimum: 100000 + maximum: 4000000 required: - compatible +allOf: + - $ref: power-supply.yaml# + - if: + properties: + compatible: + contains: + enum: + - x-powers,axp192-usb-power-supply + then: + properties: + input-current-limit-microamp: + enum: [100000, 500000] + + - if: + properties: + compatible: + contains: + enum: + - x-powers,axp202-usb-power-supply + - x-powers,axp223-usb-power-supply + then: + properties: + input-current-limit-microamp: + enum: [100000, 500000, 900000] + + - if: + properties: + compatible: + contains: + enum: + - x-powers,axp221-usb-power-supply + then: + properties: + input-current-limit-microamp: + enum: [500000, 900000] + + - if: + properties: + compatible: + contains: + enum: + - x-powers,axp813-usb-power-supply + then: + properties: + input-current-limit-microamp: + enum: [100000, 500000, 900000, 1500000, 2000000, 2500000, + 3000000, 3500000, 4000000] + additionalProperties: false