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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BEC0EB64DA for ; Thu, 20 Jul 2023 08:48:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 260128615A; Thu, 20 Jul 2023 10:48:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ryO4d0rC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51A9286719; Thu, 20 Jul 2023 10:48:29 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 11D3F85746 for ; Thu, 20 Jul 2023 10:48:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clamor95@gmail.com Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f4b2bc1565so768274e87.2 for ; Thu, 20 Jul 2023 01:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689842906; x=1690447706; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9EhXp3WK4EqqSOE4cOb2Ypv2Z351RfKKMR/K8TnFjjQ=; b=ryO4d0rC1kUIIUI2sW7GuCZRj4NZOV5KMowpKMHjoDi2spbraQwavxPuPiMOlQEJ/u A8HOBB5AM7d3lZS70kyOmtpZlnor7MyFlkaQUnfwW7XIavcjj+Q5YJQNOY1wWDrrKiRT re+Bs8SWz9Zrree5x6AkTo/4y/L+N2eDddwapV9T6lSOtDsEDKdGm5CG/kvMXuLWJLk5 Qta6acCvTh8nL90ocrJX4JOCjE4XQme/liGnL4UzaTeIVOFjjyZOW7YmCP4yDrR/ojTn hZjiJN33LJyirC58pxm8mbISjrID5ZNSEUcihfcNGPFKUxnm7DzRYWVQcxiZVG1wFruO qgFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689842906; x=1690447706; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9EhXp3WK4EqqSOE4cOb2Ypv2Z351RfKKMR/K8TnFjjQ=; b=WQCifbtDscKKxfyJrCq4YVYJQ7H2k51u8fezdAb7RN/1xGPpiwt9n3Kw4MJQyonrn+ kbXUw61fjtOzfeK0jOaBg7eU4hd6l/4/9vAyFZ+PNb4HdMZE2wHLWjBrSwpYBzyu6OrL cF19f77Pt9s3E627xqX2/vxIwTZkUhisLve1s4kGR9XStfRscPJeOKp2cJtrpIJ6rKjI hn9Qaq7dLmKPa+7hAiR+NXBHwnc2ewRDxDiJRwd+3yCyBLTvSgQZAPl8tZeTBsKLmqeF wa91+8DjhMxEnk9F4CbHgv1FWFa2CLv/EcuYATg0t9bYzRD16zKLbUnL01hP0XCl9alz PIRA== X-Gm-Message-State: ABy/qLahP2GbmId1YlzvRLXPXsA2rdk/0U/eFQ+yMD1Jjx/W3va9CGeW eCA6GDCvrMN4NySOIvcj4Zo= X-Google-Smtp-Source: APBJJlE8aq2JII4+N59NAqULLuflftw/B8/SiJ12+/pMEa8iHwdDGENIlfAd9RTPa17nA/teHhvWsg== X-Received: by 2002:ac2:5e29:0:b0:4fd:bd94:e6cb with SMTP id o9-20020ac25e29000000b004fdbd94e6cbmr1744890lfg.35.1689842905968; Thu, 20 Jul 2023 01:48:25 -0700 (PDT) Received: from xeon.. ([188.163.112.64]) by smtp.gmail.com with ESMTPSA id x5-20020a19f605000000b004f21f196701sm94287lfe.203.2023.07.20.01.48.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 01:48:25 -0700 (PDT) From: Svyatoslav Ryhel To: Jaehoon Chung , Simon Glass , Svyatoslav Ryhel Cc: u-boot@lists.denx.de Subject: [PATCH v2 0/9] Add support for PMICs used on Tegra 3 devices Date: Thu, 20 Jul 2023 11:47:55 +0300 Message-Id: <20230720084804.77666-1-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Patch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities. Created poweroff API for pmic to be able to call do_poweroff directly from within pmic driver. PMIC responcible for poweroff shoud be marked as system-power-controller in device tree. Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible. --- Changes from v1: - created poweroff API for PMIC and integrated it call into do_poweroff - added poweroff function to submitted max77663, tps80032 and tps65911 drivers - fixed registers asignments for regulators with non-numeric name (ldoln, ldousb, vddctrl) --- Svyatoslav Ryhel (9): power: pmic-uclass: implement poweroff ops cmd: boot: implement PMIC based poweroff power: pmic: palmas: support TI TPS65913 PMIC power: pmic: add the base MAX77663 PMIC support power: regulator: max77663: add regulator support power: pmic: add the base TPS80031 PMIC support power: regulator: tps80031: add regulator support power: pmic: tps65910: add TPS65911 PMIC support power: regulator: tps65911: add regulator support cmd/Kconfig | 6 + cmd/boot.c | 40 ++ doc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 105 ++++++ drivers/power/pmic/palmas.c | 1 + drivers/power/pmic/pmic-uclass.c | 12 + drivers/power/pmic/pmic_tps65910_dm.c | 49 ++- drivers/power/pmic/tps80031.c | 97 +++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 358 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 377 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 44 +++ include/power/pmic.h | 13 + include/power/tps65910_pmic.h | 52 +++ include/power/tps80031.h | 45 +++ 21 files changed, 1771 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h -- 2.39.2