From nobody Mon Feb 9 11:09:46 2026 Received: from mail.netcube.li (mail.netcube.li [173.249.15.149]) (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 1763520C032; Wed, 5 Feb 2025 16:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.249.15.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738774121; cv=none; b=loq9G/HzqpNvlVolNC2+TLpuwkBfmtZGz3Jtc/QFJ5drF3cPH71BFSDFSFkRkM2NshqRTSBlardcm7KIEfmavUBTtzuLmEPU5l/s6o79x05g+4L+bMpjuV7nUuR+rQ/b+xizTjUlsasYzs44o3wJ3QqZ6j3yVdF7pb6gCWHjiH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738774121; c=relaxed/simple; bh=aW20Ga3oWN9mKloTAw3jECuSEj7gVfvtiuBDixZfaOA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=htxt6/s3XLzwisylPolipaceJ8QEN10QQYUeqGFYNn3A8YDhvxLHL5N3Ae9PRckswikLWJvvzt0vUFuxpuXarKyhNdb1DE1lAQPwAA0gPCPSFY//3rcMrezyDTa1xZznQDgNFh5py48Peh8Wn3vcJc4xA8J/n1mxrNUzNK780UQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=netcube.li; spf=pass smtp.mailfrom=netcube.li; dkim=pass (1024-bit key) header.d=netcube.li header.i=@netcube.li header.b=AvwqPksi; arc=none smtp.client-ip=173.249.15.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=netcube.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netcube.li Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=netcube.li header.i=@netcube.li header.b="AvwqPksi" dkim-signature: v=1; a=rsa-sha256; d=netcube.li; s=s1; c=relaxed/relaxed; q=dns/txt; h=From:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Transfer-Encoding:In-Reply-To:References; bh=NU343bS9tujTpsxS0pvEsPWsJvqxL7DKggJ7rJQHSbU=; b=AvwqPksi1/kD+FGN8EPUXp/VOGmeDjp8Jf1XgGdficKblWPmFMZWQdlfVbZBu16e0rmV2jJSt2j1k/WavDtp2/JCtf+XnyeObjSMMJBtCwBRTuHE6SUKGHyDZZ/+b5KMrV+Fb4xPByNtfNRpFX+7q+w7Vlzi60Xii+g0qSBnH7Q= Received: from lukas-hpz440workstation.lan.sk100508.local (cm70-231.liwest.at [212.241.70.231]) by mail.netcube.li with ESMTPSA (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256) ; Wed, 5 Feb 2025 17:48:16 +0100 From: Lukas Schmid To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard Cc: Lukas Schmid , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v9 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat Date: Wed, 5 Feb 2025 17:47:13 +0100 Message-Id: <20250205164716.2509650-5-lukas.schmid@netcube.li> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250205164716.2509650-1-lukas.schmid@netcube.li> References: <20250205164716.2509650-1-lukas.schmid@netcube.li> 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" NetCube Systems Kumquat is a board based on the Allwinner V3s SoC, including: - 64MB DDR2 included in SoC - 10/100 Mbps Ethernet - USB-C DRD - Audio Codec - Isolated CAN-FD - ESP32 over SDIO - 8MB SPI-NOR Flash for bootloader - I2C EEPROM for MAC addresses - SDIO Connector for eMMC or SD-Card - 8x 12/24V IOs, 4x normally open relays - DS3232 RTC with Battery Backup - QWIIC connectors for external I2C devices Signed-off-by: Lukas Schmid --- arch/arm/boot/dts/allwinner/Makefile | 2 + .../allwinner/sun8i-v3s-netcube-kumquat.dts | 276 ++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.d= ts diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwi= nner/Makefile index 48666f73e638..d799ad153b37 100644 --- a/arch/arm/boot/dts/allwinner/Makefile +++ b/arch/arm/boot/dts/allwinner/Makefile @@ -199,6 +199,7 @@ DTC_FLAGS_sun8i-h3-nanopi-r1 :=3D -@ DTC_FLAGS_sun8i-h3-orangepi-pc :=3D -@ DTC_FLAGS_sun8i-h3-bananapi-m2-plus-v1.2 :=3D -@ DTC_FLAGS_sun8i-h3-orangepi-pc-plus :=3D -@ +DTC_FLAGS_sun8i-v3s-netcube-kumquat :=3D -@ dtb-$(CONFIG_MACH_SUN8I) +=3D \ sun8i-a23-evb.dtb \ sun8i-a23-gt90h-v4.dtb \ @@ -261,6 +262,7 @@ dtb-$(CONFIG_MACH_SUN8I) +=3D \ sun8i-v3s-anbernic-rg-nano.dtb \ sun8i-v3s-licheepi-zero.dtb \ sun8i-v3s-licheepi-zero-dock.dtb \ + sun8i-v3s-netcube-kumquat.dtb \ sun8i-v40-bananapi-m2-berry.dtb dtb-$(CONFIG_MACH_SUN9I) +=3D \ sun9i-a80-optimus.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts b/ar= ch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts new file mode 100644 index 000000000000..5143cb4e7b78 --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts @@ -0,0 +1,276 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid + */ + +/dts-v1/; +#include "sun8i-v3s.dtsi" + +#include +#include +#include + +/{ + model =3D "NetCube Systems Kumquat"; + compatible =3D "netcube,kumquat", "allwinner,sun8i-v3s"; + + aliases { + serial0 =3D &uart0; + ethernet0 =3D &emac; + rtc0 =3D &ds3232; + rtc1 =3D &rtc; /* not battery backed */ + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + /* 40 MHz Crystal Oscillator on PCB */ + clk_can0: clock-can0 { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <40000000>; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + autorepeat; + + key-user { + label =3D "GPIO Key User"; + linux,code =3D ; + gpios =3D <&pio 1 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PB2 */ + }; + }; + + leds { + compatible =3D "gpio-leds"; + + led-heartbeat { + gpios =3D <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + linux,default-trigger =3D "heartbeat"; + color =3D ; + function =3D LED_FUNCTION_HEARTBEAT; + }; + + led-mmc0-act { + gpios =3D <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + linux,default-trigger =3D "mmc0"; + color =3D ; + function =3D LED_FUNCTION_DISK; + }; + }; + + /* EA3036C Switching 3 Channel Regulator - Channel 2 */ + reg_vcc3v3: regulator-3v3 { + compatible =3D "regulator-fixed"; + regulator-name =3D "vcc3v3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + vin-supply =3D <®_vcc5v0>; + }; + + /* K7805-1000R3 Switching Regulator supplied from main 12/24V terminal bl= ock */ + reg_vcc5v0: regulator-5v0 { + compatible =3D "regulator-fixed"; + regulator-name =3D "vcc5v0"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + }; +}; + +&codec { + allwinner,audio-routing =3D + "Headphone", "HP", + "Headphone", "HPCOM", + "MIC1", "Mic", + "Mic", "HBIAS"; + status =3D "okay"; +}; + +&ehci { + status =3D "okay"; +}; + +&emac { + allwinner,leds-active-low; + nvmem-cells =3D <ð0_macaddress>; + nvmem-cell-names =3D "mac-address"; + status =3D "okay"; +}; + +&i2c0 { + status =3D "okay"; + + eeprom0: eeprom@50 { + compatible =3D "atmel,24c02"; /* actually it's a 24AA02E48 */ + reg =3D <0x50>; + pagesize =3D <16>; + read-only; + vcc-supply =3D <®_vcc3v3>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + eth0_macaddress: macaddress@fa { + reg =3D <0xfa 0x06>; + }; + }; + + tusb320: typec@60 { + compatible =3D "ti,tusb320"; + reg =3D <0x60>; + interrupts-extended =3D <&pio 1 5 IRQ_TYPE_LEVEL_LOW>; /* PB5 */ + }; + + ds3232: rtc@68 { + compatible =3D "dallas,ds3232"; + reg =3D <0x68>; + }; +}; + +/* Exposed as the Flash/SD Header on the board */ +&mmc0 { + vmmc-supply =3D <®_vcc3v3>; + bus-width =3D <4>; + broken-cd; + status =3D "okay"; +}; + +/* Connected to the on-board ESP32 */ +&mmc1 { + vmmc-supply =3D <®_vcc3v3>; + bus-width =3D <4>; + broken-cd; + status =3D "okay"; +}; + +&ohci { + status =3D "okay"; +}; + +/* Disable external 32k osc as it is broken on current revision */ +&osc32k { + status =3D "disabled"; +}; + +&pio { + vcc-pb-supply =3D <®_vcc3v3>; + vcc-pc-supply =3D <®_vcc3v3>; + vcc-pe-supply =3D <®_vcc3v3>; + vcc-pf-supply =3D <®_vcc3v3>; + vcc-pg-supply =3D <®_vcc3v3>; + + gpio-line-names =3D "", "", "", "", // PA + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "CAN_nCS", "CAN_nINT", "USER_SW", "PB3", // PB + "USB_ID", "USBC_nINT", "I2C0_SCL", "I2C0_SDA", + "UART0_TX", "UART0_RX", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "SPI_MISO", "SPI_SCK", "FLASH_nCS", "SPI_MOSI", // PC + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", // PD + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "Q12", "Q11", "Q10", "Q9", // PE + "LED_SYS0", "I1", "Q1", "Q2", + "I2", "I3", "Q3", "Q4", + "I4", "I5", "Q5", "Q6", + "I6", "I7", "Q7", "Q8", + "I8", "UART1_TXD", "UART1_RXD", "ESP_nRST", + "ESP_nBOOT", "", "", "", + "", "", "", "", + "SD_D1", "SD_D0", "SD_CLK", "SD_CMD", // PF + "SD_D3", "SD_D2", "LED_SYS1", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "ESP_CLK", "ESP_CMD", "ESP_D0", "ESP_D1", // PG + "ESP_D2", "ESP_D3", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +/* Disable external 32k osc as it is broken on current revision */ +&rtc { + /delete-property/ clocks; +}; + +/* Exposed as a USB-C connector with USB-Serial converter */ +&uart0 { + pinctrl-0 =3D <&uart0_pb_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + +/* Connected to the Bootloader/Console of the ESP32 */ +&uart1 { + pinctrl-0 =3D <&uart1_pe_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + +&usb_otg { + extcon =3D <&tusb320 0>; + dr_mode =3D "otg"; + status =3D "okay"; +}; + +&usbphy { + usb0_id_det-gpios =3D <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ + status =3D "okay"; +}; + +&spi0 { + #address-cells =3D <1>; + #size-cells =3D <0>; + cs-gpios =3D <0>, <&pio 1 0 GPIO_ACTIVE_LOW>; /* PB0 */ + status =3D "okay"; + + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + #address-cells =3D <1>; + #size-cells =3D <1>; + label =3D "firmware"; + spi-max-frequency =3D <40000000>; + }; + + can@1 { + compatible =3D "microchip,mcp2518fd"; + reg =3D <1>; + clocks =3D <&clk_can0>; + interrupts-extended =3D <&pio 1 1 IRQ_TYPE_LEVEL_LOW>; /* PB1 */ + spi-max-frequency =3D <20000000>; + vdd-supply =3D <®_vcc3v3>; + xceiver-supply =3D <®_vcc3v3>; + }; +}; --=20 2.39.5