Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: gpio: loongson: Document GPIO controller of LS2K0300 SoC

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 <ziyao@disroot.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250904013438.2405-2-ziyao@disroot.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Yao Zi and committed by
Bartosz Golaszewski
084d01a1 d3e7efad

+27 -1
+27 -1
Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
··· 14 14 oneOf: 15 15 - enum: 16 16 - loongson,ls2k-gpio 17 + - loongson,ls2k0300-gpio 17 18 - loongson,ls2k0500-gpio0 18 19 - loongson,ls2k0500-gpio1 19 20 - loongson,ls2k2000-gpio0 ··· 37 36 38 37 ngpios: 39 38 minimum: 1 40 - maximum: 64 39 + maximum: 128 41 40 42 41 "#gpio-cells": 43 42 const: 2 ··· 50 49 minItems: 1 51 50 maxItems: 64 52 51 52 + "#interrupt-cells": 53 + const: 2 54 + 55 + interrupt-controller: true 56 + 57 + resets: 58 + maxItems: 1 59 + 53 60 required: 54 61 - compatible 55 62 - reg ··· 66 57 - gpio-controller 67 58 - gpio-ranges 68 59 - interrupts 60 + 61 + allOf: 62 + - if: 63 + properties: 64 + compatible: 65 + contains: 66 + const: loongson,ls2k0300-gpio 67 + then: 68 + required: 69 + - "#interrupt-cells" 70 + - interrupt-controller 71 + - resets 72 + else: 73 + properties: 74 + "#interrupts-cells": false 75 + interrupt-controller: false 76 + resets: false 69 77 70 78 additionalProperties: false 71 79