Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1722025lqz; Mon, 1 Apr 2024 15:27:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhWfkXC7pUp2yjUZbFgvXURz4zb5o2w5/ZKJ9Q1fWuFOJTXopBHWwiIJq916JSvJqWdeWZSLNyEYFvDtc1g6UeZhOqpC7Ow5vGCv8/Bw== X-Google-Smtp-Source: AGHT+IHytmgEazmUgtkICS6t7n8bgu7NG7M1DSjAx2awfSlM4rpyVI8XyD+6QoYFaeAt9YkW41KK X-Received: by 2002:a17:902:c94a:b0:1e0:e11:c626 with SMTP id i10-20020a170902c94a00b001e00e11c626mr12819196pla.47.1712010429510; Mon, 01 Apr 2024 15:27:09 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i4-20020a170902c94400b001e0e89fa991si10513276pla.249.2024.04.01.15.27.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 15:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127130-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=MVkI2rh4; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-127130-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127130-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2E63E2822AE for ; Mon, 1 Apr 2024 22:27:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2A6C58AA1; Mon, 1 Apr 2024 22:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="MVkI2rh4" Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2109.outbound.protection.outlook.com [40.107.14.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21CCA58217; Mon, 1 Apr 2024 22:25:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.109 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712010360; cv=fail; b=JF1irCrhA9W/Zw20ngBsA7jt2+N3tQXFc8vA+Y3LL/sR5MeKhdaVdU9IckM7MnZAKh3HNu4TS0F4aNC5ew/SzsNOQruFZ/OkGLx+mhq0uMaVeIvJrTeYUOhMEozQGDUeqHdKbYXz9WnpBPvZGjR4FvsZ5ApuU+TY3s+C1liyaX4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712010360; c=relaxed/simple; bh=PqFKqzOaCh+9X9gmH8adyKHBMmo89yE+D+WZJtUo004=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=WCqZ68cIMTRUuM9F9BB9+tirvsgqAyNGph9suBYnWMkMq0bhlBolpRKviFQ8ij/lCzZh/JB4Sb2qOtr8PzG7+DboXEMHvmGBbbiiwM3knRzKTz9K5tSlrY6RkIbB2SkjTcwFL76m5Yk6SWv2T7rLCxtkEjRWdEJn4/BeznMi/3o= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=MVkI2rh4; arc=fail smtp.client-ip=40.107.14.109 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=myBrHfXm2GBI4QEPng40/pJ8G9E2PUy6kRFIwk4dX2HakHNjeUk9no212Cgg6U2kPg38BiwuHeSaFaCDLWApVWns9pfSClhnMcS0fbgcnN0k49LxY1x3lNmKanbx/jcuh6Cko/CjT/BBicIermky/36AwJ8xdIs5BjhEGqwZ33z+wbX3d69ZxH95UBN7cjl0YFlC0KgzHwH6NoXNsWJP3A7NPSZwJNh35CUfrNaXsfLKtvkDpfTDOMDoV1ch7yhb7OU8lTcQkWC123uJAiM6m72MKdGfZhqUFR4WFpY6LrrkxZjcAolFp25nnSenMKXbdg/d43yIr5g/9t0JfrFJMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QT3E7dpZi48J1VSrcWmHxpkF+vwdFoPc2vglBlfmOSE=; b=kJizs2C/+44RGKCKvbWMb2fsi6xIIHDqGW7l/DyZj3AjE0QZrwGONMcirhvwpP2t5AgzHnvv7K0iwa/mI+US5I+i9UUWBQBCJ4NLl6I2WWuv4BjGXb9vlanJYSrZBgMp+K5pYwGFwysF/hBcjLSKd8NDcxj4Eo47T4mQA0wlx+GxORsJhEUlIRYgYCYpKulP7WUh+UwxI+Xn+GSa84jDZHYEUxj1DbB5yN07G/4Z8lBeorOqDHOzrmTCZudw+sm4MMs0gtt2h3FHsDa1FfhqNqpplurB1OWODbFAmEh5E941THcrG0mu1oEXhiWVcy7BCdyIwUmaU/6ZSll8/FY2KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QT3E7dpZi48J1VSrcWmHxpkF+vwdFoPc2vglBlfmOSE=; b=MVkI2rh4rLTg3oC4dFQPLwtRr7qMFUj26VYvPJYSYGHZC/RpstP2m4R/rfyfuSdKg/nusziV+LYwQuUAUc4Q56qM/uv4i5aKkHNyaU9NuftpnsdcmRTYAtaCZXIaCf2qvuB86sSIDR2vDoJXwQoES2Ek3CikBpSGJ6PmmeDM2Jc= Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GVXPR04MB9976.eurprd04.prod.outlook.com (2603:10a6:150:117::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Mon, 1 Apr 2024 22:25:56 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::3168:91:27c6:edf6]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::3168:91:27c6:edf6%3]) with mapi id 15.20.7409.042; Mon, 1 Apr 2024 22:25:56 +0000 From: Frank Li Date: Mon, 01 Apr 2024 18:25:07 -0400 Subject: [PATCH 5/7] arm64: dts: imx8-ss-dma: fix adc lpcg indices Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240401-dts_fix-v1-5-8c51ce52d411@nxp.com> References: <20240401-dts_fix-v1-0-8c51ce52d411@nxp.com> In-Reply-To: <20240401-dts_fix-v1-0-8c51ce52d411@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marcel Ziswiler , Philippe Schenker , Max Krummenacher , Alexander Stein , Joakim Zhang Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Frank Li , stable@vger.kernel.org X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1712010330; l=2028; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=PqFKqzOaCh+9X9gmH8adyKHBMmo89yE+D+WZJtUo004=; b=3HrnBKewz9QWbC9cMMt4OcuPLW46GVDiuX2FoB41ZgOv9JFkveV7BwHN9mTXY2XCxC4OYuRsV 1oI0111dVdlCiPZ/xPhQta0xdFC6HfR0p5uu2HzkzpyZrT8hGDpIAeD X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0011.namprd05.prod.outlook.com (2603:10b6:a03:33b::16) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GVXPR04MB9976:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0kl/BZQXYSQjfZehZYZQYFbKCzTxExmh6otv39/LwM5B6fdYN+zaI+GvJmtN/xz2HGFeHm1quSxpxuNHY069UgvG+QYNuciKQ+w7re+Sj0pVksfRTSn9QfNRbqFRiKwHleE5rBcsFE6XJwQ50eJI3QSP15kLD3c3Yg5s0dYHBRw+3TOQr2fvv7GiXoNvGv3Pla/5tM62SdvnINNJqxdFhjM6slTxT1DzNASx7aABRWgK9X+K1Z0aDKmIlAcYAGCsqL1UmUD3ruGO/m/ERNQgXgdegAvUFe4l3ENPi7aW38rxV7+Sch6KAIbu1Ss1zGh18KxGr0sv9GgZG19Iv21uKOtzLmST/76KTJy1iBOBPLUfNVob+TKxeXE9DwiCWoMdjpiYjzEwU3O9O6DE+wAVlsLNovPx+uuhcYfLVbM7Modkj1i8DvwGRyN/E+aU/2pnH0HnZ52K5S/HxAfg5Co1u4CbQcA9KNtolIK1k+cT1YuMFafp0o6EOwU1KMe9lSgTXls1nxcsQmGzIpQQNrv0mkfnEUaWAB15wpxVbDhNn/8VZ2kw2+TNNEQqH1g7wV+edNjjNGvYxk+zPkl4qFqsMgG3NiN6tStlRuYVc2OArqs87ZcWSdPvqJ3IhCfSnyXCoJ1t8+px9lerihpRsyedLte2ce8RNPPz7ivJgSDP2Da6RYPUT9y21yE1Kxov6lS0GgBX6SivA7Q/Tst6l6CKOZICVdK6foif/A1putPnLzQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(52116005)(1800799015)(7416005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OVE1NWNCZnMzTUJYZlV6bHpieVY1NnV0RjBzUjlqcVdSdVNNcEdHZ090Um1T?= =?utf-8?B?MTdXb2YrRlI4UWhOZUFCblJjK2lSSStUaHplWjBwbWZtZU5wVXRXSkJlNkV2?= =?utf-8?B?TjRPNkNCRWFQNVRhNGQzOFVudC9OVG5IcnpwdWQvdm8vUkFjSllKTnZISTlV?= =?utf-8?B?dXB3MlVCRzdTdEoxbmtjWWpvYll6TitjaXBFdjdublk3UnhjL1ErazJiVS80?= =?utf-8?B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jlFTy9PMWtVL2lWYjh3SHEybWVJ?= =?utf-8?B?MUV6OWtnSUoxWmlPYlJ5UTlaMVdKdHp6K2wwN2pMbjhHVDNpWDU5OVc3eEM5?= =?utf-8?Q?LxXE=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8779785-9b18-4049-331c-08dc529ab302 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2024 22:25:56.2297 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bb60hX+l6TU5Ok/39CUa+2ZiRGVNaHdRGjdozkr8NWzivTMQYzQlbgfLmTtXi71mCC+BjmZfwgxhExyH4cKDzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9976 adc0_lpcg: clock-controller@5ac80000 { ... Col1 Col2 clocks = <&clk IMX_SC_R_ADC_0 IMX_SC_PM_CLK_PER>, // 0 0 <&dma_ipg_clk>; // 1 4 clock-indices = , ; }; Col1: index, which exited dts try to get. Col2: actual index in lpcg driver. adc0: adc@5a880000 { clocks = <&adc0_lpcg 0>, <&adc0_lpcg 1>; ^^ ^^ clocks = <&adc0_lpcg IMX_LPCG_CLK_0>, <&adc0_lpcg IMX_LPCG_CLK_4>; Arg0 is divided by 4 in lpcg driver. So adc get IMX_SC_PM_CLK_PER by <&adc0_lpcg 0>, <&adc0_lpcg 1>. Although function can work, code logic is wrong. Fix it by using correct indices. Cc: stable@vger.kernel.org Fixes: 1db044b25d2e ("arm64: dts: imx8dxl: add adc0 support") Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi index d4637037ba1b6..77ba2dd6847b4 100644 --- a/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi @@ -377,8 +377,8 @@ adc0: adc@5a880000 { reg = <0x5a880000 0x10000>; interrupts = ; interrupt-parent = <&gic>; - clocks = <&adc0_lpcg 0>, - <&adc0_lpcg 1>; + clocks = <&adc0_lpcg IMX_LPCG_CLK_0>, + <&adc0_lpcg IMX_LPCG_CLK_4>; clock-names = "per", "ipg"; assigned-clocks = <&clk IMX_SC_R_ADC_0 IMX_SC_PM_CLK_PER>; assigned-clock-rates = <24000000>; @@ -392,8 +392,8 @@ adc1: adc@5a890000 { reg = <0x5a890000 0x10000>; interrupts = ; interrupt-parent = <&gic>; - clocks = <&adc1_lpcg 0>, - <&adc1_lpcg 1>; + clocks = <&adc1_lpcg IMX_LPCG_CLK_0>, + <&adc1_lpcg IMX_LPCG_CLK_4>; clock-names = "per", "ipg"; assigned-clocks = <&clk IMX_SC_R_ADC_1 IMX_SC_PM_CLK_PER>; assigned-clock-rates = <24000000>; -- 2.34.1