From patchwork Wed Oct 18 15:48:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13427265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFC28CDB487 for ; Wed, 18 Oct 2023 15:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V79jh3ZNtlaeNwZAIG7HGFrIaR82tQJVypOEM2ZK/MQ=; b=t765sHDKgGF15T i9Gr3FzgTy4oXOXcvN1CT4zDepF1blmulqIDNr7Q983/bQb1wONrBLoxkVeSSPqJ1zwcbjkrM21fc synq4zx4Gs7VxOTr/F+4GEdYJzfORglDNhm1pfMkM/FgOol/yhqWnOKt7wyCnFGlMVgOIeNQOxm54 jkFttAUoUvzqbwXaa+k4WW/nlRT8XWjmoWwny3hyo48YVdwW0nYbGlJsxKhOwl98xBJj/YqPQgt// g1HQv18VYPuP+FOrBCrseTImeIfY2nZD6l2VukVIE6JBqIWCeHIzBYRwn9qSwkINEmzLs9tj8sSbz I/l0Io3ficg7Mx850avA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt8mt-00F6Fc-1a; Wed, 18 Oct 2023 15:48:47 +0000 Received: from mail-db3eur04on0630.outbound.protection.outlook.com ([2a01:111:f400:fe0c::630] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt8mq-00F6EF-1k for linux-i3c@lists.infradead.org; Wed, 18 Oct 2023 15:48:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VeVPXoPmzEKqhb1UD1I6O1BpPbUmY60nIiXpoi1T+kMu9rMSacmW75LaqJk7Pxan+p/2kk3nkCBA280/GwOKt6Cpemq+gnbkqq/9jjjg/wsVX6NYMIED0x6PWGjBwwd8sJ1HzxlaJhYBP17XB9lE7xY6ToHVc+bK7FwJWnZFNZhDwJ/XrOE7mKmN90i3GI55JAbGZCK8P9EGbGEkrg5q9c5mQaN+Xy9C5KvIP/chJRYkxJoY7Xzqo4C5nNST69JZzQUcRnigCIVvwTbo4CDJBIsAtcRMiwz7bD7knlkZhX8HJeG9qn38vCr8bw7ELlbF08TpjwTwR8rBZfY/YqlnRw== 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=zxJI3Q1/N120E1UZrO8OotkdCQQ9CDow6ekaDNU32Hk=; b=GmmsaLbhFTkvb4RmI9wEpdqsOazmyfFK5HbZc5iFD9IzXPh+gdTreEGtjFfbQg2o7Ce8UhswfsDkqUk5oxyFV9paRaGhcmxJX22XYr4Iw+0/daUMWnU1p/m17IM0DDkS+vTxja59dOz8ESOp9VDkXU11jSRzjV0prC9EUJF2Vyk20P+/4wl4HWVJ5J+x+XpGOgYJVtFvVNQF68wiM7db2aT3Vp/LIbkmP9iZxztQDk4UgrjgHgsvM1Z7ekFh8Gn3GROQyZxLVfuO4dpIfPyNDCLOM2TIVXHttR2lgpUlGxbbT9/VO6n0Kalbkzf1k3wCoX3wJrwG8IPZ+qIvSytEsQ== 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=zxJI3Q1/N120E1UZrO8OotkdCQQ9CDow6ekaDNU32Hk=; b=Jg7E+gzUMtn9lOTW/Txv20o63KVwAzPrGp5Y8G7L9hr65vjuUFfgHUUlV4SRXpp9wdmQUtZPQZgqKimjeZ4vuY8mioMWvWwXJdUIH4NugbmUxa6XZPmMl6pfxYc9TsD5Cgrpz3xRutzDO8fpHhvYZtD4wK4yB91CpKBoJiCzAqs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by GVXPR04MB9777.eurprd04.prod.outlook.com (2603:10a6:150:115::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Wed, 18 Oct 2023 15:48:30 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6907.022; Wed, 18 Oct 2023 15:48:30 +0000 From: Frank Li To: miquel.raynal@bootlin.com Cc: Frank.Li@nxp.com, alexandre.belloni@bootlin.com, conor.culhane@silvaco.com, imx@lists.linux.dev, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/6] master reduce clock Date: Wed, 18 Oct 2023 11:48:04 -0400 Message-Id: <20231018154809.3304558-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018154809.3304558-1-Frank.Li@nxp.com> References: <20231018154809.3304558-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR03CA0087.namprd03.prod.outlook.com (2603:10b6:a03:331::32) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|GVXPR04MB9777:EE_ X-MS-Office365-Filtering-Correlation-Id: 1df620a8-decb-426b-4e5d-08dbcff1accd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jh8fCvz3YuNDbuzIcsSuT1HBiXw3B/sigeNH2bk6SioXZJ1JXI6Lskqa4p4QWhl4Mz1Aw/YIDwEgLpV1ytRC2+Grg+bnmJV89IFtgRnJ+iSnrqacbR7QskDEGfkRhn44ZfX82sCQyDwydD7xz8FW48TuYuZF3pRRh9u9G/sPcmhd/KH1u24fPdDe1zQMqikszBJSA9IANKgNK4ZQNrJZN2rjqxvPKEBH1hBn3Ip+BMP7/2VCBB/tkR29XhVLNRs73RS6WTqg36e6HodPBrNEj99zB0uFPRRtGyRFHgR5L98yqyf5+I9nSc6Miwb6ny7i4TZU82d5czT0aAso8IiVJlmAJ7u06sOObQm1M0RyMRKCSPNPfvCV7ui7xC7XGJtmPOBTcaGo74iWuwscCg4U0kM2BRJjxCya0Mxufo1LAU/stOQ4+d1sxO/OyN42iP7CrDEfCqba6Kuf5Zo41nRCGSoZbdKAd9ZYWsZ8jzquJOM6iUs5felaNkF4Wgp0+JP1Zl35Vu+L/8WhlWFawIofWQr6MLjRSxL2yERp6eFVNu4BpxdlvbmPmVfaXkuEheWLQpLCi6ieOG7PK1cvRiXnMnMSKeSVIN97O+oFnRdDtnYjyF35BxvuFbIZ36GIxjyJ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(136003)(346002)(376002)(39860400002)(230922051799003)(64100799003)(186009)(451199024)(1800799009)(38350700005)(52116002)(6666004)(6486002)(6506007)(6512007)(478600001)(66556008)(6916009)(66476007)(316002)(66946007)(36756003)(2616005)(1076003)(83380400001)(26005)(41300700001)(38100700002)(5660300002)(4744005)(8936002)(4326008)(8676002)(2906002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MGWecXSVnYbtX+HD9vWj9hJAve/wIzvyRBPe09T5163aP8wPuxwl4SsXpErmPdtDEQiAakvMzipc0DcYLEYLuC7Wxnv+xR8reRItQHdkxPqqStDDtgQjki+ZKWpXX2QP93NRVKhfcdMdwp/e7SETMietj00wsCcfQ2Av46VPBZAzYMe853Qlg/iYEV6RGEqpAlcX0kiPcz4iud8zwjybeaxcvy6A+6O+yHQ62fm/HJI5dSWWOrJPQvGYHNkwtgRzi3xoVlBgBJq+s+3oOv6jIE21nCLlhfuV20v6JP55IDTNedEanlQpPwseDZRKt9QY1S4OcbHCOChg66KBGrZNb8KClW/drZfAhx4ab0WJKiuIwoxN4zZvbPqg/CLmdkHoUXBOd7hhK7Qz2cFtU3mLttJlOHxslC5DVvBGbas5a581PsxfVRgc5eK4aJ5njJ0AFPTnXChoqFWwpGOOnHdSxWadxW+5Jg/zHUnQvCBDBr9bNQG+uo266lZ/9U635DvYeNInwKEboetMOIDI73AfQ3RHhc5Ahh8gBDVTwtjJsYMCrhCibxKP6uhh1a71VhJSNgQz5Wny9h0+/bib1HnXNJiN8NBOPzJMwdT4z5EA+hmk3BNWG94VmL5/1TE9FgILL6GpVWg53YaCe9P6dC+5GXl4nP8GNMZ9kMiG64eRV9DsfBjlmw6t4ZqSphCv5zbIyvluhQ5sMtO7kg996Rt3AgDi8VGhot1PhNN8e8f+kT068nPrryokAK2PJxpO4+RiXFWACksY+CpyzIx0WaKSIMZVl+VlpN0aU4md3oLN/NBjZdlGrZcbxhYqH1pkm6ltdmdkUd01N/CNwqxPRfum9jZi49ipjj5F8sOdvb/VJ5VJSbqYb4Hh264pUjYOrxpLeyrCZiQIcHE8jPclyXFJURq/sCfFIBGO20sMXYLTzfrn1NhgTkK57hLS79KrMapHM+nMB/7gzIzBhv7uZlHLR1+wT27Wd/Cabk7F8rtW9XleyVVQw6v60rk59lajTKBNitaTlC06z+HXZTsbC5qBDJi/BnnKUl/B6gyjeVv46qvFLiKNCKKlRUJRIv6/2Lc7hL81xPRjMh1eEbPZnHL2QAJWCdnhG/haRiXkz1mgxeZAdDWmdXToWLAY2IrXV0//8TiIwNJZrdxH3b3rlQ6sBh1bfIekLukETKI4iVC5UJGeMAkWKwV1knyRzrxFQjV/Uj5x6ZHlLqc41GNlYX1A7uPBfrthFtw3a38YZnEE757NIaSEkGghNQR0FLjeOtTH2YYDE2PiQfW2w+hoTJ58NBVsJ24bB4oe/6Pgv6848ertI1xgjM6Kv3XAh8AQU48er8gYINZ6x5yjdpUiliwnUW/fL2Y/ne4FtGIL7mUBfL7rHoS4dDDqyBZ7ZrHT2VPasG2dTR55jRwY0d3eZ1Vn85z4NkksRWqzEywBKxnq3cH9590283YxfoJjJnC/STTpZ8/UC/k4NFhFMXM6zZviGZoa4gy9cP4NwsxjKq9zTrFW5EWk1IQ0THuCtMBrxd/kIq3dEhQZqPW30DG/ExvGRlwT1qbC1DSIL18ZW08aEHhsj8s38gMcakqkFvIjvUXD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1df620a8-decb-426b-4e5d-08dbcff1accd X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 15:48:30.4182 (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: xibRjJmgC29NjHX7sScLMVC4j53lD2TTf5XEpTpQhg05xdFJGO+qZTc0QwJwIsI4TluiSGRRcpvb2twirTmghQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9777 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_084844_580844_5036293C X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org --- drivers/i3c/master/svc-i3c-master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index e307ba2b965e6..d29de5fe533e6 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -511,7 +511,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m) * Using I3C Push-Pull mode, target is 12.5MHz/80ns period. * Simplest configuration is using a 50% duty-cycle of 40ns. */ - ppbaud = DIV_ROUND_UP(40, fclk_period_ns) - 1; + ppbaud = DIV_ROUND_UP(500, fclk_period_ns) - 1; pplow = 0; /* @@ -521,7 +521,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m) */ odhpp = 1; high_period_ns = (ppbaud + 1) * fclk_period_ns; - odbaud = DIV_ROUND_UP(240 - high_period_ns, high_period_ns) - 1; + odbaud = DIV_ROUND_UP(540 - high_period_ns, high_period_ns) - 1; od_low_period_ns = (odbaud + 1) * high_period_ns; switch (bus->mode) {