From patchwork Thu Feb 3 20:29:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_J=C3=BCcker?= X-Patchwork-Id: 12734633 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C8A5C433FE for ; Thu, 3 Feb 2022 20:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354363AbiBCUbt (ORCPT ); Thu, 3 Feb 2022 15:31:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354368AbiBCUbL (ORCPT ); Thu, 3 Feb 2022 15:31:11 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD6CDC061749; Thu, 3 Feb 2022 12:30:53 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id s13so12392504ejy.3; Thu, 03 Feb 2022 12:30:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eTBrkv50iPcsCl3Axc+/Cs3Z68I2VsXqY0C0lgkJvTM=; b=atofIeh4yIXZ0J9+2qb+Egv0Sj+9EN0yrcwr3AbxcuxVq4VZtPOzTUTa/fJnOOK7cP xy79ZNP7g8hFten6aD1Zw07nLBR2WYOfj0i+Z67x5goL1dDtvH6i6EQFDWcS+48r2o5c 99nm4W1tPG69PYc9kxNd1zOUpGR7yyjKb03stUM0nuHC4tnQtKsUopp+8XRTgsC+txTq AUPJT4JX+oCYGCLaHgI2Mi9e3mSuq7XJzuEamE3LqpM/J/0wVMWWqXCA4LQwSU702fv+ /38Y+DVaR5ank4+U4DfTvtrsBXtpADhaQfAPAY0NgOkyKggibE7Di+W0gcZZdAGwUkLv OK9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eTBrkv50iPcsCl3Axc+/Cs3Z68I2VsXqY0C0lgkJvTM=; b=L7dh3JFlnk41Y/CyA3r3GGkxTOR/pmD7CnEGm1+fp++S2S1Tz6R57akQySiaaEVjlv 2EMctZvF3iX6JXPrP2EUzHFWSLBiGw2vRQC+bQaevy4Bb1RWaeXIvy+iLZ3HXRPJwa7w 9BN5zOv9ec/YuSDpT5gVK8cUKFkbVv+5mHpsO0KcZw/Nmv+bLjKiVSVJA9HxoJHuxUo9 IWLCctwXtSeoOhtIVukE8iq95Fa5IEPDqeXcfGjgGUSkAsgQmMCeIZpArEkOpz11fb4C 1iaaKlHH5tpmWgws6qo4+t1rsCNb5Boj10RWNdcNM+PX3KJJmHFqqXfdUuIcNkW8p0WQ KYJg== X-Gm-Message-State: AOAM531iIJW8NsEpOuakx7WVz7SX6hB1OzT8Pw8B38BHKxXvs9hWVZKX 16JbICz05Ud6xfGwjxqxYBA= X-Google-Smtp-Source: ABdhPJyM5yR9dRAuxYavP8LBxjs7IkwqTDrm+TvEKoUHcoUHW5eMd/V4plTO6YUFaH5jH6c8o7fUKw== X-Received: by 2002:a17:907:2d11:: with SMTP id gs17mr31591742ejc.189.1643920252145; Thu, 03 Feb 2022 12:30:52 -0800 (PST) Received: from adroid (027-177-184-091.ip-addr.vsenet.de. [91.184.177.27]) by smtp.gmail.com with ESMTPSA id ry6sm8843513ejc.45.2022.02.03.12.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 12:30:51 -0800 (PST) From: =?utf-8?q?Martin_J=C3=BCcker?= To: Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Russell King , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Martin_J=C3=BCcker?= Subject: [PATCH v2 1/2] ARM: dts: exynos: add charger and battery to p4note Date: Thu, 3 Feb 2022 21:29:47 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add device tree entry to support the Summit SMB347 charger which is built into the p4note devices, as well as a simple battery node. Signed-off-by: Martin Jücker --- Changes in v2: - squash charger and battery commits --- arch/arm/boot/dts/exynos4412-p4note.dtsi | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/exynos4412-p4note.dtsi b/arch/arm/boot/dts/exynos4412-p4note.dtsi index b386a9b8e188..fcd75cceb877 100644 --- a/arch/arm/boot/dts/exynos4412-p4note.dtsi +++ b/arch/arm/boot/dts/exynos4412-p4note.dtsi @@ -16,6 +16,7 @@ #include #include #include +#include / { compatible = "samsung,p4note", "samsung,exynos4412", "samsung,exynos4"; @@ -114,6 +115,17 @@ wlan_pwrseq: sdhci3-pwrseq { clock-names = "ext_clock"; }; + battery_cell: battery-cell { + compatible = "simple-battery"; + device-chemistry = "lithium-ion"; + constant-charge-current-max-microamp = <2200000>; + precharge-current-microamp = <250000>; + charge-term-current-microamp = <250000>; + constant-charge-voltage-max-microvolt = <4200000>; + + power-supplies = <&power_supply>; + }; + i2c-gpio-1 { compatible = "i2c-gpio"; sda-gpios = <&gpy2 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; @@ -182,6 +194,29 @@ stmpe_adc { }; }; }; + + i2c-gpio-4 { + compatible = "i2c-gpio"; + sda-gpios = <&gpm2 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpm2 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + + power_supply: charger@6 { + compatible = "summit,smb347"; + reg = <0x6>; + summit,enable-usb-charging; + summit,enable-charge-control = ; + summit,fast-voltage-threshold-microvolt = <2600000>; + summit,chip-temperature-threshold-celsius = <130>; + summit,usb-current-limit-microamp = <1800000>; + + monitored-battery = <&battery_cell>; + }; + }; + }; &adc { From patchwork Thu Feb 3 20:29:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_J=C3=BCcker?= X-Patchwork-Id: 12734634 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27B5AC43217 for ; Thu, 3 Feb 2022 20:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354480AbiBCUcq (ORCPT ); Thu, 3 Feb 2022 15:32:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354479AbiBCUbm (ORCPT ); Thu, 3 Feb 2022 15:31:42 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A070DC061759; Thu, 3 Feb 2022 12:31:11 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id ee12so7718849edb.8; Thu, 03 Feb 2022 12:31:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x9kRaOBtaHkhPekFjPvc1KlEAjAvRZ6bAcdpwAt4N2E=; b=dLg1Cx/6SVsAqaFNvUz6VEy5UXo8GPtQKVYiFMmPZVTEtZoJJUKML81Y0qmwo6nzH1 /a8cdHZrsKXKgwKy3ED4CGw3ZANA2nkkKE7co6fJFrk6bb2cLBdE3I8t6hh2B2a4/n0m cq//aX/hSDtquNG17KjzN4U8dP/B675TMT2X+OrvCtmyTrjJtffRd7nLHT2sU1axjCty X1L50FkY8n1dBU1tl8i90/skMISorhHJT++kvCQrgx3ZYJQ8JGOLFikwfieLZXsXpurq 6aJsi1MbdfSqrwH0ftQddjH+WFo/M2vL6KL4X1BEi0lgTaGQT+aE1mAGii2DE9qxiIp8 olJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x9kRaOBtaHkhPekFjPvc1KlEAjAvRZ6bAcdpwAt4N2E=; b=5hXSYCkCsHiRAVcP3I/vR5pT/O1TuElahqdeSfRQQpNRQ6njnvwf3L7ta+fdfQULqD F76JDm2OYdgR62LWIyHunvn4UWSNEZBEoGDny0g64fgB2SIALo6+TVkdsREoCrAtl9Py pIOaBS3VXDPO2uiQ+PAQimB+DrHze85Rtm9EyzC+Zx/rJcm32wnXYNj9W3v7OJh0NV2N V1SAFgHrikk3OCPAKS8Vl4B5wdAev132WDHNRACqoxC5ng9/lr1WKZDq9gsFGfRLk10n DE+gbsjSyedmxeOWEW27BD0LAx40MX0HeVffkdfUymIhm/17fGSQKGjJ1NfaYosgW2/i CccA== X-Gm-Message-State: AOAM531IMnTTXNlqJjPSqAFb+2CPFjvyGeiZFqNp8ifuifCutfasmQ7M JZ1Ur19xTvZ0N1bptH+coIk= X-Google-Smtp-Source: ABdhPJyIpwS5FkWLDCaYhhE2Um6Y5E2Bl+Q1S01iKeEgMWY2iFpTpHVKSGlntNR1X/fLDOpRDU9SxA== X-Received: by 2002:aa7:de91:: with SMTP id j17mr37735684edv.396.1643920270055; Thu, 03 Feb 2022 12:31:10 -0800 (PST) Received: from adroid (027-177-184-091.ip-addr.vsenet.de. [91.184.177.27]) by smtp.gmail.com with ESMTPSA id c25sm4634498edu.103.2022.02.03.12.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 12:31:09 -0800 (PST) From: =?utf-8?q?Martin_J=C3=BCcker?= To: Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Russell King , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Martin_J=C3=BCcker?= Subject: [PATCH v2 2/2] ARM: defconfig: add SMB347 charger driver for p4note Date: Thu, 3 Feb 2022 21:29:48 +0100 Message-Id: <4f1f6a4f8200855d07f3faed80ec5cc320e40941.1643919230.git.martin.juecker@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The Summit SMB347 charger is part of the p4note family of devices, enable the driver in exynos and multi_v7 defconfigs. Signed-off-by: Martin Jücker --- Changes in v2: - adjusted wording to decouple the patch from the dt changes --- arch/arm/configs/exynos_defconfig | 1 + arch/arm/configs/multi_v7_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig index c58877cfdc9d..9d3191de96b6 100644 --- a/arch/arm/configs/exynos_defconfig +++ b/arch/arm/configs/exynos_defconfig @@ -159,6 +159,7 @@ CONFIG_CHARGER_MAX14577=y CONFIG_CHARGER_MAX77693=y CONFIG_CHARGER_MAX8997=y CONFIG_CHARGER_MAX8998=y +CONFIG_CHARGER_SMB347=y CONFIG_CHARGER_TPS65090=y CONFIG_SENSORS_LM90=y CONFIG_SENSORS_NTC_THERMISTOR=y diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 1c2c3e9f0e05..bfbcb57e2083 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -510,6 +510,7 @@ CONFIG_CHARGER_MAX14577=m CONFIG_CHARGER_MAX77693=m CONFIG_CHARGER_MAX8997=m CONFIG_CHARGER_MAX8998=m +CONFIG_CHARGER_SMB347=m CONFIG_CHARGER_TPS65090=y CONFIG_SENSORS_ARM_SCMI=y CONFIG_SENSORS_ASPEED=m