From patchwork Mon Mar 6 13:47:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13161112 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 457F6C61DA4 for ; Mon, 6 Mar 2023 13:49:06 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zec8zZRGVEFJKEfqVcJjdoGoLK4o4uGVjxOJit2chLU=; b=HGmHh/LZEkQJdT uXaYIfiM4C84JUjMOXSIQUKjLEB1ABOPJZcPCePNyaBD0LEhJU1sPtDIecODib3mYowqVAnCja8Fv Sgj9OWCWcYLp+8pQT+/avtScjTjSO623/5m2Ggj1bV5kNzjwC1NnDISTih5Y1Q+nsP0T6qQECzOtJ X3ewyt1NdOJWHMRB8SkYK+6uOSYvQNJ1BOmtNv7YSxkDY97fCDnngn9zBbwGIJrNGi+lFFHVwTZZ6 HxJTwgFgvRr9uVC6lMu0s5PpR/PWerk5cAY97o52TL1+mOhmRNIvqkr59nPseCBuPXGLMg+19lNyU FGtJkriaNgg+dO8CuqLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZBC5-00Cyax-8Q; Mon, 06 Mar 2023 13:48:01 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZBC0-00CyWz-Ow for linux-arm-kernel@lists.infradead.org; Mon, 06 Mar 2023 13:47:58 +0000 Received: by mail-ed1-x52f.google.com with SMTP id ay14so35072765edb.11 for ; Mon, 06 Mar 2023 05:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678110473; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0y6TlObx8TNyu4QXIni+BBvzU+TNoBWWh1Z9MDExTMc=; b=sj2UnyaIejnAXKuFsz8EaFtz4WLsRBgFxdUxB5Topo13/bxnscyMHaITs7rj/1RiPZ SD5sHl6JRM7f4IXkB6xv1J4b68riHe12BKhaEKPlbLrrGj1mdRZ27OXdE+gpdaXkChTR B9AhnjV5mQnvDs4yyw17cTJfAW5jtQXx+Nw4x/L6KnpdC+PjT1MYwtBnVlhp1s9ADgSk d1L+bW0kVlGbTeeJ3/32NRppHnNsV2nAp6yCwOQG6LnOJ0dOGXGfXBLO0L3Xn+bzN958 7K5Ypvfd5K4G81BA8q7NgWkwhFrHYvGtm6nm2+VQQqgCy59MTXbIl+uo53a3S3uCo5Nq QAYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678110473; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0y6TlObx8TNyu4QXIni+BBvzU+TNoBWWh1Z9MDExTMc=; b=iVW2O/8vXavTi7uI8nIWoVxbGfuShtWw7U13CIab2GV1/hgLX59d5BY3nl7jnq3ldF SUbL5WmhV9Hhb4cAcFEG0YTXAZpKxj+bK8V16Dd77LKifoFdOIe9ha2vRLGzOptRSns4 3S7x+b1cdt+Y/7vnGQtoE/ooqfsXGQ7VflNmJ64Eb2b5S0/MCjTD2QkzbzEGNGfgu0BQ 7JX4hPbccmWRnxOL6u4rwE/Sx/56s9LS8U8ZJax7/EIRRrwl9E7tKRAEfYZH1YH/a9Qt BtDu5zcQNjGMaoDwqKzEzJkaqp9RjZd6CandaSmG+qsb2k2s0Cdkhr/Fy/sa9rIEpmkL Y0Lg== X-Gm-Message-State: AO0yUKUT3ixKE6WxMHcZvTLS0251GrtAU0oJuv+mSGcP3zQegwt61Uq+ gYXBru+l9lr/37n2rM60SsLYHkU0hZaTcTgm4hI= X-Google-Smtp-Source: AK7set+pwajWmb43xttdc2wwPFuyjvx337opyoZpPHjSV3d+57Zghl6DvaaCsWpWY+xGL/neh2h1Kw== X-Received: by 2002:a17:907:8a22:b0:88d:697d:a3d2 with SMTP id sc34-20020a1709078a2200b0088d697da3d2mr12874655ejc.54.1678110473085; Mon, 06 Mar 2023 05:47:53 -0800 (PST) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id y64-20020a50bb46000000b004bc2d1c0fadsm5193293ede.32.2023.03.06.05.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 05:47:52 -0800 (PST) From: Alexandre Mergnat Date: Mon, 06 Mar 2023 14:47:44 +0100 Subject: [PATCH v3 2/2] arm64: dts: mediatek: enable i2c0 for mt8365-evk board MIME-Version: 1.0 Message-Id: <20221122-mt8365-i2c-support-v3-2-ad9bb1076d7f@baylibre.com> References: <20221122-mt8365-i2c-support-v3-0-ad9bb1076d7f@baylibre.com> In-Reply-To: <20221122-mt8365-i2c-support-v3-0-ad9bb1076d7f@baylibre.com> To: Qii Wang , Matthias Brugger , Krzysztof Kozlowski , Rob Herring Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, AngeloGioacchino Del Regno , Alexandre Mergnat , Rob Herring , linux-mediatek@lists.infradead.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1341; i=amergnat@baylibre.com; h=from:subject:message-id; bh=57rouWYbJDpjGSrX0WaD+yWCM7skXPMNCc2QzK6z+hc=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkBe8FGEDJjw8jCDD+pzfbtHy3Gqyg/CVb1SO5vcEX gmsfOh+JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZAXvBQAKCRArRkmdfjHURWcyD/ 4z4RX0Lxrn8tRX8IbLQW/N48Svs7bVH70g6E+YXnC6C9ssz3luDY0z71xfUToW3uHSPr9kDnHstie7 j0DZaYi1Bi55JgEnWgDVUTgwXuxHNgUaAuv6qYdy4QpzvcjlPJIDQyjvnkidoltKXn5cS8oFIfNJjq 16TfmVrgsWWLNR9qVRCSS0QeLF1JmZ/x551NTgRHo8d1T/JNbat7vLAlnQLcM1SMYb9AKVLiaO7KVG 8w+k3P9OegKSROlnvQP7qfay+WgFZ1XIgVCXudIa3KoRF5oBv+ib6SqJ7AK/wg573Os6zkv/CITh5u dUZA6UJ6LlH1iXdVESJqR0y2RpVeuzyqUK78ObnAAuIEkggVy1+soI+cgk2uHoVsjXjMS/qYyCfIZr INzJT/rZkWSRaa+6L3DccSnxL5Zgwvs/niCpSAAGrEa/KCxhA3hLh0XTQQ/fZK1VOpQdje/L92OcsH zOsL6NezU4gs3EOhNG4eMEQgSxJEq7qDa6NiKWv6roZBzjVgkmqPnFzl1InWFwL8qBoVVJq20w+maW DgSr+Y+e74nEk85GpJb8Ds10A+IxW0PvZzJ30HrY1Tl72/DHWDAwZaKX/yQREBY+22KT9ctbLhS4vC 3UGqMnSkRQ54Sw1WEMCszYcWoH6PV6m0tpctS6laxJ2+oNXIcLFGjIeS4htw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230306_054756_865012_672BC62B X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the I2C0 bus provides communication with: - The integrated RT9466 Switching Battery Charger. - The integrated MT6691 LP4X buck for VDDQ. - The integrated MT6691 LP4X buck for VDD2. - The pin header, to plug external I2C devices. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 4683704ea235..b68aee8f229f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -87,6 +87,15 @@ optee_reserved: optee@43200000 { }; }; +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + clock-frequency = <100000>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; +}; + &pio { gpio_keys: gpio-keys-pins { pins { @@ -96,6 +105,16 @@ pins { }; }; + i2c0_pins: i2c0-pins { + pins { + pinmux = , + ; + mediatek,pull-up-adv = <3>; + mediatek,drive-strength-adv = <00>; + bias-pull-up; + }; + }; + uart0_pins: uart0-pins { pins { pinmux = ,