get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195224,
    "url": "http://patchwork.ozlabs.org/api/patches/2195224/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260210151459.2348758-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": "<20260210151459.2348758-17-raymondmaoca@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-10T15:14:59",
    "name": "[v2,16/16] board: k1: enable pmic in spl",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e934b1088e7f8308b40e2173911906cbd640d933",
    "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/20260210151459.2348758-17-raymondmaoca@gmail.com/mbox/",
    "series": [
        {
            "id": 491690,
            "url": "http://patchwork.ozlabs.org/api/series/491690/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=491690",
            "date": "2026-02-10T15:14:43",
            "name": "Add board support for Spacemit K1 SoC in SPL",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/491690/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195224/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195224/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=20230601 header.b=AVcA4rNy;\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=\"AVcA4rNy\";\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 4f9QDb6nqDz1xwG\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 02:18:07 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 2A1F483CF3;\n\tTue, 10 Feb 2026 16:16:01 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 8ADD583E16; Tue, 10 Feb 2026 16:15:59 +0100 (CET)",
            "from mail-ua1-x929.google.com (mail-ua1-x929.google.com\n [IPv6:2607:f8b0:4864:20::929])\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 4A56B83CEE\n for <u-boot@lists.denx.de>; Tue, 10 Feb 2026 16:15:57 +0100 (CET)",
            "by mail-ua1-x929.google.com with SMTP id\n a1e0cc1a2514c-94acf9ce1b7so528047241.2\n for <u-boot@lists.denx.de>; Tue, 10 Feb 2026 07:15:57 -0800 (PST)",
            "from ubuntu.localdomain (174-138-202-16.cpe.distributel.net.\n [174.138.202.16]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8953c057751sm101019286d6.43.2026.02.10.07.15.54\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Feb 2026 07:15:54 -0800 (PST)"
        ],
        "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=20230601; t=1770736556; x=1771341356; 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=2UNmiAf2JP+s+D7u3QVsHNAfTQgKxDBOeDawGxECJTU=;\n b=AVcA4rNyGafsHP8o5LLKC7arpGHy2gD4zul71fmtwhKTl3qJuC52UhAEkhapNwFmhm\n D4pbv4eQ1NsFZunA/eGHiOG7f2hmZ+S6YagC93kCUxEWo/eEfDQovbBvi24Ey2UCZ2GF\n 6ghtjdoer7cNmgfQXH7VB6aNwcMzVjGoSN7Tc2KebnNEtDLB3GIcZPpb5WSzubJIm2Xp\n A0s7ym9MLrEQLlkrakc1mhDXa4wpIkSniYlvI7SBFxsL5hqQtc7o14ymHvcPhDpVeD/N\n TR2RCfzytbxv7VEYMfoH68ljOCgHSsDQxpIrOvnCk0HuBVVQ0rOeeFtMU719C0dQZlQq\n jFbw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770736556; x=1771341356;\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=2UNmiAf2JP+s+D7u3QVsHNAfTQgKxDBOeDawGxECJTU=;\n b=H4Dt1li2xsITZnnmhlfpTV28VT3HiSUu5V+BjTmGNG+1MtpMZRBC2cmiaWGwg/1C5U\n eHGOmrVth5jEDOjJfyYVAtXR0MGZ+4Ti+C02jCzBZlZpBcwcArz/KXEK6J1bdHou5qQz\n Lk+G6zN0IMqWJ5UPxWgswf9VFG9seVWZXJl+o3aScSi1T1cSpoaljZMzOrn8E8Jl2W5F\n EU++QzYe9LDNvRzXI1PO4jjQHL2jbxIc9qAqjAXtV7Ra550nfGsTM8uHhaeQnRHlBxkW\n UxvYtJ/O5zvXXJxpZIYaKep+J9weIGGl0eGRvEBWXwIHr5UJltiEdxolf/ee7f1XM7W+\n wF+w==",
        "X-Gm-Message-State": "AOJu0YwgGZsN5fvTtjiYRVrU6vnoWXAUBBc++/uwv8eQi6LaiiQECAMv\n fb+6NH9+0a6ynY5LYP+KqLHzW3YRQ0wU/OHJdQyGvIJ7Kj5+9ISmVNX0Kwy9uA==",
        "X-Gm-Gg": "AZuq6aI6gHNLFoZ7Ikps4KMDWB2/Ezxo2JEQFXKecKDdx30VLQBqUohdAPfsXPQhPsE\n GX9UATbprZRnNjss3ncwPIx5/tsfm763tshrQ+/yR5xaiXdne++jT/M9oojd9nHgOHGExutU8/O\n Y5g9SIoVVGbJRv/9EvO9xCBOqueAZuK1KMKu8PYvaetKCP8zeb3nCE1gqPJG7MB1hAW1el0cgLa\n 5S95nM/AH4MN6pE+X/kJ23XeVgvjA9dyfwXGQ84R6GJha3TTO4phH/V0oSdC+iO26hK8Ywb03zu\n eEEDgrXbA8LenY1pDLPDP+tzHexqJgEOmUYnlw8t6iGoQ+M+EQD1RZy9GQQ8aCTfgpzuI8cvCIn\n VyKijDOllGDFtYezedOHKvUBL9dmsk54xGxIt/LY8KlzUgb7a2TgKLKqLCD4u204DBAArI6vYs4\n lK0CXSOYG9Q3qYaJFRV0rQRT3p3VmcDwgHn8Wuyl9PQ2JtSA1HcmdbaBdioQRaXcHTM9O4Nb0os\n Nvy+E5sh+A=",
        "X-Received": "by 2002:a05:6122:4f98:b0:563:66ec:8fdd with SMTP id\n 71dfb90a1353d-56705feb566mr4245769e0c.16.1770736555510;\n Tue, 10 Feb 2026 07:15:55 -0800 (PST)",
        "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 v2 16/16] board: k1: enable pmic in spl",
        "Date": "Tue, 10 Feb 2026 10:14:59 -0500",
        "Message-Id": "<20260210151459.2348758-17-raymondmaoca@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20260210151459.2348758-1-raymondmaoca@gmail.com>",
        "References": "<20260210151459.2348758-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---\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 |   9 +++\n 4 files changed, 203 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..f550745afea 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:      u-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 65e8143a0bd..33efd204e3a 100644\n--- a/configs/spacemit_k1_defconfig\n+++ b/configs/spacemit_k1_defconfig\n@@ -65,3 +65,12 @@ CONFIG_SPL_I2C_EEPROM=y\n CONFIG_CMD_TLV_EEPROM=y\n CONFIG_SPL_CMD_TLV_EEPROM=y\n CONFIG_LOG=y\n+CONFIG_SPL_POWER=y\n+CONFIG_DM_PMIC=y\n+CONFIG_SPL_DM_PMIC=y\n+CONFIG_PMIC_SPACEMIT_P1=y\n+CONFIG_SPL_PMIC_SPACEMIT_P1=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_SPL_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_SPACEMIT_P1=y\n+CONFIG_SPL_DM_REGULATOR_SPACEMIT_P1=y\n",
    "prefixes": [
        "v2",
        "16/16"
    ]
}