get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806498,
    "url": "http://patchwork.ozlabs.org/api/patches/806498/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1503915996-11495-8-git-send-email-rajesh.bhagat@nxp.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": "<1503915996-11495-8-git-send-email-rajesh.bhagat@nxp.com>",
    "list_archive_url": null,
    "date": "2017-08-28T10:26:36",
    "name": "[U-Boot,v3,7/7] ls1088a: Add VID support for QDS and RDB platforms",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5130b712aaa0485d8ba48afe83b27e26a443a9fa",
    "submitter": {
        "id": 68498,
        "url": "http://patchwork.ozlabs.org/api/people/68498/?format=api",
        "name": "Rajesh Bhagat",
        "email": "rajesh.bhagat@nxp.com"
    },
    "delegate": {
        "id": 2666,
        "url": "http://patchwork.ozlabs.org/api/users/2666/?format=api",
        "username": "yorksun",
        "first_name": "York",
        "last_name": "Sun",
        "email": "yorksun@freescale.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1503915996-11495-8-git-send-email-rajesh.bhagat@nxp.com/mbox/",
    "series": [
        {
            "id": 128,
            "url": "http://patchwork.ozlabs.org/api/series/128/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=128",
            "date": "2017-08-28T10:26:29",
            "name": "Add VID support for QDS and RDB platforms",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/128/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806498/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806498/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed)\n\theader.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgp895TL5z9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 20:35:53 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 848BEC222E7; Mon, 28 Aug 2017 10:34:12 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 98EF2C22477;\n\tMon, 28 Aug 2017 10:27:42 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid F30A7C22494; Mon, 28 Aug 2017 10:27:38 +0000 (UTC)",
            "from NAM02-BL2-obe.outbound.protection.outlook.com\n\t(mail-bl2nam02on0083.outbound.protection.outlook.com [104.47.38.83])\n\tby lists.denx.de (Postfix) with ESMTPS id C06BBC224FA\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 10:26:56 +0000 (UTC)",
            "from MWHPR03CA0024.namprd03.prod.outlook.com (10.175.133.162) by\n\tBN6PR03MB3313.namprd03.prod.outlook.com (10.174.233.142) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.1.1385.9; Mon, 28 Aug 2017 10:26:55 +0000",
            "from BL2FFO11FD013.protection.gbl (2a01:111:f400:7c09::191) by\n\tMWHPR03CA0024.outlook.office365.com (2603:10b6:300:117::34) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9 via\n\tFrontend Transport; Mon, 28 Aug 2017 10:26:54 +0000",
            "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBL2FFO11FD013.mail.protection.outlook.com (10.173.160.221) with\n\tMicrosoft\n\tSMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id\n\t15.1.1341.15 via Frontend Transport; Mon, 28 Aug 2017 10:26:53 +0000",
            "from ubuntu1604.ap.freescale.net (ubuntu1604.ap.freescale.net\n\t[10.232.133.7])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tv7SAQZfR021815; Mon, 28 Aug 2017 03:26:51 -0700"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.0 required=5.0 tests=BAD_ENC_HEADER,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,\n\tSPF_HELO_PASS\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "Received-SPF": "Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;",
        "From": "Rajesh Bhagat <rajesh.bhagat@nxp.com>",
        "To": "<u-boot@lists.denx.de>",
        "Date": "Mon, 28 Aug 2017 15:56:36 +0530",
        "Message-ID": "<1503915996-11495-8-git-send-email-rajesh.bhagat@nxp.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1503915996-11495-1-git-send-email-rajesh.bhagat@nxp.com>",
        "References": "<1503915996-11495-1-git-send-email-rajesh.bhagat@nxp.com>",
        "X-EOPAttributedMessage": "0",
        "X-Matching-Connectors": "131483896139803747;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()",
        "X-Forefront-Antispam-Report": "CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5003940100001)(6666003)(8676002)(81166006)(81156014)(356003)(50226002)(77096006)(33646002)(54906002)(2906002)(85426001)(8936002)(104016004)(305945005)(498600001)(2950100002)(189998001)(36756003)(4326008)(6916009)(626005)(68736007)(86362001)(105606002)(50986999)(97736004)(8656003)(106466001)(2351001)(76176999)(5660300001)(47776003)(53936002)(110136004)(50466002)(48376002);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB3313;\n\tH:tx30smr01.am.freescale.net; \n\tFPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BL2FFO11FD013;\n\t1:iMOx638vMSdMPaz8P0J/9rIhXtGt/PMY+lFSTnSDxYhfj9AjZqbIcYFLxxeiHG+CWcUxkijH7vpU4vrIPpO4iVmk3bPvjB3Orc1Kyv9fCToWTekRIdPNlsWNvG8acTHt",
            "1; BN6PR03MB3313;\n\t3:cpkEqKFCVOLnQNivN99yzMqXmM+k+BhHaRJEzlXUy9wcfsR/bT4ILZd8kp4ef+kdxszmH6Dpkhq2yBGg+4Yqrwo8sKJ07YcRGiuhBGbu/j9bUYQSOqTed1zdH6jQK5PsY8Nl1m9KsktMnvApBPTUYGt5gKed1R26zY3+UTLMYiWDXJNevecCiQd/d1T45otwJcYS88lAP7XeQdfEYQvcsTtDzA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nJxUjHEisN40D3MtFONYuJ5nVWTJghU1sE1ChEpjSV5NGNSoUeIsjAfoyi90BQ0QvBSp7Vt0vvEk4dWKsb9hfEuGUZFKdQcRO3RXsxMO8FLqr5CXIiTkw",
            "1; BN6PR03MB3313;\n\t6:b2mamn2rCStJmUT38lSgOVysCvTTymWkEQKZPNRgKCWZ+X1wEMnxs9DJILsvOySrP4rKp/39kD3r1uPWQtnvp9vTXttutq++niQGYybCEbMeaEhIYMgaCHfqjMvhO/YBvZxJCUlldn0WzNIPiT/AgG0bwDypws4m18mw2KuYYBtjpmRdQjlnQghavMup352qz5yQmEJrtWYGrqb6Q9D4p2Ns/oJjeOFXIGY9tNlVVcZBHYKT75rjs1O8WVyvylECVjKbeS5QCUoUN3upVwyWV0K+6p2BFmkvg9v45NwqPIdfYrmmPdBamW+P0NKi34GcwjmhWRA/J7TEAzZdNzsvyQ==;\n\t5:Yqctpk28pMufUUANIJA20Lz9IdSKgtcrosj2AtbmBHClyHNpR2u5qFPjuWElwiVCygIG4L3+i9hb5ew7l9KYvFlYPkF40ArQ++a+7s4mFV332PlCzdJgRf0WtkDIU0KDnfxB0DJskP71ApHkNu6laQ==;\n\t24:7Xr1B75zZvxx/w7Xh3cblFhzSDJXPgH5bpIg5yI+Rr+z14mRZZ//dS84NXHp65+xFjsZsNlwCsEmQw5/ZGiZ2j8cnyynfGCntWwZXALo+NQ=;\n\t7:mHU/z3B9btigYDjCyBCFD+o2VWJH11CEw5jDOmW3Z7jghcU67wgNDdkG7sxR4lqyZTJm5VDumHdZuJd/HLI3twpHN8BaBwPAvH9rD9rOAuK6ezCaDsyj+DYLsGEtmc+t9U0iaA/XrWVZn+zFZ/ahtIE2C4XAh6p3P6vhoKq1huZuToSwWxtPB4u4+KVcuvOK4d5Uud48boqMz6PJOUne8GhY/hDNVm5MBNzTybdZWvw="
        ],
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "20257411-47ce-4700-8b02-08d4edff4d8d",
        "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:BN6PR03MB3313; ",
        "X-MS-TrafficTypeDiagnostic": "BN6PR03MB3313:",
        "X-Exchange-Antispam-Report-Test": "UriScan:(185117386973197);",
        "X-Microsoft-Antispam-PRVS": "<BN6PR03MB331358830EFAC1E85EE55DD4E39E0@BN6PR03MB3313.namprd03.prod.outlook.com>",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123556025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:BN6PR03MB3313; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:BN6PR03MB3313; ",
        "X-Forefront-PRVS": "0413C9F1ED",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "28 Aug 2017 10:26:53.8087\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Id": "5afe0b00-7697-4969-b663-5eab37d5f47e",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.168.50]; \n\tHelo=[tx30smr01.am.freescale.net]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN6PR03MB3313",
        "Cc": "albert.u.boot@aribaud.net, Raghav Dogra <raghav.dogra@nxp.com>,\n\tAmrita Kumari <amrita.kumari@nxp.com>",
        "Subject": "[U-Boot] [PATCH v3 7/7] ls1088a: Add VID support for QDS and RDB\n\tplatforms",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://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\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "This patch adds the support for VID on LS1088AQDS and LS1088ARDB systems.\nIt reads the fusesr register and changes the VDD accordingly by adjusting the\nvoltage via LTC3882 regulator.\n\nThis patch also takes care of the special case of 0.9V VDD is present in\nfusesr register. In that case,it also changes the SERDES voltage by disabling\nthe SERDES, changing the SVDD and then re-enabling SERDES.\n\nSigned-off-by: Raghav Dogra <raghav.dogra@nxp.com>\nSigned-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>\nSigned-off-by: Amrita Kumari <amrita.kumari@nxp.com>\nSigned-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>\n---\nChanges in v3:\n Restructured LS1088A VID support to use common VID driver\n Removed APIs getLSB/MSB and used bit operations.\n\nChanges in v2:\n Checkpatch errors fixed\n\n board/freescale/ls1088a/ls1088a.c | 119 ++++++++++++++++++++++++++++++++++++++\n include/configs/ls1088aqds.h      |  13 +++++\n include/configs/ls1088ardb.h      |  14 +++++\n 3 files changed, 146 insertions(+)",
    "diff": "diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c\nindex d1de4d1..2c65ed3 100644\n--- a/board/freescale/ls1088a/ls1088a.c\n+++ b/board/freescale/ls1088a/ls1088a.c\n@@ -18,9 +18,13 @@\n #include <environment.h>\n #include <asm/arch-fsl-layerscape/soc.h>\n #include <asm/arch/ppa.h>\n+#include <asm/arch/fsl_serdes.h>\n+#include <asm/arch/soc.h>\n \n #include \"../common/qixis.h\"\n #include \"ls1088a_qixis.h\"\n+#include \"../common/vid.h\"\n+#include <fsl_immap.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \n@@ -295,6 +299,119 @@ void board_retimer_init(void)\n \t/*return the default channel*/\n \tselect_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);\n }\n+int i2c_multiplexer_select_vid_channel(u8 channel)\n+{\n+\treturn select_i2c_ch_pca9547(channel);\n+}\n+\n+#ifdef CONFIG_TARGET_LS1088AQDS\n+/* read the current value(SVDD) of the LTM Regulator Voltage */\n+int get_serdes_volt(void)\n+{\n+\tint  ret, vcode = 0;\n+\n+\t/* Select the PAGE 0 using PMBus commands PAGE for VDD */\n+\tret = i2c_write(I2C_SVDD_MONITOR_ADDR,\n+\t\t\tPMBUS_CMD_PAGE, 1, PWM_CHANNEL0, 1);\n+\tif (ret) {\n+\t\tprintf(\"VID: failed to select VDD Page 0\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\t/* Read the output voltage using PMBus command READ_VOUT */\n+\tret = i2c_read(I2C_SVDD_MONITOR_ADDR,\n+\t\t       PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2);\n+\tif (ret) {\n+\t\tprintf(\"VID: failed to read the volatge\\n\");\n+\t\treturn ret;\n+\t}\n+\treturn vcode;\n+}\n+\n+int set_serdes_volt(int svdd)\n+{\n+\tint ret, vdd_last;\n+\tu8 buff[5] = {0x04, PWM_CHANNEL0, PMBUS_CMD_VOUT_COMMAND,\n+\t\t\tsvdd & 0xFF, (svdd & 0xFF00) >> 8};\n+\n+\t/* Write the desired voltage code to the SVDD regulator */\n+\tret = i2c_write(I2C_SVDD_MONITOR_ADDR,\n+\t\t\tPMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5);\n+\tif (ret) {\n+\t\tprintf(\"VID: I2C failed to write to the volatge regulator\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Wait for the volatge to get to the desired value */\n+\tdo {\n+\t\tvdd_last = get_serdes_volt();\n+\t\tif (vdd_last < 0) {\n+\t\t\tprintf(\"VID: Couldn't read sensor abort VID adjust\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t} while (vdd_last != svdd);\n+\n+\treturn 1;\n+}\n+#else\n+int get_serdes_volt(void)\n+{\n+\treturn 0;\n+}\n+\n+int set_serdes_volt(int svdd)\n+{\n+\tint ret;\n+\tu8 brdcfg4;\n+\n+\tprintf(\"SVDD changing of RDB\\n\");\n+\n+\t/* Read the BRDCFG54 via CLPD */\n+\tret = i2c_read(CONFIG_SYS_I2C_FPGA_ADDR,\n+\t\tQIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1);\n+\tif (ret) {\n+\t\tprintf(\"VID: I2C failed to read the CPLD BRDCFG4\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tbrdcfg4 = brdcfg4 | 0x08;\n+\n+\t/* Write to the BRDCFG4 */\n+\tret = i2c_write(CONFIG_SYS_I2C_FPGA_ADDR,\n+\t\t\tQIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1);\n+\tif (ret) {\n+\t\tdebug(\"VID: I2C failed to set the SVDD CPLD BRDCFG4\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Wait for the volatge to get to the desired value */\n+\tudelay(10000);\n+\n+\treturn 1;\n+}\n+#endif\n+\n+/* this function disables the SERDES, changes the SVDD Voltage and enables it*/\n+int board_adjust_vdd(int vdd)\n+{\n+\tint ret = 0;\n+\n+\tdebug(\"%s: vdd = %d\\n\", __func__, vdd);\n+\n+\t/* Special settings to be performed when voltage is 900mV */\n+\tif (vdd == 900) {\n+#ifdef CONFIG_SYS_FSL_DDR\n+\t\tddr_enable_0v9_volt(true);\n+#endif\n+\t\tret = setup_serdes_volt(vdd);\n+\t\tif (ret < 0) {\n+\t\t\tret = -1;\n+\t\t\tgoto exit;\n+\t\t}\n+\t}\n+exit:\n+\treturn ret;\n+}\n \n int board_init(void)\n {\n@@ -314,6 +431,8 @@ int board_init(void)\n \t/* invert AQR105 IRQ pins polarity */\n \tout_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR105_IRQ_MASK);\n #endif\n+\tif (adjust_vdd(0) < 0)\n+\t\tprintf(\"core voltage not adjusted\\n\");\n \n #ifdef CONFIG_FSL_LS_PPA\n        ppa_init();\ndiff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h\nindex 8ae98e1..a1135ed 100644\n--- a/include/configs/ls1088aqds.h\n+++ b/include/configs/ls1088aqds.h\n@@ -284,6 +284,19 @@ unsigned long get_board_ddr_clk(void);\n #define I2C_VOL_MONITOR_BUS_V_OFFSET   0x2\n #define I2C_VOL_MONITOR_BUS_V_OVF      0x1\n #define I2C_VOL_MONITOR_BUS_V_SHIFT    3\n+#define I2C_SVDD_MONITOR_ADDR           0x4F\n+\n+#define CONFIG_VID_FLS_ENV              \"ls1088aqds_vdd_mv\"\n+#ifndef CONFIG_SPL_BUILD\n+#define CONFIG_VID\n+#endif\n+\n+/* The lowest and highest voltage allowed for LS1088AQDS */\n+#define VDD_MV_MIN\t\t\t819\n+#define VDD_MV_MAX\t\t\t1212\n+\n+#define CONFIG_VOL_MONITOR_LTC3882_SET\n+#define CONFIG_VOL_MONITOR_LTC3882_READ\n \n /* PM Bus commands code for LTC3882*/\n #define PMBUS_CMD_PAGE                  0x0\ndiff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h\nindex 86fa033..615753b 100644\n--- a/include/configs/ls1088ardb.h\n+++ b/include/configs/ls1088ardb.h\n@@ -136,6 +136,7 @@\n \n #define CONFIG_FSL_QIXIS\n #define CONFIG_SYS_I2C_FPGA_ADDR\t0x66\n+#define QIXIS_BRDCFG4_OFFSET            0x54\n #define QIXIS_LBMAP_SWITCH\t\t2\n #define QIXIS_QMAP_MASK\t\t\t0xe0\n #define QIXIS_QMAP_SHIFT\t\t5\n@@ -216,6 +217,19 @@\n #define I2C_VOL_MONITOR_BUS_V_OFFSET   0x2\n #define I2C_VOL_MONITOR_BUS_V_OVF      0x1\n #define I2C_VOL_MONITOR_BUS_V_SHIFT    3\n+#define I2C_SVDD_MONITOR_ADDR\t\t0x4F\n+\n+#define CONFIG_VID_FLS_ENV              \"ls1088ardb_vdd_mv\"\n+#ifndef CONFIG_SPL_BUILD\n+#define CONFIG_VID\n+#endif\n+\n+/* The lowest and highest voltage allowed for LS1088ARDB */\n+#define VDD_MV_MIN\t\t\t819\n+#define VDD_MV_MAX\t\t\t1212\n+\n+#define CONFIG_VOL_MONITOR_LTC3882_SET\n+#define CONFIG_VOL_MONITOR_LTC3882_READ\n \n /* PM Bus commands code for LTC3882*/\n #define PMBUS_CMD_PAGE                  0x0\n",
    "prefixes": [
        "U-Boot",
        "v3",
        "7/7"
    ]
}