{"id":2175661,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2175661/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","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},"msgid":"<20251218-clk-mtk-improvements-v1-6-72db131ba148@baylibre.com>","date":"2025-12-18T17:17:04","name":"[6/8] clk: mediatek: clarify mapped vs. unmapped ID","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"76b3cea35987a12a7c856f0669e111e692cbe379","submitter":{"id":87228,"url":"http://patchwork.ozlabs.org/api/1.0/people/87228/?format=json","name":"David Lechner","email":"dlechner@baylibre.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/1.0/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20251218-clk-mtk-improvements-v1-6-72db131ba148@baylibre.com/mbox/","series":[{"id":485889,"url":"http://patchwork.ozlabs.org/api/1.0/series/485889/?format=json","date":"2025-12-18T17:16:58","name":"clk: mediatek: implement of_xlate and dump","version":1,"mbox":"http://patchwork.ozlabs.org/series/485889/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2175661/checks/","tags":{},"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=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=RbYmu/7L;\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=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.b=\"RbYmu/7L\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com","phobos.denx.de;\n spf=pass smtp.mailfrom=dlechner@baylibre.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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dXHTv6lr4z1y2f\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 19 Dec 2025 04:19:47 +1100 (AEDT)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 0140883946;\n\tThu, 18 Dec 2025 18:18:43 +0100 (CET)","by phobos.denx.de (Postfix, from userid 109)\n id 0FF3B80107; Thu, 18 Dec 2025 18:18:13 +0100 (CET)","from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com\n [IPv6:2607:f8b0:4864:20::c2e])\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 8AD1183642\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 18:18:10 +0100 (CET)","by mail-oo1-xc2e.google.com with SMTP id\n 006d021491bc7-6575e760f06so286365eaf.0\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 09:18:10 -0800 (PST)","from [127.0.1.1] ([2600:8803:e7e4:500:e5ea:76dc:e589:2d5e])\n by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-65cff214d66sm1316372eaf.9.2025.12.18.09.18.08\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 18 Dec 2025 09:18:08 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1766078289;\n x=1766683089;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=/UhaqqpNRQrxTnp5e1pV7AFF7mSUEbz6N+lQDSYUH4E=;\n b=RbYmu/7LlKm05vfE9BwI9ReV3yuxUZNf0n79LVm9NjBTEPXW6uSN4QLr41ZEUYZOn2\n guUAEFQDdtt7JANG1WE1bVbqiyqmCd+mKu4KMb4dC1F9bthaEsKDr9G8mFihARVGj3D1\n Bh1OI7vAHcRhRWsphorK5EgD7j7zFPOHUyLNJdwZD1j0zijbRMAXNWQAtiwKd7ETs0gl\n YVg+SA3I+aDWw0kni0tl6WUGUkOXSb7WLUZ9/VxxElb08nTy5jdSjblQMagD7+R9ZqJC\n 875YLspf4sy1qu9tx0S3NvUreKe2RiMXRfgN+8OmqbsGWk3+qrXaDQKO50BDOP5U+2m5\n mt4Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766078289; x=1766683089;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=/UhaqqpNRQrxTnp5e1pV7AFF7mSUEbz6N+lQDSYUH4E=;\n b=cwVFmTmjCpDXKDT/auqyO00v5B7vs49bhQP+aaFZc3CBxhfoJGnGollBAlw2uEFG3j\n moDOG2to3smtUkDwrxc6vQjpBvuSQNpyIMTOiXPF74Q1Ds1vKwwXdfgqlqAbj3Z/rywc\n V+rPG9IJ2IVwLQ3Qe0TyRP6dnk/I1izgpiElQgT/iaEpB2RaYJOc3SZrfgWqrTHAuRt5\n gNhhKggeKjCLNSIzclLGHEKEJZmTQSLMNHuVbc9TwZrl7b16m6c4Bg6qxs/rSRyMxyKp\n h+j7rSWDUe9bhoza+v0/yNFv3gy1cum1uN8K3yhSNv/O93wj10knp002Gy4CLr8yHUAX\n JFCg==","X-Forwarded-Encrypted":"i=1;\n AJvYcCVvqyH4tN7FYAnAbblGMR3hC0jmGoP34KlAr1iHzBOiAklNJITjJz/3d2pli1RxuiP1Xxj92xE=@lists.denx.de","X-Gm-Message-State":"AOJu0YyYjvHWJdbgqIXKLhIQ1ECVqZ8FVATO+ozriujLnapEjdXou0C8\n TMP+Z9kAbfof1+2D1QFMypoqfvYrpz5vp59aWTejAHIbpjHerW+4rCCjgSIwyyvRXBE=","X-Gm-Gg":"AY/fxX7GD1lK77/KU3P/Z447ZMbTB2gIWO5rpZ2O14fJqLwsXq5tGQpcrlfAYYkWxyU\n hcd36wBkWepwV/dfYQMNbxFCgdsdRvfmgMLeX+m6jJ4vuDSYqnDeyoOfVq2/QqVsUbZWkVSOsQa\n +CD0acg8KOSqkUbV/ZKgkhoT0tl93K7YWFCR98BesfrHUP7qt3ciHHw1po+ApaCtQBuiGVAJ6xp\n Bli2JfyOSGYvH0DFXi4b37VQigXoYHjd4ftyYPh8qO6QqnWax0yuPERp35JXuLxm6LaLSQuasIE\n TrJSuGmsxHWsecPOHtJ6+51caAoNfoppmQoVIsnDtnsKcnK3EGEdwTL2x4OOuHt/HpXBlco6Jfa\n lGmS15xo/i2h50xCZXSra6eG9QYxBCaCOPhj80E2BYJevWfuun3F8vtT93fLjVY9ly4HI9PAOK+\n IsQiOVLJq1cpV/LmQ=","X-Google-Smtp-Source":"\n AGHT+IH60Vn+mK0aGb7dyJ+3Ef4C0VXKz0ozve7dgngONK9mG9ytzGAg0oViYtSXlk4Iu191VyNsPw==","X-Received":"by 2002:a05:6820:812:b0:656:b1c0:7f4c with SMTP id\n 006d021491bc7-65d0e963665mr101785eaf.4.1766078289184;\n Thu, 18 Dec 2025 09:18:09 -0800 (PST)","From":"David Lechner <dlechner@baylibre.com>","Date":"Thu, 18 Dec 2025 11:17:04 -0600","Subject":"[PATCH 6/8] clk: mediatek: clarify mapped vs. unmapped ID","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20251218-clk-mtk-improvements-v1-6-72db131ba148@baylibre.com>","References":"<20251218-clk-mtk-improvements-v1-0-72db131ba148@baylibre.com>","In-Reply-To":"<20251218-clk-mtk-improvements-v1-0-72db131ba148@baylibre.com>","To":"Lukasz Majewski <lukma@denx.de>, Ryder Lee <ryder.lee@mediatek.com>,\n Weijie Gao <weijie.gao@mediatek.com>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Igor Belwon <igor.belwon@mentallysanemainliners.org>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Tom Rini <trini@konsulko.com>","Cc":"Julien Stephan <jstephan@baylibre.com>, u-boot@lists.denx.de,\n David Lechner <dlechner@baylibre.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=openpgp-sha256; l=4102; i=dlechner@baylibre.com;\n h=from:subject:message-id;\n bh=6JDa5+CXGOPe31h+2cUmvqat5YO7T+X+aZKWM5R7fiE=;\n b=owEBhAF7/pANAwAKAcLMIAH/AY/AAcsmYgBpRDc39yYwBcESge8dNK5vWsVPVvw3Nv2z9gNdD\n QEztDhARPaJAUoEAAEKADQWIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCaUQ3NxYcZGxlY2huZXJA\n YmF5bGlicmUuY29tAAoJEMLMIAH/AY/AjGwH+wUDtAZ3rkPzMvD7i+8EJX/u8zxru0CDWrHkqrl\n ydRVHAnAIG4HJavRW/brSk8qxT/4iGUJ9Z+xzWK3qhhk1tJl8CGTTn7RbmjC+LRozcZjP37/pPe\n yKFHMV2nLB0wYiE+dFxWgYqYo2Q8BDDuYrzDmVuzzAjbrOKy1ZEsXhPdplo4dzfKe9E5SImGXOK\n 1qcpeuwy0we+ORieu8YSgI9xlfRnW+vp0sdXASR6AqcN/sx/fRjYkgCjbNca3X4iA0ZdkgvmP8U\n TD6NpBD5Fst6sSlFAiJlXc+WedsFBb9A7Kvla+tbCazB8OeCkkcNtsfcKbcbJqI3I+bkGC/ArhH\n mMUo=","X-Developer-Key":"i=dlechner@baylibre.com; a=openpgp;\n fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03","X-Mailman-Approved-At":"Thu, 18 Dec 2025 18:18:40 +0100","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":"Update documentation comments to clarify the difference between which\n.id fields are mapped (only struct clk.id) vs. unmapped (all struct\nmtk_*.id and .parent fields). The unmapped IDs are the ones defined\nin the devicetree bindings, while the mapped IDs are the ones used as\nthe index into the various clk arrays.\n\nAlso fix spelling of \"parent\" while we are touching this.\n\nSigned-off-by: David Lechner <dlechner@baylibre.com>\n---\nThis applies on top of [1] which removed a duplicate @parent doc line.\n\n[1]: https://patchwork.ozlabs.org/project/uboot/patch/20251211-clk-mtk-fix-dup-parent-doc-v1-1-41816d98f857@baylibre.com/\n---\n drivers/clk/mediatek/clk-mtk.h | 34 +++++++++++++++++++---------------\n 1 file changed, 19 insertions(+), 15 deletions(-)","diff":"diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h\nindex 980d9aab809..915b872ec36 100644\n--- a/drivers/clk/mediatek/clk-mtk.h\n+++ b/drivers/clk/mediatek/clk-mtk.h\n@@ -50,6 +50,7 @@\n \n /* struct mtk_pll_data - hardware-specific PLLs data */\n struct mtk_pll_data {\n+\t/* unmapped ID of clock */\n \tconst int id;\n \tu32 reg;\n \tu32 pwr_reg;\n@@ -70,8 +71,8 @@ struct mtk_pll_data {\n /**\n  * struct mtk_fixed_clk - fixed clocks\n  *\n- * @id:\t\tindex of clocks\n- * @parent:\tindex of parnet clocks\n+ * @id:\t\tunmapped ID of clock\n+ * @parent:\tunmapped ID of parent clock\n  * @rate:\tfixed rate\n  */\n struct mtk_fixed_clk {\n@@ -89,8 +90,8 @@ struct mtk_fixed_clk {\n /**\n  * struct mtk_fixed_factor - fixed multiplier and divider clocks\n  *\n- * @id:\t\tindex of clocks\n- * @parent:\tindex of parnet clocks\n+ * @id:\t\tunmapped ID of clock\n+ * @parent:\tunmapped ID of parent clock\n  * @mult:\tmultiplier\n  * @div:\tdivider\n  * @flag:\thardware-specific flags\n@@ -115,7 +116,7 @@ struct mtk_fixed_factor {\n  * struct mtk_parent -  clock parent with flags. Needed for MUX that\n  *\t\t\tparent with mixed infracfg and topckgen.\n  *\n- * @id:\t\t\tindex of parent clocks\n+ * @id:\t\t\tunmapped ID of parent clocks\n  * @flags:\t\thardware-specific flags (parent location,\n  *\t\t\tinfracfg, topckgen, APMIXED, xtal ...)\n  */\n@@ -132,8 +133,8 @@ struct mtk_parent {\n /**\n  * struct mtk_composite - aggregate clock of mux, divider and gate clocks\n  *\n- * @id:\t\t\tindex of clocks\n- * @parent:\t\tindex of parent clocks\n+ * @id:\t\t\tunmapped ID of clocks\n+ * @parent:\t\tunmapped ID of parent clocks\n  * @parent_flags:\ttable of parent clocks with flags\n  * @mux_reg:\t\thardware-specific mux register\n  * @gate_reg:\t\thardware-specific gate register\n@@ -231,8 +232,8 @@ struct mtk_gate_regs {\n /**\n  * struct mtk_gate - gate clocks\n  *\n- * @id:\t\tindex of gate clocks\n- * @parent:\tindex of parnet clocks\n+ * @id:\t\tunmapped ID of gate clocks\n+ * @parent:\tunmapped ID of parent clocks\n  * @regs:\thardware-specific mux register\n  * @shift:\tshift to the gate bit field\n  * @flags:\thardware-specific flags\n@@ -250,13 +251,16 @@ struct mtk_clk_tree {\n \tunsigned long xtal_rate;\n \tunsigned long xtal2_rate;\n \t/*\n-\t * Clock ID offset are remapped with an auxiliary table.\n-\t * Enable this by defining .id_offs_map.\n-\t * This is needed for upstream linux kernel <soc>-clk.h that\n-\t * have mixed clk ID and doesn't have clear distinction between\n-\t * ID for factor, mux and gates.\n+\t * Clock IDs may be remapped with an auxiliary table. Enable this by\n+\t * defining .id_offs_map and .id_offs_map_size. This is needed e.g. when\n+\t * the upstream Linux kernel <soc>-clk.h has mixed clk IDs and doesn't\n+\t * have clear distinction between ID for factor, mux and gates. When\n+\t * this is enabled, the struct clk->id will contained the mapped ID that\n+\t * is the index in the various arrays in this struct. The .id and\n+\t * .parent fields in the various mtk_* structs will contain the\n+\t * unmapped IDs as defined in the upstream Linux kernel <soc>-clk.h.\n \t */\n-\tconst int *id_offs_map; /* optional, table clk.h to driver ID */\n+\tconst int *id_offs_map; /* optional, maps clk.h ID to array index */\n \tconst int id_offs_map_size;\n \tconst int fdivs_offs;\n \tconst int muxes_offs;\n","prefixes":["6/8"]}