Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3626620pxf; Mon, 15 Mar 2021 14:14:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy63ngmvq9BfzT44adBNssQ4FBsXbwXs6gakHjrBtQl1raomT5xvmYo8tgqVKd0vsoJWrb5 X-Received: by 2002:a50:9d4d:: with SMTP id j13mr31429489edk.83.1615842852038; Mon, 15 Mar 2021 14:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615842852; cv=none; d=google.com; s=arc-20160816; b=sKnvYFHl6rMRz83ZgZReEtUCqgjMiDFyMQZ9GxdpyKOY/227iaE20RMm2PVIc90pf/ 0NFSwJQrd1dtI/Cl/RjOV9EbNvVCHSSU4aZ0XAVNYq3M9f40IZHAc6U/w6tPatjPXVUf m28Gmc6NvnjbyBAHimBd9TX29DkN6VRgQxNxqWuwJU32ppqNj8OczqrTnP0MHHfRWhb/ 6uP8V84uyg8h6Os4R2F0QKqMEfXx1kxNhU5lBbGkxQ/nWqvxWUFDtLmAe/mN7cfJWTN0 upOMxeulM5BrJbAl72ySr/umvdDEUoiLjFVAqnZEffRHXoZrHPRn+ZrDR7r3mN9mGE9b 4f1w== 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=Zq7YQSlkcdUWTE6WiopphqP5vCHcCp130E2OZQ8xV10=; b=C8M435RhCMh0d7WYzZibvmxuQH7Oy56G7tex2j8NShjCWXua32Pzd43wn3f3Q98OuJ pg5O3pDMTEJyaLJ0YlMxpCZZXFxkS/kVAsVeHvo5dcpbPyxcUw3Bep4lOZ3gBVoKu5Ds N94rEvibQnc1oV7cekFrtC0PWp2pDVitfQNCARcQs8CqJZOWpXV6OQCP7/wc3OS8ko/d kwHqVe9yauHF783Pa2MZyinFWDxEm+BoA+Bf2RPP6fPldU70mXEL6K/8Q4E43KwNYksI u4xpsRiDGFGyZE3dCOTPQDHwv4JHYd6VdO5+S+BPzIZyd6SqFLUTkVdOaptDXUECnog5 +PNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svanheule.net header.s=mail1707 header.b=tJpCRQAX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=svanheule.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si12305258eds.267.2021.03.15.14.13.49; Mon, 15 Mar 2021 14:14:12 -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; dkim=pass header.i=@svanheule.net header.s=mail1707 header.b=tJpCRQAX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=svanheule.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233079AbhCOTIo (ORCPT + 99 others); Mon, 15 Mar 2021 15:08:44 -0400 Received: from polaris.svanheule.net ([84.16.241.116]:52962 "EHLO polaris.svanheule.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233153AbhCOTI2 (ORCPT ); Mon, 15 Mar 2021 15:08:28 -0400 Received: from terra.local.svanheule.net (unknown [IPv6:2a02:a03f:eaff:9701:b4db:50a7:6f83:328f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 52FBE1DE334; Mon, 15 Mar 2021 20:08:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1615835304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zq7YQSlkcdUWTE6WiopphqP5vCHcCp130E2OZQ8xV10=; b=tJpCRQAXvdOVUv2I7O/0qolhoJZOj1SwzsPcyYxx4z/99pwAFUkjy1cKZ1yQ8lrnjzZPil vTNjo5mPwAgGKu0ilAVpFBtSVH4qb8+vPovSSSPA7I9WGSDQoB7TjIfon9rOXXOhqDBa2b rRKrYs98HrsXUpKPEpz93CgfLnxnlTA+pUvshRa/e48JKUPIq1r/yF5WIv28vDCGv+QyDk 8sit7GTl6+iXcm/SxafBZsk1VJlRv3yT85FubGn88uAGgt64kH4W7g4IKYjK7pehT6MsXg ZKv9PRXvmjEhtESTjE4pWlVarGb0gKCFfczwcy8VVC1zq5oqRP5qWqN1i1m4MQ== From: Sander Vanheule To: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Rob Herring , Thomas Gleixner , Marc Zyngier , linux-kernel@vger.kernel.org, Sander Vanheule , bert@biot.com Subject: [PATCH v2 0/2] Add Realtek Otto GPIO support Date: Mon, 15 Mar 2021 20:08:04 +0100 Message-Id: <20210315190806.66762-1-sander@svanheule.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315082339.9787-1-sander@svanheule.net> References: <20210315082339.9787-1-sander@svanheule.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the GPIO controller employed by Realtek in multiple series of MIPS SoCs. These include the supported RTL838x and RTL839x. The register layout also matches the one found in the GPIO controller of other (Lexra-based) SoCs such as RTL8196E, RTL8197D, and RTL8197F. For the platform name 'otto', I am not aware of any official resources as to what hardware this specifically applies to. However, in all of the GPL archives we've received, from vendors using compatible SoCs in their design, the platform under the MIPS architecture is referred to by this name. The GPIO ports have been tested on a Zyxel GS1900-8 (RTL8380), and Zyxel GS1900-48 (RTL8393). Furthermore, the GPIO ports and interrupt controller have been tested on a Netgear GS110TPPv1 (RTL8381). Changes in v2: - Clarify structure and usage of IMR registers Sander Vanheule (2): dt-bindings: gpio: Binding for Realtek Otto GPIO gpio: Add Realtek Otto GPIO support .../bindings/gpio/gpio-realtek-otto.yaml | 80 +++++ drivers/gpio/Kconfig | 12 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-realtek-otto.c | 331 ++++++++++++++++++ 4 files changed, 424 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-realtek-otto.yaml create mode 100644 drivers/gpio/gpio-realtek-otto.c -- 2.30.2