Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6388184ybl; Wed, 15 Jan 2020 03:56:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyRL7mbxoRsYUAcOfEbk8yBeGV1NQrtDZQA/zXePNrhkWSDrXzRNtfu2tFkZh5S1BMTD8qX X-Received: by 2002:a05:6830:2361:: with SMTP id r1mr2339390oth.88.1579089360187; Wed, 15 Jan 2020 03:56:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579089360; cv=none; d=google.com; s=arc-20160816; b=ay5vguZoyu4LhoOYG1msYMbi2Ddokfspgmwi8/o1b9ASOYNNMIMBWY1fSAfRWTY1qj MvZnd8UwnVOAD7+G4nq4JP/Eh2/Zl6l4Y4YscTNjnGw/PUDCnPmow4hTgwxqAJcU824A IvzMMB3Xituzx9ioSj0JWvpLkl59JWDELUgbB8rAZaWV7mVhQZ2AA+c98sK5ixj8f+Dv wdp7FRqcS36wRfnVd+MSuHB7MssT/Ktx3csGU3Y+NFJouAg5O5ThX1N/FrMuWZugwOMc srU/GdTik9tgNVbq+hKuE5ZG5eD21HuZKEE8HcQQPARDogxwRGbzqzx8bAyA1SO2zv29 2fjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr; bh=nsKm9m97UdERVhschRSHB/fojteLml1EgBJjAlL0wAs=; b=txGmEjmQt7UvFBj5SGOQCMrucZGeP4zgAJWvY2qxq+16ak2YE/FVJHecxL4b7WQB34 PyAn4BMdYiL4Mb9Rm6sBwyN3s5M1ktlQqhFz/W8QrmUrdlxMTbSuOYjMK7yzUVDSAVvL fgo9KgJy6ifijvA+KuO3Ot0vJPjng6gvsmfAjWqVC8gaA6Am3HF0Vm91bpnvhQH2X6kJ 4m5czjovX+npfrVWJFtBtRc7osBHTv6eIKfAGRPxNM5iwkwzdysTzsBcNRFO4PSLdYp7 HcDHD+ZC3z6cyL5MLWcQ0ntASdIEGeUvgb7MO4IN4vrzi8bU7V54YhuDn/9DnTmZdjgu dnsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i124si9345441oif.214.2020.01.15.03.55.47; Wed, 15 Jan 2020 03:56:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730232AbgAOLyq (ORCPT + 99 others); Wed, 15 Jan 2020 06:54:46 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:22077 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730150AbgAOLyp (ORCPT ); Wed, 15 Jan 2020 06:54:45 -0500 Received-SPF: Pass (esa6.microchip.iphmx.com: domain of Codrin.Ciubotariu@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Codrin.Ciubotariu@microchip.com"; x-sender="Codrin.Ciubotariu@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com -exists:%{i}.spf.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Codrin.Ciubotariu@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Codrin.Ciubotariu@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: pP7gQZMEpK7mEL9FDGYrQjSlY+YzgyrMlhYrl7RQfNvNfT4iKWfc4z4n2t2+dAeDU8jaQ0p4GJ 8d7ak7P+j5G8v2D4cn5xBMnEyDMcW3Lu352VHlAVYaN/Dtqvysx3+qrriLfYkophv8G9WC25fm 4YJ3zyN4545CJo5oxbbhb5Y+pdN83yE0+rpU4mke+Ka1r9a73GYKx17FFAa8UCS7xdVErSVrwk ir85t39bCC6h0J0nk4+clAq34x3V4xpxHvRDGhjV4a0BOCSwttqfkrQh4QQrdsjWNRY8/Pgy+6 /FI= X-IronPort-AV: E=Sophos;i="5.70,322,1574146800"; d="scan'208";a="60862973" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Jan 2020 04:54:40 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 15 Jan 2020 04:54:39 -0700 Received: from rob-ult-m19940.microchip.com (10.10.85.251) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 15 Jan 2020 04:54:36 -0700 From: Codrin Ciubotariu To: , , , CC: , , , , , , , , Codrin Ciubotariu Subject: [PATCH v3 0/6] i2c bus recovery for Microchip SoCs Date: Wed, 15 Jan 2020 13:54:16 +0200 Message-ID: <20200115115422.17097-1-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series introduce the i2c bus recovery mechanism for the Microchip SoCs. Some SoCs have hardware support for recovery, while for those who don't the i2c-gpio bus recovery mechanism is used. Updated the corresponding dts to add i2c gpio pinctrl. The bus recovery is configured for the sama5d2/3/4 xplained and sama5d27 som1 EK boards in dts. Changes in v3: - addressed list comments: - removed pull-ups from gpios; - removed unused headers from i2c-at91.h; - fixed commit message and subject on patch 3/6; - added received tags; - rebased on top of i2c/for-next; Changes in v2: - integrated the HW CLEAR command patch; - call i2c_recover_bus() after an error occurs, if SDA is down; - added i2c gpio pinctrl in sama5d2 xplained and sama5d27 som1 EK boards; Codrin Ciubotariu (1): i2c: at91: Send bus clear command if SDA is down Kamel Bouhara (5): dt-bindings: i2c: at91: document optional bus recovery properties i2c: at91: implement i2c bus recovery ARM: at91/dt: sama5d3: add i2c gpio pinctrl ARM: at91/dt: sama5d4: add i2c gpio pinctrl ARM: at91/dt: sama5d2: add i2c gpio pinctrl .../devicetree/bindings/i2c/i2c-at91.txt | 10 ++ arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 33 +++++- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 33 +++++- arch/arm/boot/dts/sama5d3.dtsi | 33 +++++- arch/arm/boot/dts/sama5d4.dtsi | 33 +++++- drivers/i2c/busses/i2c-at91-core.c | 2 + drivers/i2c/busses/i2c-at91-master.c | 100 ++++++++++++++++++ drivers/i2c/busses/i2c-at91.h | 11 +- 8 files changed, 242 insertions(+), 13 deletions(-) -- 2.20.1