From patchwork Thu Feb 15 22:07:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 201808 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp159432dyb; Thu, 15 Feb 2024 14:29:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWK0OFZGRIiNuMrODPwdeR60sT0Va40sX005SmDxXdFjEhSz+BUDj2UhKcDkNd0k9nhBUIcE7gA9M8JXb2qosL/QDEoLQ== X-Google-Smtp-Source: AGHT+IFqUcCV8ylB36qPPh8UGZkeNvPiU3t7Qb45TNen3HxSu7OCjF7RPw53gAkUxyMj/nX/aMqi X-Received: by 2002:a05:6a00:23cc:b0:6e1:1cef:3aa6 with SMTP id g12-20020a056a0023cc00b006e11cef3aa6mr4064535pfc.23.1708036170360; Thu, 15 Feb 2024 14:29:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708036170; cv=pass; d=google.com; s=arc-20160816; b=D+0Q4uWjeH3tVp2YYQsGKhOCprsbW26Zf2nKQoGCryaaSNP2ocwptrG2YFyNKwAtoc /iCLj3xbxj/Iuz0pUL0kssG58fZvKwwv2pzBD4B8oHaalrGamES85SEbztEiOsvGVtrK 0Qae8JcIdGwIE2AyRehmmsatrncodOc0h1A6oy3IAOyVt3xVtGu9FP+43Tf5T5SUzz7o EgTbzs/vfipe8L9GrmdZ5XtieblZaHRc6mDB+8Z0b0H7omiVTWs/HyMpuzwVq2x0Fio+ N6UCtQOJVfpI7kGuEMJHScKglpLaSvzzyWWW3F/vk/k9JylOyd1mjf7zXXFPTxNFXzAy ds1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xd7lrsen2it77yQmo7Ql0gP9UsW8IXDRnS5i0NzUgnI=; fh=Usz7XAB1EI7Q/DdLEXd449E1MLGpSzqdCCNe5XKh9R0=; b=gxwut8tS4GjrMsyAZDg/VQSfwtXP9kU5C2ILQmetbscNDbK+MD4cM4CPw5j0+M2FcY 14PTpmgQuRHm1yK9BL9q+qgV4+R4usWuxMJ72jgWgs6Wj7TOP7gf+pCO9OjXcSH+bNJN bH+gbkmS/VK2l9wjk3xBmW4Mqn07B/WC1M+WVWkBRdpKWx/Hydq+NWpEaA0AafN4U8lF 54c5gtgUGb7D+31dOEgGHBldLvB3arSRKmHF/buYvYuLf3Xbn17RTZ0VzvniAIdHOA/t B35G9MpppPF5vnOvPGfCepEe+f8eGmiaTHnR1BoZE8DpnxygA2puZujVCLthA92Nj88h cnGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=idf+UuKk; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-67765-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67765-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d127-20020a633685000000b005dc6295d185si1828032pga.495.2024.02.15.14.29.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67765-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=idf+UuKk; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-67765-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67765-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 85DBDB26620 for ; Thu, 15 Feb 2024 22:17:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0BDC14534D; Thu, 15 Feb 2024 22:08:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="idf+UuKk" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 6EE2C151CC6; Thu, 15 Feb 2024 22:08:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034919; cv=none; b=eoBxFxruQUV+xU3FC99/ugGuVX/IZoNA1+d4ceKJnuzsIlQlO3j/7LXqS4JyXJ7dZHKD1kUoudFydRQpn9Tr4Bn0Yg0MjEbZpbbc3CvfLFPXdFwpBD7Jzs48tiMv4iRUzZjlX8Nf62Gr/a3unwMise5bzN4/VczFmbAmUuOanIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034919; c=relaxed/simple; bh=lblN2MxrNHftFgMgHVzLgv+0vLc3TPzvtG1g+PjEmhs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZzAZuzqq982DrX5k/kRX/bY7PKETS9wrxWr9pwFFHyKiMyRzfATWEtwOLtdViA+dc1EfsaDCuBhGXqZAg3OehBKt5DUzk468zBENNDyeH5KkEItdU3BTLG6EnKeZ9kOpRru7BL6ZY/lBm/MGvGKgfLcxdQUX+DXRodyWOTYYweA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=idf+UuKk; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FLX1AO019281; Thu, 15 Feb 2024 22:08:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=xd7lrsen2it77yQmo7Ql0gP9UsW8IXDRnS5i0NzUgnI=; b=idf+UuKkauTb1zwU63vMpUta0cjhC50VLLdP8iR5kWnep3iuKeUJJU2evqtEwBy7EiUT eC3B1BwEC3Pv6AtXyfXnrvr3gQQAKFedcypris9f/Mtc0oBvGWIKEPjBmhwGJgtveLZu v4Lgt4nto1wJNeqoFn/umcvztNZNRlZfAFkgxOVqQRdCzoMzDvb6p7feYGYf69KJ5axD 8bVNKCaDZ3QIvQUZAD+GRfw6JyJs+hTUX5Xu5/YHDfSumtzyBBgE+16LazpcluTHlcrU h+fiGxL24rR0QYhiDxF0j3phHSr5q2qO8d9mZMWHh/gZOAcHGj3x7pBf3BWMo9EcBMoa kQ== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w9tmf8mx8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:08 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41FLKApd010063; Thu, 15 Feb 2024 22:08:08 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w6npm7811-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:07 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41FM844v34865452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 22:08:07 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF2725807A; Thu, 15 Feb 2024 22:08:02 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6CEAC58072; Thu, 15 Feb 2024 22:08:02 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.14.18]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Feb 2024 22:08:02 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, andi.shyti@kernel.org, eajames@linux.ibm.com, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, sboyd@kernel.org, mturquette@baylibre.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Subject: [PATCH 02/33] clk: ast2600: Add FSI parent clock with correct rate Date: Thu, 15 Feb 2024 16:07:28 -0600 Message-Id: <20240215220759.976998-3-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215220759.976998-1-eajames@linux.ibm.com> References: <20240215220759.976998-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: qu9m3EEKVKG-DGbpYkJKjIZdu1nYUI1H X-Proofpoint-ORIG-GUID: qu9m3EEKVKG-DGbpYkJKjIZdu1nYUI1H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_20,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150171 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791005735321119944 X-GMAIL-MSGID: 1791005735321119944 In order to calculate correct FSI bus clocks, the FSI clock must correctly calculate the rate from the parent (APLL / 4). Signed-off-by: Eddie James --- drivers/clk/clk-ast2600.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c index 909c3137c428..faf88324f7b1 100644 --- a/drivers/clk/clk-ast2600.c +++ b/drivers/clk/clk-ast2600.c @@ -19,7 +19,7 @@ * This includes the gates (configured from aspeed_g6_gates), plus the * explicitly-configured clocks (ASPEED_CLK_HPLL and up). */ -#define ASPEED_G6_NUM_CLKS 72 +#define ASPEED_G6_NUM_CLKS 73 #define ASPEED_G6_SILICON_REV 0x014 #define CHIP_REVISION_ID GENMASK(23, 16) @@ -157,7 +157,7 @@ static const struct aspeed_gate_data aspeed_g6_gates[] = { [ASPEED_CLK_GATE_UART11CLK] = { 59, -1, "uart11clk-gate", "uartx", 0 }, /* UART11 */ [ASPEED_CLK_GATE_UART12CLK] = { 60, -1, "uart12clk-gate", "uartx", 0 }, /* UART12 */ [ASPEED_CLK_GATE_UART13CLK] = { 61, -1, "uart13clk-gate", "uartx", 0 }, /* UART13 */ - [ASPEED_CLK_GATE_FSICLK] = { 62, 59, "fsiclk-gate", NULL, 0 }, /* FSI */ + [ASPEED_CLK_GATE_FSICLK] = { 62, 59, "fsiclk-gate", "fsiclk", 0 }, /* FSI */ }; static const struct clk_div_table ast2600_eclk_div_table[] = { @@ -821,6 +821,9 @@ static void __init aspeed_g6_cc(struct regmap *map) hw = clk_hw_register_fixed_factor(NULL, "i3cclk", "apll", 0, 1, 8); aspeed_g6_clk_data->hws[ASPEED_CLK_I3C] = hw; + + hw = clk_hw_register_fixed_factor(NULL, "fsiclk", "apll", 0, 1, 4); + aspeed_g6_clk_data->hws[ASPEED_CLK_FSI] = hw; }; static void __init aspeed_g6_cc_init(struct device_node *np)