From patchwork Tue Sep 26 23:48:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 145095 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2297095vqu; Tue, 26 Sep 2023 18:04:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6J31+MU7qs+eHui1s84Z6fPVaGfG5pBFTGGzY553EWE23z/WfPefHA1a59fHK/I7AXog9 X-Received: by 2002:a17:90a:51c6:b0:277:3565:30cf with SMTP id u64-20020a17090a51c600b00277356530cfmr6409376pjh.6.1695776665994; Tue, 26 Sep 2023 18:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695776665; cv=none; d=google.com; s=arc-20160816; b=wCaXJECY1hDcxEsRNc5AtlwcVAtCnSUNCBOTq+Cz0mURre5ghNP2RtMqpV1Q/Gijlt j0ov2fTR58FC9ixC/fnrrJWYcVRNdfmEBR0Go7PaxMMvA9n/obrCwzSHStAqZRxSCRue XR9PTHpl9OYMmq9Kd+0FJj+9SJK5EGCqYBAUToyUEb5B/EhjFMFXZsg5oSZD9wQ1HGGw iMxW6ETlxioo+pk7felox1J7ShEbCngGk248os5TFgbn3tBtaG5IV5Im5S5b+cxmGjtw RhzHYbiJHItWZObTJxrVYvNlZWpQOe4cNkHYpaGoO26X2lF+jzOZBI3saSmqaF0rPt6J u0Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ttASz5PFIq45SB63T27urLBr0KsSG9UVkEiGsDKUa0w=; fh=HVwtvmm9c22OJQLCUZL2inZSf9v419gurWyvDvs4c/s=; b=e9P34Bq/Hfr7PdJQzyzFQh1KXrQwXF3m0Q2X4R6zNCflDr9QLrG9GHouwJQ2VXsMhL WNbIopQVKSohyFJLg0DjpR0PWQrUcz/keThc1n5CEQF4A9+OUed6IlvivZDP7LlUyWmK UrN6yMNH6Q+E2KIZDMjmu0XRP8aNraZMtXDoQdh2O844qOvmMdKw2aDKZBYyiQWMclgO n6/bfKbj4F+90jnQRsRkgwnTeX6pi9DctuYKuscz0c6NorhtMIp8RYdWJy9XSxXP2tz2 XLJLhGm+2q+chmP0vxFBJGedLaQzfsq5GIEPRsy+PT+jvxSpZCCJQPS0Ik9GEswUGRgA Stdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=HTBhQarC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id nu17-20020a17090b1b1100b0026b7f68f386si2065772pjb.73.2023.09.26.18.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 18:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=HTBhQarC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2D8FD8032A36; Tue, 26 Sep 2023 17:39:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232502AbjI0AjM (ORCPT + 28 others); Tue, 26 Sep 2023 20:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjI0AhH (ORCPT ); Tue, 26 Sep 2023 20:37:07 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A9591FFD for ; Tue, 26 Sep 2023 16:48:10 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 20C8E2C034B; Wed, 27 Sep 2023 12:48:08 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1695772088; bh=ttASz5PFIq45SB63T27urLBr0KsSG9UVkEiGsDKUa0w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HTBhQarCGGfFnRSdJCnky2YSbcTl+qyjwVfmi+HBiMth8EYBWBfNJ4RzYE/SDYT26 jOcTffu9HR4ylyOwI6rmQqSHVXsdVqetBCYzgSxAiyJ34JUMlG7mOVTTDNUL6JJMMS 14Fqf/Vmn5mnvx1WYH5000jgIyg0M7Uu4D/rM72reA2jOvCBqnvht0Yz6kkrJBEKrb YIPQWR/eH3YF+cwp5hnnrJ1aadmFUWVuAX6lPPpDXc+09ne87y/3YB6hojixPriNyE m9PWxmEyJhSz0YaniC5SEpkM9bw+G+UI/mQehZs3zEEYjWxTA2QS02xSSOF/TDXP9W i5jbFbEpq0hkQ== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Wed, 27 Sep 2023 12:48:08 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id EBCCB13EE85; Wed, 27 Sep 2023 12:48:07 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id EAC4D28160F; Wed, 27 Sep 2023 12:48:07 +1300 (NZDT) From: Chris Packham To: gregory.clement@bootlin.com, andi.shyti@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, pierre.gondois@arm.com Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH 2/3] arm64: dts: marvell: AC5: use I2C unstuck function Date: Wed, 27 Sep 2023 12:48:00 +1300 Message-ID: <20230926234801.4078042-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230926234801.4078042-1-chris.packham@alliedtelesis.co.nz> References: <20230926234801.4078042-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.3 cv=fOpHIqSe c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=zNV7Rl7Rt7sA:10 a=Jm_8IDygZZvVWM1ZSnEA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 17:39:37 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778150713295195227 X-GMAIL-MSGID: 1778150713295195227 The AC5 SoC supports using a controller based I2C unstuck function for recovery. Use this instead of the generic GPIO recovery. Signed-off-by: Chris Packham --- arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi b/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi index c9ce1010c415..e52d3c3496d5 100644 --- a/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi +++ b/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi @@ -137,7 +137,7 @@ mdio: mdio@22004 { i2c0: i2c@11000{ compatible = "marvell,mv78230-i2c"; - reg = <0x11000 0x20>; + reg = <0x11000 0x20>, <0x110a0 0x4>; #address-cells = <1>; #size-cells = <0>; @@ -146,17 +146,14 @@ i2c0: i2c@11000{ interrupts = ; clock-frequency=<100000>; - pinctrl-names = "default", "gpio"; + pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; - pinctrl-1 = <&i2c0_gpio>; - scl-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - sda-gpios = <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "disabled"; }; i2c1: i2c@11100{ compatible = "marvell,mv78230-i2c"; - reg = <0x11100 0x20>; + reg = <0x11100 0x20>, <0x110a4 0x4>; #address-cells = <1>; #size-cells = <0>; @@ -165,11 +162,8 @@ i2c1: i2c@11100{ interrupts = ; clock-frequency=<100000>; - pinctrl-names = "default", "gpio"; + pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; - pinctrl-1 = <&i2c1_gpio>; - scl-gpios = <&gpio0 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - sda-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "disabled"; };