From nobody Fri Oct 3 08:48:17 2025 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3469584A3E; Thu, 4 Sep 2025 01:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756949712; cv=none; b=PhgEZOIbpQrj/Tb8szfkRRdvt3WpkZuqvUQMfZQCXTWpM+f9aE8TqzpnbIfNk+cNX1O2EIzBDhLNLwFxF27sKCZxUGYypml9WPbRFDYenD6/7NWeQ7uwRQYCB8Z+LZiVZdhO2eoG0iMPRQLuLM7iQCaAJvRL2XB4TPwqOlSHJG0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756949712; c=relaxed/simple; bh=HGeMJivM5dsvsfLphCbTOUUOtUXXZkF8ad8cC9GU4hI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fXMKD8NwwpxJiGJymV3A5+ui+LiLTCtlrjfwMHAdESgAgXdrcpWkwIixSQ0fLTy+o/MZYkP7X22zWKA8heEhElC1vu/CWjs/D3BOWd0AXZgyPF5NUEmQI8w5sJ607uBc3Y9DH0gAvgzP5frx3NVhTYnnnJPL3UlLyNYkcuw+I2s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=gFO/43M0; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="gFO/43M0" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D4B1822FC2; Thu, 4 Sep 2025 03:35:08 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qUdN7d7rQUZn; Thu, 4 Sep 2025 03:35:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1756949708; bh=HGeMJivM5dsvsfLphCbTOUUOtUXXZkF8ad8cC9GU4hI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gFO/43M0f9M3/Yy0oZvEW+6YqlswQEZWGrxIJWLDxAVt8d6XD/Z7UAq9UcIpArotv zIlSDESGX92iWRQhOVIFVFwui77TF/bflGBsJf6oHIKf6Z3b0UHhjJiXBaZ9SZIXa1 vf+ZYXo+b7yAKleFAjDtqFkML56yf10ZdO6ELlRrjwPQRA939Hs/2JrZdt3JKzfQWP zll+NCz5hkE8Y8PzF5WFIS0ULHn9z8aXu+4li3PJufnTeUVnEjcmEJ5ECmmF3EYoAw GAdAv4kIsMWi/OgulVWFPywC1wdW+NGrsWXkkeNNCAedHdO/8YxSdwP+AFrWdaoQjK /ZzNn+BaW/Zjw== From: Yao Zi To: Yinbo Zhu , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Huacai Chen , WANG Xuerui , Philipp Zabel Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, Mingcong Bai , Kexy Biscuit , Yao Zi , Krzysztof Kozlowski , Huacai Chen Subject: [PATCH v3 1/3] dt-bindings: gpio: loongson: Document GPIO controller of LS2K0300 SoC Date: Thu, 4 Sep 2025 01:34:36 +0000 Message-ID: <20250904013438.2405-2-ziyao@disroot.org> In-Reply-To: <20250904013438.2405-1-ziyao@disroot.org> References: <20250904013438.2405-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Loongson-2K0300 ships a GPIO controller whose input/output control logic is similar to previous generation of SoCs. Additionally, it acts as an interrupt-controller supporting both level and edge interrupts and has a distinct reset signal. Describe its compatible in devicetree. We enlarge the maximum value of ngpios to 128, since the controller technically supports at most 128 pins, although only 106 are routed out of the package. Properties for interrupt-controllers and resets are introduced and limited as LS2K0300 only. Signed-off-by: Yao Zi Reviewed-by: Krzysztof Kozlowski Reviewed-by: Huacai Chen Reviewed-by: Linus Walleij --- .../bindings/gpio/loongson,ls-gpio.yaml | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml b= /Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml index b68159600e2b..69852444df23 100644 --- a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml @@ -14,6 +14,7 @@ properties: oneOf: - enum: - loongson,ls2k-gpio + - loongson,ls2k0300-gpio - loongson,ls2k0500-gpio0 - loongson,ls2k0500-gpio1 - loongson,ls2k2000-gpio0 @@ -36,7 +37,7 @@ properties: =20 ngpios: minimum: 1 - maximum: 64 + maximum: 128 =20 "#gpio-cells": const: 2 @@ -49,6 +50,14 @@ properties: minItems: 1 maxItems: 64 =20 + "#interrupt-cells": + const: 2 + + interrupt-controller: true + + resets: + maxItems: 1 + required: - compatible - reg @@ -58,6 +67,23 @@ required: - gpio-ranges - interrupts =20 +allOf: + - if: + properties: + compatible: + contains: + const: loongson,ls2k0300-gpio + then: + required: + - "#interrupt-cells" + - interrupt-controller + - resets + else: + properties: + "#interrupts-cells": false + interrupt-controller: false + resets: false + additionalProperties: false =20 examples: --=20 2.50.1