[PATCH v5 5/5] ARM: dts: sunxi: add support for NetCube Systems Nagami Keypad Carrier
From: Lukas Schmid <hidden>
Date: 2025-07-17 17:21:27
Also in:
linux-arm-kernel, linux-riscv, linux-sunxi, lkml
Subsystem:
the rest · Maintainer:
Linus Torvalds
The NetCube Systems Nagami Keypad Carrier uses the Nagami SoM and contains a MCP23008 for connecting to a 4x3 matrix keypad and internal status led. The I2C2 interface is connected to said MCP23008 and also a header for an PN532 NFC-Module. It also provides a pin-header for a bi-color status led. Ethernet with PoE support is available on a screwterminal after magnetics. Signed-off-by: Lukas Schmid <redacted> --- arch/arm/boot/dts/allwinner/Makefile | 1 + ...8i-t113s-netcube-nagami-keypad-carrier.dts | 156 ++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts
diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile
index af287bb32..a2137bbe2 100644
--- a/arch/arm/boot/dts/allwinner/Makefile
+++ b/arch/arm/boot/dts/allwinner/Makefile@@ -259,6 +259,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-s3-pinecube.dtb \ sun8i-t113s-mangopi-mq-r-t113.dtb \ sun8i-t113s-netcube-nagami-basic-carrier.dtb \ + sun8i-t113s-netcube-nagami-keypad-carrier.dtb \ sun8i-t3-cqa3t-bv3.dtb \ sun8i-v3-sl631-imx179.dtb \ sun8i-v3s-anbernic-rg-nano.dtb \
diff --git a/arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts b/arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts
new file mode 100644
index 000000000..ed2b94eeb
--- /dev/null
+++ b/arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts@@ -0,0 +1,156 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid <lukas.schmid@netcube.li> + */ + +/dts-v1/; +#include "sun8i-t113s-netcube-nagami.dtsi" + +#include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> + +/ { + model = "NetCube Systems Nagami Keypad Carrier Board"; + compatible = "netcube,nagami-keypad-carrier", "netcube,nagami", + "allwinner,sun8i-t113s"; + + keypad: keypad { + compatible = "gpio-matrix-keypad"; + debounce-delay-ms = <5>; + col-scan-delay-us = <2>; + + row-gpios = <&mcp23008 0 0 + &mcp23008 1 0 + &mcp23008 2 0 + &mcp23008 3 0>; + + col-gpios = <&mcp23008 6 0 + &mcp23008 5 0 + &mcp23008 4 0>; + + linux,keymap = <0x00000201 + 0x00010202 + 0x00020203 + 0x01000204 + 0x01010205 + 0x01020206 + 0x02000207 + 0x02010208 + 0x02020209 + 0x0300020A + 0x03010200 + 0x0302020B>; + }; + + leds { + compatible = "gpio-leds"; + + led-heartbeat { + gpios = <&mcp23008 7 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + color = <LED_COLOR_ID_YELLOW>; + function = LED_FUNCTION_HEARTBEAT; + }; + + led_status_red: led-status-red { + gpios = <&pio 3 16 GPIO_ACTIVE_HIGH>; /* PD16 */ + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + }; + + led_status_green: led-status-green { + gpios = <&pio 3 22 GPIO_ACTIVE_HIGH>; /* PD22 */ + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_STATUS; + }; + }; + + multi-led { + compatible = "leds-group-multicolor"; + color = <LED_COLOR_ID_MULTI>; + function = LED_FUNCTION_STATUS; + leds = <&led_status_red &led_status_green>; + }; +}; + +&i2c2 { + status = "okay"; + + mcp23008: gpio@20 { + compatible = "microchip,mcp23008"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; + interrupts-extended = <&pio 5 6 IRQ_TYPE_LEVEL_LOW>; /* PF6 */ + interrupt-controller; + #interrupt-cells = <2>; + }; +}; + +&pio { + gpio-line-names = "", "", "", "", // PA + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", // PB + "", "", "UART3_TX", "UART3_RX", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "eMMC_CLK", "eMMC_CMD", // PC + "eMMC_D2", "eMMC_D1", "eMMC_D0", "eMMC_D3", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", // PD + "", "", "", "", + "", "", "", "", + "", "", "", "", + "LED_STATUS_RED", "", "", "", + "I2C2_SCL", "I2C2_SDA", "LED_STATUS_GREEN", "", + "", "", "", "", + "", "", "", "", + "ETH_CRSDV", "ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PE + "ETH_TXD0", "ETH_TXD1", "ETH_TXEN", "", + "ETH_MDC", "ETH_MDIO", "QWIIC_nINT", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", // PF + "", "", "KEY_nINT", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "ESP_CLK", "ESP_CMD", "ESP_D0", "ESP_D1", // PG + "ESP_D2", "ESP_D3", "UART1_TXD", "UART1_RXD", + "ESP_nBOOT", "ESP_nRST", "I2C3_SCL", "I2C3_SDA", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + status = "okay"; +};
--
2.39.5