From patchwork Wed Jun 1 04:15:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Potin Lai X-Patchwork-Id: 12866340 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 176A3C433EF for ; Wed, 1 Jun 2022 04:18:58 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To:References: List-Owner; bh=TYqU9aac+Soz5Yq5s32pLlS7ky/IlLvOCHO1Xn83Rog=; b=mRr8Dn2VZf88Om p//h7r/Yu8ASOa9LdjLYd/rVXKnx4goU/c/55v8UzJGSzn7ltr4i1kX2JN0cx/KERTP8HaNRX21sK SRKjPgYxHRdWzoBo5lPXJOo3uQ/7KF+GUq8VmjqHSe3yZIu72THV5EYuR0okYRWeNejDGUeP2krLb eXbZG3A67wa9Ni230HynLKRV3a5m4LkcdlmXxMaTx6rFav6RQkX38T5UZwQbMq2L++Wk7WjOBqsNt GpYeln0am6SW6a6xHc9FrU4Bh8uo2wVe3TvJG63grz5tLnLJhq9YsqFvlT1o9z6sdF4LRp6SFVoQb yxbMNLzJ+Ocq2UZMBe6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwFnn-00DmVa-0y; Wed, 01 Jun 2022 04:17:47 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwFnk-00DmUn-7f for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2022 04:17:45 +0000 Received: by mail-pj1-x1030.google.com with SMTP id v11-20020a17090a4ecb00b001e2c5b837ccso4939259pjl.3 for ; Tue, 31 May 2022 21:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=o/u+GQMNh/HAcOKl3CZKj/1opnd127HV5unYt41+gbI=; b=gnORif3Tpzt3B3qkKnNDkan4+1Zfo4v4jceA3/xRP7EuZGLzL6fIgFLxSezG+RjFix PXLDQIxh56zWN2y4QzD1Q4LpD39iErA3AvKF874hsa/RnPyrEwCBH5VkHuE/jAaQM9bt gR5TzF9COueiSqhm2MGTkIz2TyxozaukKm6tbXpKA5zqB+s1aIH2bBvJPQKgbgpQqJ2i 4RjyVWEHXtIF62jSHUdLkbHHbNPEqXiUOeJ2AgNGB5o0tuMa7KgYpyma+QF+S/KPD8ZU CSyFXYku6245mQeQQMnbxjfli3vMAYnE6dN9UopmI3h8EiobA+m+UhTDcLvOQe0GUrBc taYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=o/u+GQMNh/HAcOKl3CZKj/1opnd127HV5unYt41+gbI=; b=sJjCcqXPS/9EoW14wrv8attqZvKdRam1g5BKTLTQUcZWDieC0+ewmtDtIFCWkQRBfk 1VpHV+I/7N2qqBl5LeOhaoUwkPdB9Ndq6Qo8bJbVUIku6I6lbtjTT/ndMgvKQMfKMUQI FRZ9ZtaG8zd0yOp2JTX9XcUNwiaBQJddYrTi8E8a02pPg5aEyc8V5eV4FNi2CpWNwmq5 CV5WY6j8hcmLdwwNBhjiok1HGBIdIliXp1ADsr1Dhxiq+Qp7PH8BS0hRnlwUsRjZyGia qDPetr2R35/XMCca84RFhWMX0CsXC35FFisKXodAPUidEs1H1yaFPAng6XNvDxziQSwH mgAA== X-Gm-Message-State: AOAM531qKiuSpcXfPa6nyjGWZXOrgkSPuhQZjeK/NanqY9xgKtBCCzB1 zAN+eL3P9VwM26B+ntBgLUk= X-Google-Smtp-Source: ABdhPJyMfMNtPn/D13pgx8ooxUQkCNfMvFyZXZjYayYzm8HCzqrk4SeQsJCDASAy3EEwakR32Lzm2A== X-Received: by 2002:a17:90a:b797:b0:1e0:ad13:ef39 with SMTP id m23-20020a17090ab79700b001e0ad13ef39mr32233871pjr.8.1654057062682; Tue, 31 May 2022 21:17:42 -0700 (PDT) Received: from potin-quanta.dhcpserver.local (125-228-123-29.hinet-ip.hinet.net. [125.228.123.29]) by smtp.gmail.com with ESMTPSA id u11-20020a63d34b000000b003c14af505f6sm290749pgi.14.2022.05.31.21.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 21:17:42 -0700 (PDT) From: Potin Lai To: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andrew Jeffery , Rob Herring , Rayn Chen Cc: Patrick Williams , Potin Lai , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, Potin Lai Subject: [PATCH v2 0/2] Add i2c clock manual tuning feature for aspeed-i2c driver Date: Wed, 1 Jun 2022 12:15:10 +0800 Message-Id: <20220601041512.21484-1-potin.lai.pt@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220531_211744_326444_12775183 X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Current aspeed-i2c driver could calculate a suited clock divisor and high/low cycles automatically, and it try to assign high/low periods with close number of cycles. Because of board schematic design, sometimes we need to manual tune i2c clock timing register to get longer high clock cycle to match hardware requirement, which is not supportted in current driver. In this patch series, we add new properties for manually assigning clock divisor, high clock cycles and low clock cycles. LINK: [v1] https://lore.kernel.org/all/20220530114056.8722-1-potin.lai.pt@gmail.com/ changes v1 --> v2: * update bt-bindings documentation * use meaningful values for properties instead of acture value in register Potin Lai (1): aspeed: i2c: add manual clock setting feature Potin Lai (1): dt-bindings: aspeed-i2c: add properties for manual clock setting .../devicetree/bindings/i2c/aspeed,i2c.yaml | 44 ++++++++++++++ drivers/i2c/busses/i2c-aspeed.c | 57 ++++++++++++++++++- 2 files changed, 100 insertions(+), 1 deletion(-)