get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2216172/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2216172,
    "url": "http://patchwork.ozlabs.org/api/patches/2216172/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260325223232.1553212-17-raymondmaoca@gmail.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260325223232.1553212-17-raymondmaoca@gmail.com>",
    "list_archive_url": null,
    "date": "2026-03-25T22:32:32",
    "name": "[v3,16/16] board: k1: enable pmic in spl",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d6e9f6e2a3f51ef6a649b0ee00bc0b84a8a9636b",
    "submitter": {
        "id": 91989,
        "url": "http://patchwork.ozlabs.org/api/people/91989/?format=api",
        "name": "Raymond Mao",
        "email": "raymondmaoca@gmail.com"
    },
    "delegate": {
        "id": 20174,
        "url": "http://patchwork.ozlabs.org/api/users/20174/?format=api",
        "username": "Andes",
        "first_name": "Andes",
        "last_name": "",
        "email": "uboot@andestech.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260325223232.1553212-17-raymondmaoca@gmail.com/mbox/",
    "series": [
        {
            "id": 497518,
            "url": "http://patchwork.ozlabs.org/api/series/497518/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497518",
            "date": "2026-03-25T22:32:17",
            "name": "Add board support for Spacemit K1 SoC in SPL",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/497518/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216172/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216172/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=qrpY/exT;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"qrpY/exT\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=raymondmaoca@gmail.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fh1v964S5z1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 09:35:17 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id F270284120;\n\tWed, 25 Mar 2026 23:33:35 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id B77DA84101; Wed, 25 Mar 2026 23:33:31 +0100 (CET)",
            "from mail-qk1-x729.google.com (mail-qk1-x729.google.com\n [IPv6:2607:f8b0:4864:20::729])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id DA31C83A41\n for <u-boot@lists.denx.de>; Wed, 25 Mar 2026 23:33:28 +0100 (CET)",
            "by mail-qk1-x729.google.com with SMTP id\n af79cd13be357-8cfd44fa075so59949985a.0\n for <u-boot@lists.denx.de>; Wed, 25 Mar 2026 15:33:28 -0700 (PDT)",
            "from ubuntu.localdomain (173-206-124-85.cpe.distributel.net.\n [173.206.124.85]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8d00e39fc17sm101540185a.5.2026.03.25.15.33.26\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 25 Mar 2026 15:33:27 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774478007; x=1775082807; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=XYB8khKZUmdGj5PlA/bT5Bn6AHKga9mwzPkxIWcaV9w=;\n b=qrpY/exToRPLmx5gmTs1LNS4CkDAR8Ng9xNLmBRG2vjyMUt6UNbyBMgFKT4MbKYY+0\n VTwkfLiNmYIGkzsc3MJYXL43L/PGW8SvC1MFteGcOuu0Qoms25WncRQqAkl49Uapsf/a\n yDP8c4790jIU0c27nDGjEOts3BL8mdEEHbMfobX/GEWti+g7e1V+0XUMI8M52Z9KBypI\n 0Su8vMw0X7bgFkiqrgWhAwWAQ9m8B2gkQu1MvahoXD3D4f8UGoiOEBztBbtKLueM8BFe\n Ysi61n/8Zz9G4b2OO7H11aUWYdYAxUHLF2+xayu6PRIpV7VNQhCrbpjpQIMKBAxhtwHr\n Dh+A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774478007; x=1775082807;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=XYB8khKZUmdGj5PlA/bT5Bn6AHKga9mwzPkxIWcaV9w=;\n b=giDNKPcTMl2EVlpdbukqj2k4dPH8tZlSmCdVWm3iGnOGBIqxAGkpHowuWkYVlrXR08\n 6elDNKwOlXyVw8TVsRCbttC5iuWCzuy/e/Lo7WwmFy3MA/847BIgsxs94MWHcOxZVzHR\n HsV8qRT5Qn8pKhNcG7iE43PKmX3T4Aa12Z0pAn5rTZGyEGoyJlWR4ns6XfP1DOBAwSUG\n 8iUasd4uxfvyHA4fUB+RYkodqrVDJmG51S9+4FOi3+av85x5F3oOcYTnviNqYumsp2ir\n 2hV+BQ5Jqvdqjkh+nsJQ3oKyWdAbdIu2o0X+xib3VPt5a75KOT5vskbpmNxDHyuo/pUa\n Xr3w==",
        "X-Gm-Message-State": "AOJu0YysmApToVd8YNkCwRvGfBEiL08btTMhhFGS8/edwwAIykb/w1og\n j/k1uGG59a7v/+Q5sTAWKYDiMVaOkplcZj0X8kM8eMbS8jR48d+o6vB13eD4ihj+",
        "X-Gm-Gg": "ATEYQzwwhlPLf+EL3Hr3MRd3upznr+DRkTciycbvEux7cyw9q30jZhWA9hDTnj4x3Kp\n 1ShECNt7zJz6ruXe38aDqragjbnEFbCYKjBgD47msenzWl6KesJ2xneAI/rUij6IqQlJLHiQewV\n i/hReLXYhry6RCZsiRmoO/MQ+1zOWU43UZLnYf28GhT5Zf/tZPMI6w5slLNnvyyvD9kRqWpw1BZ\n LX1G6SiaaVkCKEIhz9omY2u+j2U3ImZ8kmYREM4Q0/K7+Jyk9Gh1vxWaUnzvsySGWJ5RfMP0aPF\n /7iqLUi6mxNWkyD4Z08VMny1M6WzDhlRhCO0NHkc9VZNzXpG1UrBVzRJ6jmzKDWepqbuybU7aaA\n gpsb8fy4CAuhBO8WP5OIcJnMijfM79QSA8SvljlxQJmC0OfL9b9Qc2JDcHOEO54xdvpIPGOumav\n cdk4N/EmivpdkfNZjwoHViMExzJuppWt4x4ojiJ3DnHK6hmG4A7Orn9BgznuGd9f1DeK24VUIN3\n zto31VYCwA=",
        "X-Received": "by 2002:a05:620a:199b:b0:8c9:f9c1:5ed with SMTP id\n af79cd13be357-8d00106dbd2mr750814685a.63.1774478007312;\n Wed, 25 Mar 2026 15:33:27 -0700 (PDT)",
        "From": "Raymond Mao <raymondmaoca@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "uboot@riscstar.com, u-boot-spacemit@groups.io, raymond.mao@riscstar.com,\n rick@andestech.com, ycliang@andestech.com, trini@konsulko.com,\n lukma@denx.de, hs@nabladev.com, jh80.chung@samsung.com, peng.fan@nxp.com,\n xypron.glpk@gmx.de, randolph@andestech.com, dlan@gentoo.org,\n junhui.liu@pigmoral.tech, neil.armstrong@linaro.org,\n quentin.schulz@cherry.de, samuel@sholland.org, raymondmaoca@gmail.com,\n Guodong Xu <guodong.xu@riscstar.com>",
        "Subject": "[PATCH v3 16/16] board: k1: enable pmic in spl",
        "Date": "Wed, 25 Mar 2026 18:32:32 -0400",
        "Message-Id": "<20260325223232.1553212-17-raymondmaoca@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20260325223232.1553212-1-raymondmaoca@gmail.com>",
        "References": "<20260325223232.1553212-1-raymondmaoca@gmail.com>",
        "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 <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "From: Raymond Mao <raymond.mao@riscstar.com>\n\nAdd Spacemit P1 SoC support in SPL. And set the default voltage\nfor BUCKs and LDOs.\n\nSigned-off-by: Raymond Mao <raymond.mao@riscstar.com>\nSigned-off-by: Guodong Xu <guodong.xu@riscstar.com>\n---\nChanges in v3:\n- Remove CONFIG_SPL_PMIC_SPACEMIT_P1 and\n  CONFIG_SPL_DM_REGULATOR_SPACEMIT_P1 from defconfig (Kconfig\n  symbols no longer exist)\n- Fix MAINTAINERS: use TAB instead of spaces before mailing list\n\n arch/riscv/dts/k1-spl.dts     | 128 +++++++++++++++++++++++++++++++---\n board/spacemit/k1/MAINTAINERS |   7 +-\n board/spacemit/k1/spl.c       |  82 +++++++++++++++++++---\n configs/spacemit_k1_defconfig |   7 ++\n 4 files changed, 201 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/arch/riscv/dts/k1-spl.dts b/arch/riscv/dts/k1-spl.dts\nindex e118767e6db..6f9407aada6 100644\n--- a/arch/riscv/dts/k1-spl.dts\n+++ b/arch/riscv/dts/k1-spl.dts\n@@ -99,17 +99,6 @@\n \t\t};\n \t};\n \n-\ti2c@d401d800 {\t\t/* i2c8 */\n-\t\tstatus = \"okay\";\n-\t\tbootph-pre-ram;\n-\t\tpmic@41 {\n-\t\t\tcompatible = \"pmic\";\n-\t\t\treg = <0x41>;\n-\t\t\tstatus = \"okay\";\n-\t\t\tbootph-pre-ram;\n-\t\t};\n-\t};\n-\n \treset-controller@d4050000 {\n \t\tstatus = \"okay\";\n \t\tbootph-pre-ram;\n@@ -120,3 +109,120 @@\n \tstatus = \"okay\";\n \tbootph-pre-ram;\n };\n+\n+&i2c8 {\n+\tstatus = \"okay\";\n+\tbootph-pre-ram;\n+\tpmic@41 {\n+\t\tcompatible = \"spacemit,p1\";\n+\t\treg = <0x41>;\n+\t\tstatus = \"okay\";\n+\t\tbootph-pre-ram;\n+\n+\t\tregulators {\n+\t\t\tbuck1 {\n+\t\t\t\tregulator-name = \"vdd_core\";\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3450000>;\n+\t\t\t\tregulator-ramp-delay = <5000>;\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tbootph-pre-ram;\n+\t\t\t};\n+\n+\t\t\tbuck2 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3450000>;\n+\t\t\t\tregulator-ramp-delay = <5000>;\n+\t\t\t\tregulator-always-on;\n+\t\t\t};\n+\n+\t\t\tbuck3_1v8: buck3 {\n+\t\t\t\tregulator-name = \"vdd_1v8\";\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-ramp-delay = <5000>;\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tbootph-pre-ram;\n+\t\t\t};\n+\n+\t\t\tbuck4 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-ramp-delay = <5000>;\n+\t\t\t\tregulator-always-on;\n+\t\t\t};\n+\n+\t\t\tbuck5 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3450000>;\n+\t\t\t\tregulator-ramp-delay = <5000>;\n+\t\t\t\tregulator-always-on;\n+\t\t\t};\n+\n+\t\t\tbuck6 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3450000>;\n+\t\t\t\tregulator-ramp-delay = <5000>;\n+\t\t\t\tregulator-always-on;\n+\t\t\t};\n+\n+\t\t\taldo1 {\n+\t\t\t\tregulator-name = \"vdd_1v8_mmc\";\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t\tregulator-boot-on;\n+\t\t\t\tbootph-pre-ram;\n+\t\t\t};\n+\n+\t\t\taldo2 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\taldo3 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\taldo4 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo1 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo2 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo3 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo4 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo5 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo6 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\n+\t\t\tdldo7 {\n+\t\t\t\tregulator-min-microvolt = <500000>;\n+\t\t\t\tregulator-max-microvolt = <3400000>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\ndiff --git a/board/spacemit/k1/MAINTAINERS b/board/spacemit/k1/MAINTAINERS\nindex bd476c32719..408621ab819 100644\n--- a/board/spacemit/k1/MAINTAINERS\n+++ b/board/spacemit/k1/MAINTAINERS\n@@ -1,6 +1,11 @@\n BananaPi F3\n M:\tHuan Zhou <pericycle.cc@@gmail.com>\n+M:\tGuodong Xu <guodong.xu@riscstar.com>\n+L:\tu-boot-spacemit@groups.io\n S:\tMaintained\n F:\tboard/spacemit/k1/\n-F:\tconfigs/k1_defconfig\n+F:\tconfigs/spacemit_k1_defconfig\n F:\tdoc/board/spacemit/bananapi-f3.rst\n+F:\tdrivers/i2c/k1_i2c.c\n+F:\tdrivers/power/pmic/pmic_spacemit_p1.c\n+F:\tdrivers/power/regulator/spacemit_p1_regulator.c\ndiff --git a/board/spacemit/k1/spl.c b/board/spacemit/k1/spl.c\nindex 95b61f5aa90..5af804f0409 100644\n--- a/board/spacemit/k1/spl.c\n+++ b/board/spacemit/k1/spl.c\n@@ -10,11 +10,13 @@\n #include <clk-uclass.h>\n #include <cpu_func.h>\n #include <configs/k1.h>\n+#include <cpu_func.h>\n #include <dm/device.h>\n #include <dm/uclass.h>\n #include <i2c.h>\n #include <linux/delay.h>\n #include <log.h>\n+#include <power/regulator.h>\n #include <spl.h>\n #include <tlv_eeprom.h>\n #include \"tlv_codes.h\"\n@@ -146,6 +148,73 @@ void serial_early_init(void)\n \t\tpanic(\"Serial uclass init failed: %d\\n\", ret);\n }\n \n+static void set_vdd_core(void)\n+{\n+\tstruct udevice *dev;\n+\tint ret;\n+\n+\tret = regulator_get_by_platname(\"vdd_core\", &dev);\n+\tif (ret)\n+\t\tpanic(\"Fail to detect vdd_core (%d)\\n\", ret);\n+\tret = regulator_set_enable(dev, true);\n+\tif (ret)\n+\t\tlog_warning(\"Fail to enable vdd_core (%d)\\n\", ret);\n+\tret = regulator_get_value(dev);\n+\tif (ret < 0)\n+\t\tlog_warning(\"Fail to read vdd_core (%d)\\n\", ret);\n+\tlog_info(\"vdd_core, value:%d\\n\", ret);\n+}\n+\n+static void set_vdd_1v8(void)\n+{\n+\tstruct udevice *dev;\n+\tint ret;\n+\n+\tret = regulator_get_by_platname(\"vdd_1v8\", &dev);\n+\tif (ret)\n+\t\tpanic(\"Fail to detect vdd_1v8 (%d)\\n\", ret);\n+\tret = regulator_set_value(dev, 1800000);\n+\tif (ret)\n+\t\tlog_warning(\"Fail to set vdd_1v8 as 1800000 (%d)\\n\", ret);\n+\tret = regulator_set_enable(dev, true);\n+\tif (ret)\n+\t\tlog_warning(\"Fail to enable vdd_1v8 (%d)\\n\", ret);\n+\tret = regulator_get_value(dev);\n+\tif (ret < 0)\n+\t\tlog_warning(\"Fail to read vdd_1v8 (%d)\\n\", ret);\n+\tlog_info(\"vdd_1v8, value:%d\\n\", ret);\n+}\n+\n+static void set_vdd_mmc(void)\n+{\n+\tstruct udevice *dev;\n+\tint ret;\n+\n+\tret = regulator_get_by_platname(\"vdd_1v8_mmc\", &dev);\n+\tif (ret)\n+\t\tpanic(\"Fail to detect vdd_1v8_mmc (%d)\\n\", ret);\n+\tret = regulator_set_enable(dev, true);\n+\tif (ret)\n+\t\tlog_warning(\"Fail to enable vdd_1v8_mmc (%d)\\n\", ret);\n+\tret = regulator_get_value(dev);\n+\tif (ret < 0)\n+\t\tlog_warning(\"Fail to read vdd_1v8_mmc (%d)\\n\", ret);\n+\tlog_info(\"vdd_1v8_mmc, value:%d\\n\", ret);\n+}\n+\n+void pmic_init(void)\n+{\n+\tstruct udevice *pmic_dev;\n+\tint ret;\n+\n+\tret = uclass_get_device(UCLASS_PMIC, 0, &pmic_dev);\n+\tif (ret)\n+\t\tpanic(\"Fail to detect PMIC (%d)\\n\", ret);\n+\tset_vdd_core();\n+\tset_vdd_1v8();\n+\tset_vdd_mmc();\n+}\n+\n /* Set default value for DDR chips */\n static void ddr_cfg_init(struct ddr_cfg *cfg)\n {\n@@ -263,6 +332,8 @@ void board_init_f(ulong dummy)\n \t\tlog_info(\"Fail to detect board:%d\\n\", ret);\n \telse\n \t\tlog_info(\"Get board name:%s\\n\", (char *)i2c_buf);\n+\tpmic_init();\n+\n \tddr_early_init();\n }\n \n@@ -271,17 +342,6 @@ u32 spl_boot_device(void)\n \treturn BOOT_DEVICE_NOR;\n }\n \n-void pmic_init(void)\n-{\n-\tstruct udevice *pmic_dev = NULL;\n-\tint ret;\n-\n-\tret = uclass_get_device(UCLASS_PMIC, 0, &pmic_dev);\n-\tif (ret)\n-\t\tpanic(\"Fail to detect PMIC:%d\\n\", ret);\n-}\n-\n void spl_board_init(void)\n {\n-\tpmic_init();\n }\ndiff --git a/configs/spacemit_k1_defconfig b/configs/spacemit_k1_defconfig\nindex 5a96eded8bf..16754ea98d3 100644\n--- a/configs/spacemit_k1_defconfig\n+++ b/configs/spacemit_k1_defconfig\n@@ -57,6 +57,10 @@ CONFIG_MISC=y\n CONFIG_I2C_EEPROM=y\n CONFIG_CMD_TLV_EEPROM=y\n CONFIG_LOG=y\n+CONFIG_DM_PMIC=y\n+CONFIG_PMIC_SPACEMIT_P1=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_SPACEMIT_P1=y\n CONFIG_SPL_REGMAP=y\n CONFIG_SPL_LIB_RATIONAL=y\n CONFIG_SPL_DM_RESET=y\n@@ -67,3 +71,6 @@ CONFIG_SPL_MISC=y\n CONFIG_SPL_DRIVERS_MISC=y\n CONFIG_SPL_I2C_EEPROM=y\n CONFIG_SPL_CMD_TLV_EEPROM=y\n+CONFIG_SPL_POWER=y\n+CONFIG_SPL_DM_PMIC=y\n+CONFIG_SPL_DM_REGULATOR=y\n",
    "prefixes": [
        "v3",
        "16/16"
    ]
}