From patchwork Mon Aug 19 16:46:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13768690 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 C70F7C52D6F for ; Mon, 19 Aug 2024 16:53: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: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=LDis15Hzp2Vx+5TQlBnC0YVroTqVlccFthHOCI8Z73Q=; b=hrxHUfBOWe9apw71+gPG1EXi6f aUxMzVx0fio2dAVwx5LpHE/8h7V/UTDsv/MK2+8JrneghVNveRhZCWIFYxPKIZyFhw5ahT2y7IVpS 0Tll+1qm5BxmNYxDWYYiQheRCIclhPJsdzMfim5wK+vSinobKAPT6ExaclXTvzTolrCWmvZ+VsjNY x2qzDW3PERQ0E1Fb+BXzFUzRGwTPuUcvjtIDtK5MifbwLCcJmihqThNNR09S7PB9JhOT6LVWmDwEc mG1k33HJDvOerDEBgPJu/MmT0QfZleBI1i4IZVaiImKsQH9HdzLbBi6v3+n6v5WXfgzwZcXRSSjiR EwAtYRVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5ck-00000002Fe1-3RuM; Mon, 19 Aug 2024 16:52:54 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5Ym-00000002Efe-0P5D for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 16:48:49 +0000 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-7093ba310b0so1929393a34.2 for ; Mon, 19 Aug 2024 09:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724086126; x=1724690926; 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=LDis15Hzp2Vx+5TQlBnC0YVroTqVlccFthHOCI8Z73Q=; b=mWGVtRH3XF0/hBlofZ+ch9AHr4M58rQ88cffKhZ5Lu9DK5Gstp8XX/cl97Dis8KxsL 60ShPWRShaOwoF6PcKOX+joAJciS6GycHdsAVX1+lTYa6nc68wmgP6GAIr93mzJH2Vtk W0Z7v0z6WbHDVFmLrrZmw0ysjsyPTCbL5gviW8klrOecxN4K2IHjY/P/SF7Zvx+HpRor ZdcagEmbsCuksuKbyWBug+x34JOoqbsv1nKRsdfkbqF0TVVNqumiq+r6wq5OdkbAMpRD 2naeRR+fQ3pwHUuLnMvqwLsUzl5BvK37Mu21wlpW0XP3CFlyMsjILA0ThhwOcjTcLIJO QjkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724086126; x=1724690926; 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=LDis15Hzp2Vx+5TQlBnC0YVroTqVlccFthHOCI8Z73Q=; b=VZG61D2Gb38EyRKubdHSd1fsp1kIUCeIeFyMMZWAxLpPT8IveK1PUjWoZshkEQ9zME ljh6KgQ9UmxI3WnlNbWGCLpd5qvM6b4wZL4QQnEAb6PPm4Bdnm8dUVgrttuMBWN7sLtS ab63DBbNs/cxoLvArePw5BkQzrH2kKMST9Ta7QPKrwJ3VdygorG0X4lrAOvMm9HPHxGu 58e901I2LPKYry/wYCBtpcmLm7D6LTVQx2jI7O6JgvOBn7WCJmK0zsaOkoaRkRIznfa4 azGy6XMX/BQ1VGfHUEIeqPQMw7VcIFl9UDsIEwq14Cyr0hAt5UwPoRFexW+dsbWMkl/V gJAA== X-Forwarded-Encrypted: i=1; AJvYcCUf7aWM80Go0Dvt1WwxcdR38X1itF1FU+wz9Roju22u8PxGMqqqoQdk92NabUVh2xuro9vDQM955vtpmGKxv9Jb@lists.infradead.org X-Gm-Message-State: AOJu0Yzo901x/MMqVui1vSm7fMXzpCxPNZ79pV5deTt2yq8jKZENUj3m plw3w01kL7BxHoMOzeYe15rZUU1Y33FjRydcj89plqze0clzFz5K X-Google-Smtp-Source: AGHT+IHJmQOitznYw7nxXig16L2gz0qkKmEqys1jVwJ8LH/stIDVmGhzuz59B5CSI59rRM0lCJakKQ== X-Received: by 2002:a05:6830:448a:b0:70c:a547:1c3c with SMTP id 46e09a7af769-70cac83c080mr14115806a34.5.1724086126620; Mon, 19 Aug 2024 09:48:46 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca649c61csm2332428a34.26.2024.08.19.09.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 09:48:46 -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 V3 05/15] dt-bindings: power: supply: axp20x: Add input-current-limit-microamp Date: Mon, 19 Aug 2024 11:46:09 -0500 Message-Id: <20240819164619.556309-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819164619.556309-1-macroalpha82@gmail.com> References: <20240819164619.556309-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_094848_169321_AC53A805 X-CRM114-Status: GOOD ( 13.05 ) 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 --- .../x-powers,axp20x-usb-power-supply.yaml | 69 ++++++++++++++++++- 1 file changed, 66 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..9cc300e78f60 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,74 @@ 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. 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,axp717-usb-power-supply + then: + properties: + input-current-limit-microamp: + description: Maximum input current in increments of 50000 uA. + minimum: 100000 + maximum: 3250000 + + - 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