From patchwork Thu Apr 6 21:41:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 80543 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1317507vqo; Thu, 6 Apr 2023 14:42:29 -0700 (PDT) X-Google-Smtp-Source: AKy350YGhZssvBkVvPVrtjWnKosW1AGGVza0IWpJS7Pn+D6/gsiZACrbijFRTH41hOJq12HTB/oF X-Received: by 2002:a17:903:230b:b0:1a1:cc91:c43c with SMTP id d11-20020a170903230b00b001a1cc91c43cmr515456plh.45.1680817349255; Thu, 06 Apr 2023 14:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680817349; cv=none; d=google.com; s=arc-20160816; b=uj3hkbQqXPhgf+GVxOoze4cIiOx9GsEJL+Za0i7v+vSzE4dsKMbSUwsBt0nAqweSAL wvBgpInzQmxr2ud4keQrOLyCv6MShXPv+UzivUHo02xNuL6CsSCV9YtxHZviXLfRIkNP DTD+LiVMmZ9uSFM0kIWo/+NmWwOCzVS0qcrNV1qEtf0DsQ0PGTm9v5iNc9EXus58lsea Panj2FLEolE0h72p/b2YX8NyKHtcI4eni1wlN1u557l0wM3OtBz21ZTlkEofHrKbd66v TGigYGWdo+ZcdXSsLwerU2di7aCtQ1ImTT7x2Jg7vkepXHl85O8vpCjXcSgvrQaGLa8N xn6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=MNo3VUeVBCvTr93etMC8xb2Qm5HnTquhpskeDbfLiFg=; b=iJqk1QR5S/H9J1N1BhEfhNoy6FVgb2pwGfBeAfbpZjE7ZdWr5tZOj78SxmLH3VLf4L SoqWQ70zGn05meyK9MsnXO2NIgOkWG0lVeKJXsu/o7YnwjkZvJGf5sjOWJFSvyw8cEdQ wzQJ7jWP9kT2fTdi6yYSUQ6T7xCjE4pkuGP24Lau3dRl1XL563gN6GzKI12lpmWSQxNv 6RywtClU/Hz1BDBT8XtgMhA5houiCu//6g0gc4Nbgtdcm8ClbBngMmxmeHXwWwhipjXR Z1ivnoZDZ2T4PDVvDENgYeRuaiJcDobHeCbE6N7OZM5/N8ua6oTiwaTTcPzmTsTVXFdU 5CDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v63-20020a638942000000b00513ac9473casi2128215pgd.893.2023.04.06.14.42.15; Thu, 06 Apr 2023 14:42:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237929AbjDFVlp (ORCPT + 99 others); Thu, 6 Apr 2023 17:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237881AbjDFVlm (ORCPT ); Thu, 6 Apr 2023 17:41:42 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64FD19749; Thu, 6 Apr 2023 14:41:41 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pkXMR-0004rW-27; Thu, 06 Apr 2023 23:41:39 +0200 Date: Thu, 6 Apr 2023 22:41:34 +0100 From: Daniel Golle To: linux-i2c@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Qii Wang , AngeloGioacchino Del Regno , Matthias Brugger , Sam Shih Subject: [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Message-ID: <5f611059ba664f912c4c5c6cc859acb9b5121e2e.1680817105.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762464733165797753?= X-GMAIL-MSGID: =?utf-8?q?1762464733165797753?= Add support for the I2C units found in the MediaTek MT7981 and MT7988 SoCs. Just like other recent MediaTek I2C units that also uses v3 register offsets (which differ from v2 only by OFFSET_SLAVE_ADDR being 0x94 instead of 0x4). Signed-off-by: Daniel Golle --- drivers/i2c/busses/i2c-mt65xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 59eaefe999b11..a43c4d77739ab 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -431,6 +431,18 @@ static const struct mtk_i2c_compatible mt8168_compat = { .max_dma_support = 33, }; +static const struct mtk_i2c_compatible mt7981_compat = { + .regs = mt_i2c_regs_v3, + .pmic_i2c = 0, + .dcm = 0, + .auto_restart = 1, + .aux_len_reg = 1, + .timing_adjust = 1, + .dma_sync = 1, + .ltiming_adjust = 1, + .max_dma_support = 33 +}; + static const struct mtk_i2c_compatible mt7986_compat = { .quirks = &mt7622_i2c_quirks, .regs = mt_i2c_regs_v1, @@ -516,6 +528,7 @@ static const struct of_device_id mtk_i2c_of_match[] = { { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat }, { .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat }, { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat }, + { .compatible = "mediatek,mt7981-i2c", .data = &mt7981_compat }, { .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat }, { .compatible = "mediatek,mt8168-i2c", .data = &mt8168_compat }, { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat }, From patchwork Thu Apr 6 21:41:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 80545 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1323208vqo; Thu, 6 Apr 2023 14:55:31 -0700 (PDT) X-Google-Smtp-Source: AKy350YegdyQq9xhqZjKDAtrdTeZE1jb0IZvqlaHbM+WpPjD1Oimn/3Z9sqnvsOcKNQSKfkrum/N X-Received: by 2002:aa7:9608:0:b0:627:ec37:1e69 with SMTP id q8-20020aa79608000000b00627ec371e69mr378734pfg.8.1680818130775; Thu, 06 Apr 2023 14:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680818130; cv=none; d=google.com; s=arc-20160816; b=hJA5aRn8GOjwrrJH3Q1r8KJ2E4KvNwSs7apI7CaAWvdmqDCovS6JiiFAmtJyaP/bxT XEXqRyIn+ag85SIZhjH+4F057YhKKw33yS8HnTqN0WCt+3T/NrcftlrUWX15zT4SYnPy ezng48D/wwi1VyzKjTB9BbZT9mjxiboQVT4Vooc2mVAAAY4TGL4K00KKjcqx8YX6j5Ui FvBa0K20U0iA1D/hRjeAeTnNzkoRWDrGANnH5bQNwidUcuVvVD+ZVtt2j1BwGZrLAm6k lUTNmLMsWBdAx2mtjYr0XqFrgvj4yfnaIC6j6HaF3CuZGTwwqvVUn5c2ASIfpfcjGUPW llEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=q7QhaMnGErrxER73ipt/TuA4sV5dJsR9zfTYex5jmyQ=; b=O44QhPUC3cDeia9NEWiGQbNJTt+CHd+XFLNjeXyifDWJBy1DrH13nWSr9fkkR4he2V DxPOOZ8IsvzZcYBUkQ2PceZj6VMHWBFMJlVJqS1mYhUxX6e7ws2/tgSTrNySUr323D+n nDlUmHiYweO0u5tUzlzn2PuvsExRM9D7/9CD1QsOp55B+90mCSardr4n61MlSom4Ej09 eFcbjn4oegzLTGBmuSv/jm+uqoSkoQL6YCRfLRAt00+rgUEsamAnOX813Jf9ucH/CJX7 3yneymMwtsfsajhiI0ZMX6UqnBk7qN6P6mw0g+/DFhcSCATiIs2DT4ETR1eVmu3/6fTd UIIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a635846000000b00503059b8b2fsi2146466pgm.220.2023.04.06.14.55.17; Thu, 06 Apr 2023 14:55:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238258AbjDFVmC (ORCPT + 99 others); Thu, 6 Apr 2023 17:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238076AbjDFVl7 (ORCPT ); Thu, 6 Apr 2023 17:41:59 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876618A7F; Thu, 6 Apr 2023 14:41:58 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pkXMi-0004sS-1K; Thu, 06 Apr 2023 23:41:56 +0200 Date: Thu, 6 Apr 2023 22:41:51 +0100 From: Daniel Golle To: linux-i2c@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Qii Wang , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Matthias Brugger , Sam Shih Subject: [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC Message-ID: <31957e15116027afd154f0d91e799028e2400bb2.1680817105.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762465552182106329?= X-GMAIL-MSGID: =?utf-8?q?1762465552182106329?= Add binding documentation for the I2C controllers found in the MediaTek MT7981 SoC. Signed-off-by: Daniel Golle --- Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml index 685da4df688d6..fda0467cdd954 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -23,6 +23,7 @@ properties: - const: mediatek,mt6577-i2c - const: mediatek,mt6589-i2c - const: mediatek,mt7622-i2c + - const: mediatek,mt7981-i2c - const: mediatek,mt7986-i2c - const: mediatek,mt8168-i2c - const: mediatek,mt8173-i2c