Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp199725ybr; Fri, 22 May 2020 04:38:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRk00H5iuLHixIuoiSWBhMbSTei296McuNFvz7tNkpq14X3RxgkAG9ftlyxcWf9BCB6Xoe X-Received: by 2002:aa7:c98a:: with SMTP id c10mr2661801edt.185.1590147528770; Fri, 22 May 2020 04:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590147528; cv=none; d=google.com; s=arc-20160816; b=h2KW3F6KsxZS1fLAFSqoQ53T8heOy7yMC2KHfxibQag9rQzncIdcSSCoxbsCX8RjyW pGnBj37xZN4SxEZD+zWQhA2xKHVFOx4/aqHQyGfKDj5VDFOz65Kbc20nSSesRqIObwwN j9reTutV6eg6pjW8VoZ0oOGVzO8+5Mm5IvU8TbRby4xXQ1b+EvXjD0Z4HxVMsleRP9Kp 0aynGOBudZmQPEdaSX6SftgVGb5QXsZUWsIxPcmmI9TxBkJSgrkp0GuBPn//0DxAJiNC rATG2gq1YApTawBokdgY6WK/K129bsbaVTOHZQYfBngnRVcwZfJvkNQUyVAxThaobErY BL2A== 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; bh=J1IM3V1WLso1AWe+PKgjZaemBjBxjKyT9G7kmqXRwaU=; b=HPZ5AMoAcAqVV1JldH9twPpGAfWyRQI1spHt6hxNyvTJw+RDK9TluMdqlkBlsicBD2 Ws7tzwjezSJO7V/ck9/SM10HRy7N5zi6peyb4g0XTliTxBKCakO+yjD4qQxVYd1o1sMB ucVpqS/1269iiP6JOHQm6oreDNQa1qmro9vcaL5RFFDoGH4AFvvxayzJFzZdE1E0oGLo VWYVA04+5bs3IEiYjvy6V2gCizMT5loB4jqo4Hf1p0K5yqvTTTCSzmMwrk3zOpy0yzjA KwTVXckvn3AXGUAwDUUTFvoI9ZY0574r/+zolRmEcvm8xR2673jpkzZs/S6D/Kf3du16 yXow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x16si546883ejc.712.2020.05.22.04.38.24; Fri, 22 May 2020 04:38:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729923AbgEVLgp (ORCPT + 99 others); Fri, 22 May 2020 07:36:45 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:49399 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728465AbgEVLgp (ORCPT ); Fri, 22 May 2020 07:36:45 -0400 Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id 04MBXMmv015022; Fri, 22 May 2020 14:33:22 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 20088) id 47111639C0; Fri, 22 May 2020 14:33:22 +0300 (IDT) From: Tali Perry To: ofery@google.com, brendanhiggins@google.com, avifishman70@gmail.com, tmaimon77@gmail.com, kfting@nuvoton.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, robh+dt@kernel.org, wsa@the-dreams.de, andriy.shevchenko@linux.intel.com Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tali Perry Subject: [PATCH v13 0/3] i2c: npcm7xx: add NPCM i2c controller driver Date: Fri, 22 May 2020 14:33:09 +0300 Message-Id: <20200522113312.181413-1-tali.perry1@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set adds i2c controller support for the Nuvoton NPCM Baseboard Management Controller (BMC). NPCM7xx includes 16 I2C controllers. This driver operates the controller. This module also includes a slave mode. --- v13 -> v12: - Fix yaml example. Issue found by an updated dt_binding_check. - remove double spacing. indentation issues. - remove ifdef DEBUG_FS around __init and __exit. - debugfs and counters are always present in bus struct. - Fix npcm_i2c_write_fifo_slave flow. - Remove version number. v12 -> v11: - Fix according to maintainer comments. - debugfs simplified (usedebugfs_create_u64). - slave read fifo split from master read fifo. v11 -> v10: - Fix according to maintainer comments. - Init clk simplified. - Comments in c99 - Split master irq function. - debugfs not mandatory. - yaml file fix. v10 -> v9: - Fix according to maintainer comments. - binding file changed to yaml format. - Shorten recovery flow. - Add support for health monitoring counters. v9 -> v8: - Fix according to maintainer comments. - Split lines of iowrite..(ioread..) to separate lines. - Use readx_poll_timeout_atomic - resolve various style issues. v8 -> v7: - Split to two commits, one for master, one for slave. - Rename smb to i2c. - Remove global vars. v7 -> v6: - Rebased on Linux 5.4-rc8 (was Linux 5.4-rc7). - Fix issue found by kbuild test robot (redundant include). - Note: left a warning related to fall through. This fall through is intentional. v6 -> v5: - Update documentation v5 -> v4: - support recovery - master-slave switch support needed for IPMB v4 -> v3: - typo on cover letter. v3 -> v2: - fix dt binding: compatible name: omit "bus" v2 -> v1: - run check patch in strict mode. - use linux crc. - define regs in constant offset without base. - remove debug prints. - no declarations for local functions. v1: initial version Signed-off-by: Tali Perry Reviewed-by: Andy Shevchenko --- Tali Perry (3): dt-bindings: i2c: npcm7xx: add NPCM I2C controller documentation i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver i2c: npcm7xx: Add support for slave mode for Nuvoton NPCM BMC I2C controller driver. .../bindings/i2c/nuvoton,npcm7xx-i2c.yaml | 60 + drivers/i2c/busses/Kconfig | 9 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-npcm7xx.c | 2411 +++++++++++++++++ 4 files changed, 2481 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/nuvoton,npcm7xx-i2c.yaml create mode 100644 drivers/i2c/busses/i2c-npcm7xx.c base-commit: b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce -- 2.22.0