Add support for NetCube Systems Nagami SoM and its carrier boards
Subsystems (3)
v3 cover Add support for NetCube Systems Nagami SoM and its carrier boards
This series adds support for the NetCube Systems Nagami SoM and its associated carrier boards, the Nagami Basic Carrier and the Nagami Keypad Carrier.
Changes in v3:
- Add missing dcxo node to the SoM dtsi
Changes in v2:
- Squash the binding patches into one patch
- Fix formatting of the phy node in the SoM dtsi
- Add description on where the phy is located in the SoM dtsi
- Fix the phy address in the SoM dtsi
- Move the carrier bindings into the same description as enums
---
Lukas Schmid (5):
dt-bindings: arm: sunxi: Add NetCube Systems Nagami SoM and carrier
board bindings
riscv: dts: allwinner: d1s-t113: Add pinctrl's required by NetCube
Systems Nagami SoM
ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
ARM: dts: sunxi: add support for NetCube Systems Nagami Basic Carrier
ARM: dts: sunxi: add support for NetCube Systems Nagami Keypad Carrier
.../devicetree/bindings/arm/sunxi.yaml | 8 + arch/arm/boot/dts/allwinner/Makefile | 3 + ...n8i-t113s-netcube-nagami-basic-carrier.dts | 63 +++++ ...8i-t113s-netcube-nagami-keypad-carrier.dts | 165 +++++++++++++ .../allwinner/sun8i-t113s-netcube-nagami.dtsi | 228 ++++++++++++++++++ .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 36 +++ 6 files changed, 503 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-basic-carrier.dts create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Signature · 1 line
2.39.5
PATCH v3 1/5 dt-bindings: arm: sunxi: Add NetCube Systems Nagami SoM and carrier board bindings
The NetCube Systems Nagami is an System on Module base on the Allwinner T113s SoC. It is intended to be used in low cost devices which require simple layouts and low BOM cost.
The NetCube Systems Nagami Basic Carrier Board is a simple carrier for the Nagami SoM. It is intended to serve as a simple reference design for a custom implementation or just evaluating the module with other peripherals
The NetCube Systems Nagami Keypad Carrier is a custom board intended to fit a standard Ritto Intercom enclosure and provides a Keypad, NFC-Reader and Status-LED all controllable over Ethernet with PoE support.
--- Documentation/devicetree/bindings/arm/sunxi.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +8 -0
@@ -599,6 +599,14 @@ properties: - const: netcube,kumquat - const: allwinner,sun8i-v3s + - description: NetCube Systems Nagami SoM based boards + items: + - enum: + - netcube,nagami-basic-carrier + - netcube,nagami-keypad-carrier + - const: netcube,nagami + - const: allwinner,sun8i-t113s + - description: NextThing Co. CHIP items: - const: nextthing,chip
Signature · 1 line
2.39.5
PATCH v3 2/5 riscv: dts: allwinner: d1s-t113: Add pinctrl's required by NetCube Systems Nagami SoM
In reply to Lukas SchmidAdded the following pinctrl's used by the NetCube Systems Nagami SoM
* i2c2_pins
* i2c3_pins
* i2s1_pins, i2s1_din_pins, i2s1_dout_pins
* spi1_pins
--- .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +36 -0
@@ -78,6 +78,36 @@ dsi_4lane_pins: dsi-4lane-pins { function = "dsi"; }; + /omit-if-no-ref/ + i2c2_pins: i2c2-pins { + pins = "PD20", "PD21"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c3_pins: i2c3-pins { + pins = "PG10", "PG11"; + function = "i2c3"; + }; + + /omit-if-no-ref/ + i2s1_pins: i2s1-pins { + pins = "PG12", "PG13"; + function = "i2s1"; + }; + + /omit-if-no-ref/ + i2s1_din_pins: i2s1-din-pins { + pins = "PG14"; + function = "i2s1_din"; + }; + + /omit-if-no-ref/ + i2s1_dout_pins: i2s1-dout-pins { + pins = "PG15"; + function = "i2s1_dout"; + }; + /omit-if-no-ref/ lcd_rgb666_pins: lcd-rgb666-pins { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5",
@@ -126,6 +156,12 @@ spi0_pins: spi0-pins { function = "spi0"; }; + /omit-if-no-ref/ + spi1_pins: spi1-pins { + pins = "PD10", "PD11", "PD12", "PD13", "PD14", "PD15"; + function = "spi1"; + }; + /omit-if-no-ref/ uart1_pg6_pins: uart1-pg6-pins { pins = "PG6", "PG7";
Signature · 1 line
2.39.5
Re: [PATCH v3 2/5] riscv: dts: allwinner: d1s-t113: Add pinctrl's required by NetCube Systems Nagami SoM
Quoted 54 lines · Lukas Schmid
Added the following pinctrl's used by the NetCube Systems Nagami SoM
*i2c2_pins
*i2c3_pins
*i2s1_pins,i2s1_din_pins,i2s1_dout_pins
*spi1_pinsSigned-off-by Lukas Schmid <[email protected]>--- .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +30
-0@@ -78,6 +78,36 @@ dsi_4lane_pins: dsi-4lane-pins { function = "dsi"; }; + /omit-if-no-ref/ + i2c2_pins: i2c2-pins { + pins = "PD20", "PD21"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c3_pins: i2c3-pins { + pins = "PG10", "PG11"; + function = "i2c3"; + }; + + /omit-if-no-ref/ + i2s1_pins: i2s1-pins { + pins = "PG12", "PG13"; + function = "i2s1"; + }; + + /omit-if-no-ref/ + i2s1_din_pins: i2s1-din-pins { + pins = "PG14"; + function = "i2s1_din"; + }; + + /omit-if-no-ref/ + i2s1_dout_pins: i2s1-dout-pins { + pins = "PG15"; + function = "i2s1_dout"; + }; + /omit-if-no-ref/ lcd_rgb666_pins: lcd-rgb666-pins { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5",
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi spi0_pins: spi0-pins { · line 161
Quoted 6 lines
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +3
-0@@ -126,6 +156,12 @@ spi0_pins: spi0-pins { function = "spi0"; }; + /omit-if-no-ref/ + spi1_pins: spi1-pins { + pins = "PD10", "PD11", "PD12", "PD13", "PD14", "PD15";
Could you split out the WP and HOLD pins as separate nodes. They aren't strictly needed for SPI, and folks might have designs that use the two pins for other purposes.
Thanks
ChenYu
Quoted 11 lines
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +3
-1+ function = "spi1"; + }; + /omit-if-no-ref/ uart1_pg6_pins: uart1-pg6-pins { pins = "PG6", "PG7"; --2.39.5
Re: [PATCH v3 2/5] riscv: dts: allwinner: d1s-t113: Add pinctrl's required by NetCube Systems Nagami SoM
Quoted 68 lines · On Dienstag, 8. Juli 2025 18:36:03 CEST Chen-Yu Tsai wrote:
Quoted 67 lines · Lukas Schmid
Added the following pinctrl's used by the NetCube Systems Nagami SoM
*
i2c2_pins
*i2c3_pins
*i2s1_pins,i2s1_din_pins,i2s1_dout_pins
*spi1_pinsSigned-off-by Lukas Schmid <[email protected]>---
.../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)(quoted diff) +0
-0
b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsiindexe4175adb0..8dc3deccb100644arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +30
-0@@ -78,6 +78,36 @@ dsi_4lane_pins: dsi-4lane-pins { function = "dsi"; }; + /omit-if-no-ref/ + i2c2_pins: i2c2-pins { + pins = "PD20", "PD21"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c3_pins: i2c3-pins { + pins = "PG10", "PG11"; + function = "i2c3"; + }; + + /omit-if-no-ref/ + i2s1_pins: i2s1-pins { + pins = "PG12", "PG13"; + function = "i2s1"; + }; + + /omit-if-no-ref/ + i2s1_din_pins: i2s1-din-pins { + pins = "PG14"; + function = "i2s1_din"; + }; + + /omit-if-no-ref/ + i2s1_dout_pins: i2s1-dout-pins { + pins = "PG15"; + function = "i2s1_dout"; + }; +/omit-if-no-ref/ lcd_rgb666_pins: lcd-rgb666-pins { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5",arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +0
-0@@ -126,6 +156,12 @@ spi0_pins: spi0-pins { function = "spi0"; };
Quoted 8 lines
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi spi0_pins: spi0-pins {
Quoted 4 lines
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +3
-0+ /omit-if-no-ref/ + spi1_pins: spi1-pins { + pins = "PD10", "PD11", "PD12", "PD13", "PD14", "PD15";Could you split out the WP and HOLD pins as separate nodes. They aren't strictly needed for SPI, and folks might have designs that use the two pins for other purposes.
Sure. Do you want them as seperate ones, or is "spi1_hold_wp_pins" fine?
Quoted 15 lines
Thanks
ChenYuQuoted 11 lines
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +3
-0+ function = "spi1"; + }; +/omit-if-no-ref/ uart1_pg6_pins: uart1-pg6-pins { pins = "PG6", "PG7";--
2.39.5
PATCH v3 3/5 ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
In reply to Lukas SchmidNetCube Systems Nagami SoM is a module based around the Allwinner T113s SoC. It includes the following features and interfaces:
- 128MB DDR3 included in SoC
- 10/100 Mbps Ethernet using LAN8720A phy
- One USB-OTG interface
- One USB-Host interface
- One I2S interface with in and output support
- Two CAN interfaces
- ESP32 over SDIO
- One SPI interface
- I2C EEPROM for MAC address
- One QWIIC I2C Interface with dedicated interrupt pin shared with EEPROM
- One external I2C interface
- SD interface for external SD-Card
--- .../allwinner/sun8i-t113s-netcube-nagami.dtsi | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +233 -0
@@ -0,0 +1,233 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid <[email protected]> + */ + +/dts-v1/; +#include "sun8i-t113s.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "NetCube Systems Nagami SoM"; + compatible = "netcube,nagami", "allwinner,sun8i-t113s"; + + aliases { + serial1 = &uart1; // ESP32 Bootloader UART + serial3 = &uart3; // Console UART on Card Edge + ethernet0 = &emac; + }; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + /* module wide 3.3V supply directly from the card edge */ + reg_vcc3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ + reg_vcc_core: regulator-core { + compatible = "regulator-fixed"; + regulator-name = "vcc-core"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + vin-supply = <®_vcc3v3>; + }; +}; + +&cpu0 { + cpu-supply = <®_vcc_core>; +}; + +&cpu1 { + cpu-supply = <®_vcc_core>; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&emac { + nvmem-cells = <ð0_macaddress>; + nvmem-cell-names = "mac-address"; + phy-handle = <&lan8720a>; + phy-mode = "rmii"; + pinctrl-0 = <&rmii_pe_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as I2C on the card edge */ +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default"; +}; + +/* Exposed as the QWIIC connector and used by the internal EEPROM */ +&i2c3 { + pinctrl-0 = <&i2c3_pins>; + pinctrl-names = "default"; + status = "okay"; + + eeprom0: eeprom@50 { + compatible = "atmel,24c02"; /* actually it's a 24AA02E48 */ + reg = <0x50>; + pagesize = <16>; + read-only; + vcc-supply = <®_vcc3v3>; + + #address-cells = <1>; + #size-cells = <1>; + + eth0_macaddress: macaddress@fa { + reg = <0xfa 0x06>; + }; + }; +}; + +/* Exposed as I2S on the card edge */ +&i2s1 { + pinctrl-0 = <&i2s1_pins>, <&i2s1_din_pins>, <&i2s1_dout_pins>; + pinctrl-names = "default"; +}; + +/* Phy is on SoM. MDI signals pre-magentics are on the card edge */ +&mdio { + lan8720a: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +/* Exposed as SD on the card edge */ +&mmc0 { + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + broken-cd; + disable-wp; + bus-width = <4>; +}; + +/* Connected to the on-board ESP32 */ +&mmc1 { + pinctrl-0 = <&mmc1_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +/* Connected to the on-board eMMC */ +&mmc2 { + pinctrl-0 = <&mmc2_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&pio { + vcc-pb-supply = <®_vcc3v3>; + vcc-pc-supply = <®_vcc3v3>; + vcc-pd-supply = <®_vcc3v3>; + vcc-pe-supply = <®_vcc3v3>; + vcc-pf-supply = <®_vcc3v3>; + vcc-pg-supply = <®_vcc3v3>; + + gpio-line-names = "", "", "", "", // PA + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "CAN0_TX", "CAN0_RX", // PB + "CAN1_TX", "CAN1_RX", "UART3_TX", "UART3_RX", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "eMMC_CLK", "eMMC_CMD", // PC + "eMMC_D2", "eMMC_D1", "eMMC_D0", "eMMC_D3", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", // PD + "", "", "", "", + "", "", "SPI1_CS", "SPI1_CLK", + "SPI1_MOSI", "SPI1_MISO", "SPI1_HOLD", "SPI1_WP", + "PD16", "", "", "", + "I2C2_SCL", "I2C2_SDA", "PD22", "", + "", "", "", "", + "", "", "", "", + "ETH_CRSDV", "ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PE + "ETH_TXD0", "ETH_TXD1", "ETH_TXEN", "", + "ETH_MDC", "ETH_MDIO", "QWIIC_nINT", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "SD_D1", "SD_D0", "SD_CLK", "SD_CLK", // PF + "SD_D3", "SD_D2", "PF6", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "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", + "I2S1_WS", "I2S1_CLK", "I2S1_DIN0", "I2S1_DOUT0", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +/* Remove the unused CK pin from the pinctl as it is unconnected */ +&rmii_pe_pins { + pins = "PE0", "PE1", "PE2", "PE3", "PE4", + "PE5", "PE6", "PE8", "PE9"; +}; + +/* Exposed as SPI on the card-edge */ +&spi1 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + cs-gpios = <0>; +}; + +/* Connected to the Bootloader/Console of the ESP32 */ +&uart1 { + pinctrl-0 = <&uart1_pg6_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as the Console/Debug UART on the card-edge */ +&uart3 { + pinctrl-0 = <&uart3_pb_pins>; + pinctrl-names = "default"; + status = "okay"; +};
Signature · 1 line
2.39.5
Re: [PATCH v3 3/5] ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
On Mon, 7 Jul 2025 20:44:15 +0200
Lukas Schmid <[email protected]> wrote:
Hi Lukas,
please try to refrain from sending subsequent patches too quickly, that might just put off and confuse reviewers. To acknowledge a change request, it is probably sufficient to just reply to the mail with a confirmation.
Quoted 88 lines
NetCube Systems Nagami SoM is a module based around the Allwinner T113s SoC. It includes the following features and interfaces:
- 128MB DDR3 included in SoC
- 10/100 Mbps Ethernet using LAN8720A phy
- One USB-OTG interface
- One USB-Host interface
- One I2S interface with in and output support
- Two CAN interfaces
- ESP32 over SDIO
- One SPI interface
- I2C EEPROM for MAC address
- One QWIIC I2C Interface with dedicated interrupt pin shared with EEPROM
- One external I2C interface
- SD interface for external SD-CardSigned-off-by Lukas Schmid <[email protected]>--- .../allwinner/sun8i-t113s-netcube-nagami.dtsi | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsiarch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +60
-0@@ -0,0 +1,233 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid <[email protected]> + */ + +/dts-v1/; +#include "sun8i-t113s.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "NetCube Systems Nagami SoM"; + compatible = "netcube,nagami", "allwinner,sun8i-t113s"; + + aliases { + serial1 = &uart1; // ESP32 Bootloader UART + serial3 = &uart3; // Console UART on Card Edge + ethernet0 = &emac; + }; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + /* module wide 3.3V supply directly from the card edge */ + reg_vcc3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ + reg_vcc_core: regulator-core { + compatible = "regulator-fixed"; + regulator-name = "vcc-core"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + vin-supply = <®_vcc3v3>; + }; +}; + +&cpu0 { + cpu-supply = <®_vcc_core>; +}; + +&cpu1 { + cpu-supply = <®_vcc_core>; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&emac { + nvmem-cells = <ð0_macaddress>; + nvmem-cell-names = "mac-address"; + phy-handle = <&lan8720a>;
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 70
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ phy-mode = "rmii"; + pinctrl-0 = <&rmii_pe_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as I2C on the card edge */ +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default";
I wonder if this belongs here. In general we don't describe pins/devices that are on generic connectors (like pin headers), because the connection is determined by the user, not by the board. In this case PD20 and PD21 could be used as generic GPIOs or as PWMs. IIUC, even for the basic carrier those pins end up on headers, so even there I wouldn't describe it. On the keypad carrier it's of course a different story, since the MCP23008 is apparently soldered there.
Quoted 18 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +18
-0+}; + +/* Exposed as the QWIIC connector and used by the internal EEPROM */ +&i2c3 { + pinctrl-0 = <&i2c3_pins>; + pinctrl-names = "default"; + status = "okay"; + + eeprom0: eeprom@50 { + compatible = "atmel,24c02"; /* actually it's a 24AA02E48 */ + reg = <0x50>; + pagesize = <16>; + read-only; + vcc-supply = <®_vcc3v3>; + + #address-cells = <1>; + #size-cells = <1>; +
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 98
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ eth0_macaddress: macaddress@fa { + reg = <0xfa 0x06>; + }; + }; +}; + +/* Exposed as I2S on the card edge */ +&i2s1 { + pinctrl-0 = <&i2s1_pins>, <&i2s1_din_pins>, <&i2s1_dout_pins>; + pinctrl-names = "default";
Same story here, what prevents a user from using those edge pins as GPIO or PWM?
Quoted 9 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +9
-0+}; + +/* Phy is on SoM. MDI signals pre-magentics are on the card edge */ +&mdio { + lan8720a: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +};
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 117
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ +/* Exposed as SD on the card edge */ +&mmc0 { + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + broken-cd; + disable-wp; + bus-width = <4>; +};
I think this node doesn't belong into the SoM .dtsi, as many details are not set here, but on the carrier board: card detect, write protect, Vmmc supply, and even bus width (could be 1 as well). So please move this node to where the SD card connector sits. You might want to keep the pinctrl nodes in here.
Quoted 92 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +92
-0+ +/* Connected to the on-board ESP32 */ +&mmc1 { + pinctrl-0 = <&mmc1_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +/* Connected to the on-board eMMC */ +&mmc2 { + pinctrl-0 = <&mmc2_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&pio { + vcc-pb-supply = <®_vcc3v3>; + vcc-pc-supply = <®_vcc3v3>; + vcc-pd-supply = <®_vcc3v3>; + vcc-pe-supply = <®_vcc3v3>; + vcc-pf-supply = <®_vcc3v3>; + vcc-pg-supply = <®_vcc3v3>; + + gpio-line-names = "", "", "", "", // PA + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "CAN0_TX", "CAN0_RX", // PB + "CAN1_TX", "CAN1_RX", "UART3_TX", "UART3_RX", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "eMMC_CLK", "eMMC_CMD", // PC + "eMMC_D2", "eMMC_D1", "eMMC_D0", "eMMC_D3", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", // PD + "", "", "", "", + "", "", "SPI1_CS", "SPI1_CLK", + "SPI1_MOSI", "SPI1_MISO", "SPI1_HOLD", "SPI1_WP", + "PD16", "", "", "", + "I2C2_SCL", "I2C2_SDA", "PD22", "", + "", "", "", "", + "", "", "", "", + "ETH_CRSDV", "ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PE + "ETH_TXD0", "ETH_TXD1", "ETH_TXEN", "", + "ETH_MDC", "ETH_MDIO", "QWIIC_nINT", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "SD_D1", "SD_D0", "SD_CLK", "SD_CLK", // PF + "SD_D3", "SD_D2", "PF6", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "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", + "I2S1_WS", "I2S1_CLK", "I2S1_DIN0", "I2S1_DOUT0", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +/* Remove the unused CK pin from the pinctl as it is unconnected */ +&rmii_pe_pins { + pins = "PE0", "PE1", "PE2", "PE3", "PE4", + "PE5", "PE6", "PE8", "PE9";
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 219
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+}; + +/* Exposed as SPI on the card-edge */ +&spi1 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + cs-gpios = <0>; +};
I wonder if this belongs here as well, since it's again just generic edge pins.
Cheers,
Andre
Quoted 14 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +14
-0+ +/* Connected to the Bootloader/Console of the ESP32 */ +&uart1 { + pinctrl-0 = <&uart1_pg6_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as the Console/Debug UART on the card-edge */ +&uart3 { + pinctrl-0 = <&uart3_pb_pins>; + pinctrl-names = "default"; + status = "okay"; +};
Re: [PATCH v3 3/5] ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
Quoted 3 lines · On Dienstag, 8. Juli 2025 01:22:05 CEST Andre Przywara wrote:
On Mon, 7 Jul 2025 20:44:15 +0200
Lukas Schmid <[email protected]> wrote:
Hi Andre,
Quoted 6 lines
Hi Lukas,
please try to refrain from sending subsequent patches too quickly, that might just put off and confuse reviewers. To acknowledge a change request, it is probably sufficient to just reply to the mail with a confirmation.
Sorry about that. I'm still trying to get the hang of this whole "submitting patches" thing. What is a good time/reason to send the next revision/version of a patchset?
Quoted 102 lines
Quoted 91 lines
NetCube Systems Nagami SoM is a module based around the Allwinner T113s SoC. It includes the following features and interfaces:
- 128MB DDR3 included in SoC
- 10/100 Mbps Ethernet using LAN8720A phy
- One USB-OTG interface
- One USB-Host interface
- One I2S interface with in and output support
- Two CAN interfaces
- ESP32 over SDIO
- One SPI interface
- I2C EEPROM for MAC address
- One QWIIC I2C Interface with dedicated interrupt pin shared with EEPROM
- One external I2C interface
- SD interface for external SD-CardSigned-off-by Lukas Schmid <[email protected]>---
.../allwinner/sun8i-t113s-netcube-nagami.dtsi | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi>(quoted diff) +0
-0
b/arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsinew file mode 100644
index 000000000..0db867b47arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +60
-0@@ -0,0 +1,233 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid <[email protected]> + */ + +/dts-v1/; +#include "sun8i-t113s.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "NetCube Systems Nagami SoM"; + compatible = "netcube,nagami", "allwinner,sun8i-t113s"; + + aliases { + serial1 = &uart1; // ESP32 Bootloader UART + serial3 = &uart3; // Console UART on Card Edge + ethernet0 = &emac; + }; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + /* module wide 3.3V supply directly from the card edge */ + reg_vcc3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ + reg_vcc_core: regulator-core { + compatible = "regulator-fixed"; + regulator-name = "vcc-core"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + vin-supply = <®_vcc3v3>; + }; +}; + +&cpu0 { + cpu-supply = <®_vcc_core>; +}; + +&cpu1 { + cpu-supply = <®_vcc_core>; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&emac { + nvmem-cells = <ð0_macaddress>; + nvmem-cell-names = "mac-address"; + phy-handle = <&lan8720a>;arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 70
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ phy-mode = "rmii"; + pinctrl-0 = <&rmii_pe_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as I2C on the card edge */ +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default";
Quoted 7 lines
I wonder if this belongs here. In general we don't describe pins/devices that are on generic connectors (like pin headers), because the connection is determined by the user, not by the board. In this case PD20 and PD21 could be used as generic GPIOs or as PWMs. IIUC, even for the basic carrier those pins end up on headers, so even there I wouldn't describe it. On the keypad carrier it's of course a different story, since the MCP23008 is apparently soldered there.
I get that part. However the module's description (as of yet unreleased) specifies those pins for this exact function as they are meant to be available on our modules using the same connector but other CPU/SoC. The Module's state that this is the default option but other function's can be reconfigured or they can be used as IO.
If it's an issue I can remove those here, but I would still add them into the basic carrier as, even though they are only pin header, they are marked with the dedicated function of said pin. For example the headers there are specifically for "SPI", "I2S", "I2C" and the SD-Card slot.
Quoted 11 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 11 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+}; + +/* Exposed as the QWIIC connector and used by the internal EEPROM */ +&i2c3 { + pinctrl-0 = <&i2c3_pins>; + pinctrl-names = "default"; + status = "okay"; + + eeprom0: eeprom@50 { + compatible = "atmel,24c02"; /*
actually it's a 24AA02E48 */
Quoted 39 lines
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +8
-0+ reg = <0x50>; + pagesize = <16>; + read-only; + vcc-supply = <®_vcc3v3>; + + #address-cells = <1>; + #size-cells = <1>; +arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 98
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ eth0_macaddress: macaddress@fa { + reg = <0xfa 0x06>; + }; + }; +}; + +/* Exposed as I2S on the card edge */ +&i2s1 { + pinctrl-0 = <&i2s1_pins>, <&i2s1_din_pins>, <&i2s1_dout_pins>; + pinctrl-names = "default";Same story here, what prevents a user from using those edge pins as GPIO or PWM?
Quoted 17 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +17
-0+}; + +/* Phy is on SoM. MDI signals pre-magentics are on the card edge */ +&mdio { + lan8720a: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +/* Exposed as SD on the card edge */ +&mmc0 { + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + broken-cd; + disable-wp;
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 117
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +2
-0+ bus-width = <4>; +};I think this node doesn't belong into the SoM .dtsi, as many details are not set here, but on the carrier board: card detect, write protect, Vmmc supply, and even bus width (could be 1 as well). So please move this node to where the SD card connector sits. You might want to keep the pinctrl nodes in here.
Totally agree here, I will move this definition to the basic carrier, as it's currently the only one with the SD-Interface connected. However my question from above about the default function still applies here.
Quoted 32 lines
Quoted 32 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +31
-0+ +/* Connected to the on-board ESP32 */ +&mmc1 { + pinctrl-0 = <&mmc1_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +/* Connected to the on-board eMMC */ +&mmc2 { + pinctrl-0 = <&mmc2_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&pio { + vcc-pb-supply = <®_vcc3v3>; + vcc-pc-supply = <®_vcc3v3>; + vcc-pd-supply = <®_vcc3v3>; + vcc-pe-supply = <®_vcc3v3>; + vcc-pf-supply = <®_vcc3v3>; + vcc-pg-supply = <®_vcc3v3>; + + gpio-line-names = "", "", "", "", // PA
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +8
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "CAN0_TX",
"CAN0_RX", // PB
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 157
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "CAN1_TX",
"CAN1_RX", "UART3_TX", "UART3_RX",
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +7
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "eMMC_CLK",
"eMMC_CMD", // PC
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 165
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "eMMC_D2",
"eMMC_D1", "eMMC_D0", "eMMC_D3",
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +7
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", //
PD
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 174
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +2
-0+ "", "", "", "", + "", "", "SPI1_CS",
"SPI1_CLK",
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 175
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "SPI1_MOSI",
"SPI1_MISO", "SPI1_HOLD", "SPI1_WP",
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 177
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +2
-0+ "PD16", "", "", "", + "I2C2_SCL",
"I2C2_SDA", "PD22", "",
Quoted 3 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 3 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +3
-0+ "", "", "", "", + "", "", "", "", + "ETH_CRSDV",
"ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PE
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 181
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ETH_TXD0",
"ETH_TXD1", "ETH_TXEN", "",
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 182
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ETH_MDC",
"ETH_MDIO", "QWIIC_nINT", "",
Quoted 6 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 6 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +6
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "SD_D1", "SD_D0",
"SD_CLK", "SD_CLK", // PF
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 189
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "SD_D3", "SD_D2",
"PF6", "",
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +7
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "ESP_CLK",
"ESP_CMD", "ESP_D0", "ESP_D1", // PG
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 197
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ESP_D2", "ESP_D3",
"UART1_TXD", "UART1_RXD",
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 198
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ESP_nBOOT",
"ESP_nRST", "I2C3_SCL", "I2C3_SDA",
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 199
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "I2S1_WS",
"I2S1_CLK", "I2S1_DIN0", "I2S1_DOUT0",
Quoted 15 lines
Quoted 15 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +15
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +/* Remove the unused CK pin from the pinctl as it is unconnected */ +&rmii_pe_pins { + pins = "PE0", "PE1", "PE2", "PE3", "PE4", + "PE5", "PE6", "PE8", "PE9"; +}; + +/* Exposed as SPI on the card-edge */ +&spi1 { + #address-cells = <1>;
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 219
Quoted 5 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +5
-0+ #size-cells = <0>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + cs-gpios = <0>; +};I wonder if this belongs here as well, since it's again just generic edge pins.
Same here too
Quoted 18 lines
Cheers,
AndreQuoted 14 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +14
-0+ +/* Connected to the Bootloader/Console of the ESP32 */ +&uart1 { + pinctrl-0 = <&uart1_pg6_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as the Console/Debug UART on the card-edge */ +&uart3 { + pinctrl-0 = <&uart3_pb_pins>; + pinctrl-names = "default"; + status = "okay"; +};
Re: [PATCH v3 3/5] ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
Hi,
Quoted 134 lines · Lukas Schmid
Quoted 3 lines · On Dienstag, 8. Juli 2025 01:22:05 CEST Andre Przywara wrote:
On Mon, 7 Jul 2025 20:44:15 +0200
Lukas Schmid <[email protected]> wrote:Hi Andre,
Quoted 6 lines
Hi Lukas,
please try to refrain from sending subsequent patches too quickly, that might just put off and confuse reviewers. To acknowledge a change request, it is probably sufficient to just reply to the mail with a confirmation.
Sorry about that. I'm still trying to get the hang of this whole "submitting patches" thing. What is a good time/reason to send the next revision/version of a patchset?
Quoted 102 lines
Quoted 91 lines
NetCube Systems Nagami SoM is a module based around the Allwinner T113s SoC. It includes the following features and interfaces:
- 128MB DDR3 included in SoC
- 10/100 Mbps Ethernet using LAN8720A phy
- One USB-OTG interface
- One USB-Host interface
- One I2S interface with in and output support
- Two CAN interfaces
- ESP32 over SDIO
- One SPI interface
- I2C EEPROM for MAC address
- One QWIIC I2C Interface with dedicated interrupt pin shared with EEPROM
- One external I2C interface
- SD interface for external SD-CardSigned-off-by Lukas Schmid <[email protected]>---
.../allwinner/sun8i-t113s-netcube-nagami.dtsi | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi>(quoted diff) +0
-0
b/arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsinew file mode 100644
index 000000000..0db867b47arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +60
-0@@ -0,0 +1,233 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid <[email protected]> + */ + +/dts-v1/; +#include "sun8i-t113s.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "NetCube Systems Nagami SoM"; + compatible = "netcube,nagami", "allwinner,sun8i-t113s"; + + aliases { + serial1 = &uart1; // ESP32 Bootloader UART + serial3 = &uart3; // Console UART on Card Edge + ethernet0 = &emac; + }; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + /* module wide 3.3V supply directly from the card edge */ + reg_vcc3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ + reg_vcc_core: regulator-core { + compatible = "regulator-fixed"; + regulator-name = "vcc-core"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + vin-supply = <®_vcc3v3>; + }; +}; + +&cpu0 { + cpu-supply = <®_vcc_core>; +}; + +&cpu1 { + cpu-supply = <®_vcc_core>; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&emac { + nvmem-cells = <ð0_macaddress>; + nvmem-cell-names = "mac-address"; + phy-handle = <&lan8720a>;arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 70
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ phy-mode = "rmii"; + pinctrl-0 = <&rmii_pe_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as I2C on the card edge */ +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default";Quoted 7 lines
I wonder if this belongs here. In general we don't describe pins/devices that are on generic connectors (like pin headers), because the connection is determined by the user, not by the board. In this case PD20 and PD21 could be used as generic GPIOs or as PWMs. IIUC, even for the basic carrier those pins end up on headers, so even there I wouldn't describe it. On the keypad carrier it's of course a different story, since the MCP23008 is apparently soldered there.
I get that part. However the module's description (as of yet unreleased) specifies those pins for this exact function as they are meant to be available on our modules using the same connector but other CPU/SoC. The Module's state that this is the default option but other function's can be reconfigured or they can be used as IO.
Quoted 4 lines
If it's an issue I can remove those here, but I would still add them into the basic carrier as, even though they are only pin header, they are marked with the dedicated function of said pin. For example the headers there are specifically for "SPI", "I2S", "I2C" and the SD-Card slot.
For dedicated but otherwise unpopulated pins, we have in the past have everything described as you already have, but with an explicit
status = "disabled";
along with a comment stating that it is normally unpopulated and up to the end user to enable if they intend to use it. You can see examples of this in the dts files of the Pine64.
I wouldn't say it's a preference, but it's been done for some development boards.
ChenYu
Quoted 207 lines
Quoted 11 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 11 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+}; + +/* Exposed as the QWIIC connector and used by the internal EEPROM */ +&i2c3 { + pinctrl-0 = <&i2c3_pins>; + pinctrl-names = "default"; + status = "okay"; + + eeprom0: eeprom@50 { + compatible = "atmel,24c02"; /*actually it's a 24AA02E48 */
Quoted 39 lines
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +8
-0+ reg = <0x50>; + pagesize = <16>; + read-only; + vcc-supply = <®_vcc3v3>; + + #address-cells = <1>; + #size-cells = <1>; +arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 98
Quoted 10 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +10
-0+ eth0_macaddress: macaddress@fa { + reg = <0xfa 0x06>; + }; + }; +}; + +/* Exposed as I2S on the card edge */ +&i2s1 { + pinctrl-0 = <&i2s1_pins>, <&i2s1_din_pins>, <&i2s1_dout_pins>; + pinctrl-names = "default";Same story here, what prevents a user from using those edge pins as GPIO or PWM?
Quoted 17 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +17
-0+}; + +/* Phy is on SoM. MDI signals pre-magentics are on the card edge */ +&mdio { + lan8720a: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +/* Exposed as SD on the card edge */ +&mmc0 { + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + broken-cd; + disable-wp;Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 117
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +2
-0+ bus-width = <4>; +};I think this node doesn't belong into the SoM .dtsi, as many details are not set here, but on the carrier board: card detect, write protect, Vmmc supply, and even bus width (could be 1 as well). So please move this node to where the SD card connector sits. You might want to keep the pinctrl nodes in here.
Totally agree here, I will move this definition to the basic carrier, as it's currently the only one with the SD-Interface connected. However my question from above about the default function still applies here.
Quoted 32 lines
Quoted 32 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +31
-0+ +/* Connected to the on-board ESP32 */ +&mmc1 { + pinctrl-0 = <&mmc1_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +/* Connected to the on-board eMMC */ +&mmc2 { + pinctrl-0 = <&mmc2_pins>; + pinctrl-names = "default"; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&pio { + vcc-pb-supply = <®_vcc3v3>; + vcc-pc-supply = <®_vcc3v3>; + vcc-pd-supply = <®_vcc3v3>; + vcc-pe-supply = <®_vcc3v3>; + vcc-pf-supply = <®_vcc3v3>; + vcc-pg-supply = <®_vcc3v3>; + + gpio-line-names = "", "", "", "", // PAQuoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +8
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "CAN0_TX","
CAN0_RX", // PBQuoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 157
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "CAN1_TX","
CAN1_RX", "UART3_TX", "UART3_RX",Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +7
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "eMMC_CLK","
eMMC_CMD", // PCQuoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 165
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "eMMC_D2","
eMMC_D1", "eMMC_D0", "eMMC_D3",Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +7
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", //PD
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 174
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +2
-0+ "", "", "", "", + "", "", "SPI1_CS","
SPI1_CLK",Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 175
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "SPI1_MOSI","
SPI1_MISO", "SPI1_HOLD", "SPI1_WP",Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 177
Quoted 2 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +2
-0+ "PD16", "", "", "", + "I2C2_SCL","
I2C2_SDA", "PD22", "",Quoted 3 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 3 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +3
-0+ "", "", "", "", + "", "", "", "", + "ETH_CRSDV","
ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PEQuoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 181
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ETH_TXD0","
ETH_TXD1", "ETH_TXEN", "",Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 182
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ETH_MDC","
ETH_MDIO", "QWIIC_nINT", "",Quoted 6 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 6 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +6
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "SD_D1", "SD_D0","
SD_CLK", "SD_CLK", // PFQuoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 189
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "SD_D3", "SD_D2","PF6", "",
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
Quoted 7 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +7
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "ESP_CLK","
ESP_CMD", "ESP_D0", "ESP_D1", // PGQuoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 197
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ESP_D2", "ESP_D3","
UART1_TXD", "UART1_RXD",Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 198
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "ESP_nBOOT","
ESP_nRST", "I2C3_SCL", "I2C3_SDA",Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 199
Quoted 1 line
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +1
-0+ "I2S1_WS","
I2S1_CLK", "I2S1_DIN0", "I2S1_DOUT0",Quoted 15 lines
Quoted 15 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +15
-0+ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +/* Remove the unused CK pin from the pinctl as it is unconnected */ +&rmii_pe_pins { + pins = "PE0", "PE1", "PE2", "PE3", "PE4", + "PE5", "PE6", "PE8", "PE9"; +}; + +/* Exposed as SPI on the card-edge */ +&spi1 { + #address-cells = <1>;Quoted 8 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi line 219
Quoted 5 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +5
-0+ #size-cells = <0>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + cs-gpios = <0>; +};I wonder if this belongs here as well, since it's again just generic edge pins.
Same here too
Quoted 18 lines
Cheers,
AndreQuoted 14 lines
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi new file +14
-0+ +/* Connected to the Bootloader/Console of the ESP32 */ +&uart1 { + pinctrl-0 = <&uart1_pg6_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Exposed as the Console/Debug UART on the card-edge */ +&uart3 { + pinctrl-0 = <&uart3_pb_pins>; + pinctrl-names = "default"; + status = "okay"; +};
Re: [PATCH v3 3/5] ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
In reply to Lukas SchmidQuoted 8 lines · Lukas Schmid
Quoted 3 lines · On Dienstag, 8. Juli 2025 01:22:05 CEST Andre Przywara wrote:
On Mon, 7 Jul 2025 20:44:15 +0200
Lukas Schmid <[email protected]> wrote:Hi Andre,
Quoted 2 lines
Hi Lukas,
Quoted 8 lines
Quoted 4 lines
please try to refrain from sending subsequent patches too quickly, that might just put off and confuse reviewers. To acknowledge a change request, it is probably sufficient to just reply to the mail with a confirmation.
Sorry about that. I'm still trying to get the hang of this whole "submitting patches" thing. What is a good time/reason to send the next revision/version of a patchset?
It varies per subsystem. For netdev there is a clear rule to wait 24 hours. For other subsystems, it might not be documented. GregKH used to say he would always respond within 2 weeks for USB patches. To some extent, you just need to see how fast each Maintainer works, and resubmit based on that.
Also, if there is a discussion going on, you need to wait for that discussion to come to some sort of conclusion before reposting a new version.
Andrew
PATCH v3 4/5 ARM: dts: sunxi: add support for NetCube Systems Nagami Basic Carrier
In reply to Lukas SchmidThe NetCube Systems Nagami Basic Carrier is a Carrier for the Nagami SoM It provides an ethernet port for the phy on the SoM and some USB-Ports. All other interfaces and gpios are available on pinheader, except for the SD-Interface which is available on a micro-sd slot.
--- arch/arm/boot/dts/allwinner/Makefile | 2 + ...n8i-t113s-netcube-nagami-basic-carrier.dts | 63 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-basic-carrier.dts
arch/arm/boot/dts/allwinner/Makefile +2 -0
@@ -199,6 +199,7 @@ DTC_FLAGS_sun8i-h3-nanopi-r1 := -@ DTC_FLAGS_sun8i-h3-orangepi-pc := -@ DTC_FLAGS_sun8i-h3-bananapi-m2-plus-v1.2 := -@ DTC_FLAGS_sun8i-h3-orangepi-pc-plus := -@ +DTC_FLAGS_sun8i-t113s-netcube-nagami-basic-carrier := -@ DTC_FLAGS_sun8i-v3s-netcube-kumquat := -@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a23-evb.dtb \
@@ -257,6 +258,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-s3-lichee-zero-plus.dtb \ sun8i-s3-pinecube.dtb \ sun8i-t113s-mangopi-mq-r-t113.dtb \ + sun8i-t113s-netcube-nagami-basic-carrier.dtb \ sun8i-t3-cqa3t-bv3.dtb \ sun8i-v3-sl631-imx179.dtb \ sun8i-v3s-anbernic-rg-nano.dtb \
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-basic-carrier.dts new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
2.39.5
PATCH v3 5/5 ARM: dts: sunxi: add support for NetCube Systems Nagami Keypad Carrier
In reply to Lukas SchmidThe 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.
--- arch/arm/boot/dts/allwinner/Makefile | 1 + ...8i-t113s-netcube-nagami-keypad-carrier.dts | 164 ++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts
arch/arm/boot/dts/allwinner/Makefile +1 -0
@@ -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 \
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts new file +164 -0
164 lines not on this page · raw message
Signature · 1 line
2.39.5