Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp395120pxy; Sat, 31 Jul 2021 10:42:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS1QJQX+ij2jk0QM7D1JKqIFZme5vLfTqOH9nmhn2rPvDfIvL44k3nhelLibS7gMfwg+9j X-Received: by 2002:a17:906:1e42:: with SMTP id i2mr8280562ejj.76.1627753344643; Sat, 31 Jul 2021 10:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627753344; cv=none; d=google.com; s=arc-20160816; b=BylwmFPbX5itK603T2giVnNjfettL3k9YyL00aNQ6If600iku/x63jAWHxnUm73NGn sJ0n1IFDmaICzKUTy6A3Po74Z3GePaoDLESLYW39s0P+JwQi24l3Qnm4vgC1OEPFFyyQ YfdFR55b0YQQAy6KI18blj0l4464yTJCEHgqtyKzpmKlA8WLnyZ3RFHRbPusrLgyQ0WZ 406axslj9siBKpYuFGAEuVzpz88chMvP1PqaSPCn2zJQvBFJ4nY35DwosNAYbqO+QV74 zo5n0OaGhwgtHbl8uRcbHCev6n0tm9Hcd+brcsgl0pRYm9p5Wxwp/4aB8waq4eXU2bjF gjuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5Vgfkn6aojezGyNshrp4rdUuCsXyIjMI3yAFc0juggw=; b=hny/WMivWD4t43B9bUKKGJ07S0pWOlB3h0lS1oVDlkqwUrWhXTjrweXAvThY7xfVAH 4ASJg47uyrNMjqtepPze0Va9RVTqPzNjFD8CVNUS5zJNwDWigjlyWFe8VVEUO7A1+Ov0 NFiRu6RBLjbfk+0+raDKxqpmEf1Zz8bJqgNoUkICk7+cHWOBxJe5wxU9Vgx+OyOihil6 nK7ItnOaGo+idfdJxYDzsbDI1YccS3lW26V2GyH8kApzx0D9wFLMYOoUlm5qxKVy4fXV 3593avZRoUxEkh49hAnCSyDO9/xOabO4Uu+6fphoXiRdeQMpyYxBErApXp4grW5b76JE 0b2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gauVPPgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si5409902edt.345.2021.07.31.10.42.01; Sat, 31 Jul 2021 10:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gauVPPgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231985AbhGaRjY (ORCPT + 99 others); Sat, 31 Jul 2021 13:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbhGaRjK (ORCPT ); Sat, 31 Jul 2021 13:39:10 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C293DC061799; Sat, 31 Jul 2021 10:39:02 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id n6so17567567ljp.9; Sat, 31 Jul 2021 10:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5Vgfkn6aojezGyNshrp4rdUuCsXyIjMI3yAFc0juggw=; b=gauVPPgwiGt8ErLfBme1SVcn/jTVSdGmVRVLRPBNWtxUGhPLo0TUjBkdWHF5elmHbo l70UVj14dtJsaDwaStcz9zH3lV5ZXxHXI321l+4IP17PTjSUIVmH3ZIjsNdj943WenWI LAQCHM8cCXnaBUqvbdImp8e+QVGFJdGqSnaADvo91EnEfu/rgHAffm2pt0Zh/ybkVKEz V6PavU/zklKWKIbD0/A012tZ7aNpFMMgzI/VtyTDRN0LCQM23ZjG7QWf4ENugZg2iRSX eeLjCtvaRYU4q4eKBLa+LdzuudieLl4tVdLPL6hg1U9irj5hfERepsWhNQ0sEd/wXJk3 QYqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Vgfkn6aojezGyNshrp4rdUuCsXyIjMI3yAFc0juggw=; b=BJIVHtv/ndpGf6RJJ0D2J4I6FFevktZpzHYFz4xqlsUM/fRMJGVJxNjgbDEe5F4kt7 b7DrwAlgwd8wPrETQWFWODDyf0nTz9aZUzsFtrzcYwsuXlkgrD2vZiBCeril/cdW0EGu tefdbDG5zbnwIODtHVFYRxqeOyRUEUk4byVkLDPC7ZLtiPT7GTqCf0HIAWTraWaKDI5/ nCYqg1ttxZS3prERZ/zXkNoM8ROAahNUCObM43E1yNgzNU+bfm4D2WV/eUrDie5oyiPK EXyPw7QXl6Ro5cwdYXJqrpE/H6KOSCxSMlRJF3looY9xJHwz5acywuoiQ9fDdE4WjMBr rvGw== X-Gm-Message-State: AOAM530Fc6jk2h2MbuaN1hVPTASB36iUuonOLFhoUEYC6FSbnJSJv1ML 4X4qKWsy9hyJYQgH45KBR3w= X-Received: by 2002:a2e:a36d:: with SMTP id i13mr5790035ljn.510.1627753141219; Sat, 31 Jul 2021 10:39:01 -0700 (PDT) Received: from localhost.localdomain (94-29-22-96.dynamic.spd-mgts.ru. [94.29.22.96]) by smtp.gmail.com with ESMTPSA id s15sm445272lfp.216.2021.07.31.10.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 10:39:00 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Sebastian Reichel , Peter Chen , Greg Kroah-Hartman , Felipe Balbi , David Heidelberg Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v6 05/12] dt-bindings: power: supply: smb347-charger: Document USB VBUS regulator Date: Sat, 31 Jul 2021 20:38:35 +0300 Message-Id: <20210731173842.19643-6-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210731173842.19643-1-digetx@gmail.com> References: <20210731173842.19643-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SMB347 can supply power to USB VBUS, which is required by OTG-cable devices that want to switch USB port into the host mode. Add USB VBUS regulator properties. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko --- .../power/supply/summit,smb347-charger.yaml | 30 +++++++++++++++++++ .../dt-bindings/power/summit,smb347-charger.h | 4 +++ 2 files changed, 34 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/summit,smb347-charger.yaml b/Documentation/devicetree/bindings/power/supply/summit,smb347-charger.yaml index 983fc215c1e5..20862cdfc116 100644 --- a/Documentation/devicetree/bindings/power/supply/summit,smb347-charger.yaml +++ b/Documentation/devicetree/bindings/power/supply/summit,smb347-charger.yaml @@ -73,6 +73,26 @@ properties: - 1 # SMB3XX_SOFT_TEMP_COMPENSATE_CURRENT Current compensation - 2 # SMB3XX_SOFT_TEMP_COMPENSATE_VOLTAGE Voltage compensation + summit,inok-polarity: + description: | + Polarity of INOK signal indicating presence of external power supply. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 0 # SMB3XX_SYSOK_INOK_ACTIVE_LOW + - 1 # SMB3XX_SYSOK_INOK_ACTIVE_HIGH + + usb-vbus: + $ref: "../../regulator/regulator.yaml#" + type: object + + properties: + summit,needs-inok-toggle: + type: boolean + description: INOK signal is fixed and polarity needs to be toggled + in order to enable/disable output mode. + + unevaluatedProperties: false + allOf: - if: properties: @@ -134,6 +154,7 @@ examples: reg = <0x7f>; summit,enable-charge-control = ; + summit,inok-polarity = ; summit,chip-temperature-threshold-celsius = <110>; summit,mains-current-limit-microamp = <2000000>; summit,usb-current-limit-microamp = <500000>; @@ -141,6 +162,15 @@ examples: summit,enable-mains-charging; monitored-battery = <&battery>; + + usb-vbus { + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-min-microamp = <750000>; + regulator-max-microamp = <750000>; + summit,needs-inok-toggle; + }; }; }; diff --git a/include/dt-bindings/power/summit,smb347-charger.h b/include/dt-bindings/power/summit,smb347-charger.h index d918bf321a71..3205699b5e41 100644 --- a/include/dt-bindings/power/summit,smb347-charger.h +++ b/include/dt-bindings/power/summit,smb347-charger.h @@ -16,4 +16,8 @@ #define SMB3XX_CHG_ENABLE_PIN_ACTIVE_LOW 1 #define SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH 2 +/* Polarity of INOK signal */ +#define SMB3XX_SYSOK_INOK_ACTIVE_LOW 0 +#define SMB3XX_SYSOK_INOK_ACTIVE_HIGH 1 + #endif -- 2.32.0