* [PATCH v5 0/4] Add support for NetCube Systems Kumquat
@ 2025-01-06 19:06 Lukas Schmid
2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Lukas Schmid @ 2025-01-06 19:06 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard
Cc: Lukas Schmid, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel
This series adds dt-bindings and dt's for the NetCube Systems Kumquat
board.
Changes in v2:
Fix the devicetrees according to the
"dt-schema" and "make dtbs_check W=1"
Fix the License of the devicetree as requested
Create a cover letter for the patch series
Changes in v3:
Disable rtc inside the SoC again, as the rtc does not work on the
board
Add the gpio-reserved-ranges property to the pinctrl bindings
Reorder the nodes in the devicetree to match the order of the nodes
in the sun8i-v3s.dtsi file
Changes in v4:
Moved the dtsi change into a sperate patch
Update commit messages to include better descriptions
Add descriptions to the uarts and mmc nodes in the dts file
Add missing newline at the end of the dts file
Removed the gpio-reserved-ranges property from the dts and
from the pinctrl bindings
Remove the rtc status property from the dts file
Changes in v5:
Remove the unused lradc node and it's regualtor, as they
are not used on the board
Add another alias for the SoC's rtc as 'rtc1'
Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li>
---
Lukas Schmid (4):
dt-bindings: vendor-prefixes: Add NetCube Systems Austria name
dt-bindings: arm: sunxi: Add NetCube Systems Kumquat board
ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s
ARM: dts: sunxi: add support for NetCube Systems Kumquat
.../devicetree/bindings/arm/sunxi.yaml | 5 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/arm/boot/dts/allwinner/Makefile | 2 +
.../allwinner/sun8i-v3s-netcube-kumquat.dts | 274 ++++++++++++++++++
arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 6 +
5 files changed, 289 insertions(+)
create mode 100644 arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts
--
2.47.1
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name 2025-01-06 19:06 [PATCH v5 0/4] Add support for NetCube Systems Kumquat Lukas Schmid @ 2025-01-06 19:06 ` Lukas Schmid 2025-01-07 6:26 ` Krzysztof Kozlowski ` (2 more replies) 2025-01-06 19:07 ` [PATCH v5 2/4] dt-bindings: arm: sunxi: Add NetCube Systems Kumquat board Lukas Schmid ` (2 subsequent siblings) 3 siblings, 3 replies; 10+ messages in thread From: Lukas Schmid @ 2025-01-06 19:06 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard Cc: Lukas Schmid, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel NetCube Systems Austria builds Embedded Systems for use in IoT, IIoT, or Smart Home scenarios. Website is still WIP, but the Links on it are active: https://netcubesystems.at/ Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index da01616802c7..a30ed9547098 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1027,6 +1027,8 @@ patternProperties: description: Neofidelity Inc. "^neonode,.*": description: Neonode Inc. + "^netcube,.*": + description: NetCube Systems Austria "^netgear,.*": description: NETGEAR "^netlogic,.*": -- 2.47.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name 2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid @ 2025-01-07 6:26 ` Krzysztof Kozlowski 2025-01-07 6:27 ` Krzysztof Kozlowski 2025-01-07 14:54 ` Andre Przywara 2 siblings, 0 replies; 10+ messages in thread From: Krzysztof Kozlowski @ 2025-01-07 6:26 UTC (permalink / raw) To: Lukas Schmid Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, Jan 06, 2025 at 07:06:59PM +0000, Lukas Schmid wrote: > NetCube Systems Austria builds Embedded Systems for use in IoT, IIoT, > or Smart Home scenarios. > > Website is still WIP, but the Links on it are active: > https://netcubesystems.at/ > > Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> > --- `git commit --amend` (preceeded with `git add` if you changed the patch) or `git rebase -i HEAD~3`. That's how you work on your patchset to change it, regardless if you use manual process or `b4`. I really have not clue what is happening with this patch - it is like random changes appearing. Now my tag is missing, so probably the rest of patchset also has previous issues. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name 2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid 2025-01-07 6:26 ` Krzysztof Kozlowski @ 2025-01-07 6:27 ` Krzysztof Kozlowski 2025-01-07 14:54 ` Andre Przywara 2 siblings, 0 replies; 10+ messages in thread From: Krzysztof Kozlowski @ 2025-01-07 6:27 UTC (permalink / raw) To: Lukas Schmid Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, Jan 06, 2025 at 07:06:59PM +0000, Lukas Schmid wrote: > NetCube Systems Austria builds Embedded Systems for use in IoT, IIoT, > or Smart Home scenarios. > > Website is still WIP, but the Links on it are active: > https://netcubesystems.at/ > > Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> > --- > Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ > 1 file changed, 2 insertions(+) > Last time: Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- <form letter> This is an automated instruction, just in case, because many review tags are being ignored. If you know the process, you can skip it (please do not feel offended by me posting it here - no bad intentions intended). If you do not know the process, here is a short explanation: Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions of patchset, under or above your Signed-off-by tag, unless patch changed significantly (e.g. new properties added to the DT bindings). Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply. https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577 </form letter> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name 2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid 2025-01-07 6:26 ` Krzysztof Kozlowski 2025-01-07 6:27 ` Krzysztof Kozlowski @ 2025-01-07 14:54 ` Andre Przywara 2 siblings, 0 replies; 10+ messages in thread From: Andre Przywara @ 2025-01-07 14:54 UTC (permalink / raw) To: Lukas Schmid Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, 6 Jan 2025 19:06:59 +0000 Lukas Schmid <lukas.schmid@netcube.li> wrote: > NetCube Systems Austria builds Embedded Systems for use in IoT, IIoT, > or Smart Home scenarios. > > Website is still WIP, but the Links on it are active: > https://netcubesystems.at/ > > Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> Just to give some more guidance on when to drop tags and when to not: If you are making real changes to the code, then it might be indicated to drop the tag, since the patch might not be anymore what the reviewer acknowledged. But if you are just fixing (especially improving/adding to) the commit message, or fixing some typo, then you keep the tag, to reduce the churn and avoid extra work again from the reviewer. This is sometimes not easy to decide, say for instance: is renaming a variable something covered by the tag? The new name might be worse or misleading, even though the code didn't really change. But in this case it's pretty clear that Krzysztof is surely fine with you adding extra info to the commit message, and the actual patch didn't change at all, so keeping his tag would be a good thing. If you are in doubt, then it's often good to drop the tag *and* point this out, for instance in the cover letter, like: "Krzysztof, I changed this and that in patch 1/4, so I dropped your tag." Cheers, Andre > --- > Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml > index da01616802c7..a30ed9547098 100644 > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml > @@ -1027,6 +1027,8 @@ patternProperties: > description: Neofidelity Inc. > "^neonode,.*": > description: Neonode Inc. > + "^netcube,.*": > + description: NetCube Systems Austria > "^netgear,.*": > description: NETGEAR > "^netlogic,.*": ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v5 2/4] dt-bindings: arm: sunxi: Add NetCube Systems Kumquat board 2025-01-06 19:06 [PATCH v5 0/4] Add support for NetCube Systems Kumquat Lukas Schmid 2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid @ 2025-01-06 19:07 ` Lukas Schmid 2025-01-06 19:07 ` [PATCH v5 3/4] ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s Lukas Schmid 2025-01-06 19:07 ` [PATCH v5 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat Lukas Schmid 3 siblings, 0 replies; 10+ messages in thread From: Lukas Schmid @ 2025-01-06 19:07 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard Cc: Lukas Schmid, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel The NetCube Systems Kumquat is an Embedded Controller based on the Allwinner V3s SoC. It is intended for Smart Home or Industrial automation without the need for a traditional PLC Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> --- Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml index 046536d02706..f536cdd2c1a6 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.yaml +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml @@ -589,6 +589,11 @@ properties: - const: emlid,neutis-n5h3 - const: allwinner,sun8i-h3 + - description: NetCube Systems Kumquat + items: + - const: netcube,kumquat + - const: allwinner,sun8i-v3s + - description: NextThing Co. CHIP items: - const: nextthing,chip -- 2.47.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 3/4] ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s 2025-01-06 19:06 [PATCH v5 0/4] Add support for NetCube Systems Kumquat Lukas Schmid 2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid 2025-01-06 19:07 ` [PATCH v5 2/4] dt-bindings: arm: sunxi: Add NetCube Systems Kumquat board Lukas Schmid @ 2025-01-06 19:07 ` Lukas Schmid 2025-01-07 10:43 ` Andre Przywara 2025-01-06 19:07 ` [PATCH v5 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat Lukas Schmid 3 siblings, 1 reply; 10+ messages in thread From: Lukas Schmid @ 2025-01-06 19:07 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard Cc: Lukas Schmid, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel Added the uart1_pe_pins pinctrl for use by the NetCube Systems Kumquat board Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> --- arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi index 9e13c2aa8911..f909b1d4dbca 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi @@ -416,6 +416,12 @@ uart0_pb_pins: uart0-pb-pins { function = "uart0"; }; + /omit-if-no-ref/ + uart1_pe_pins: uart1-pe-pins { + pins = "PE21", "PE22"; + function = "uart1"; + }; + uart2_pins: uart2-pins { pins = "PB0", "PB1"; function = "uart2"; -- 2.47.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v5 3/4] ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s 2025-01-06 19:07 ` [PATCH v5 3/4] ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s Lukas Schmid @ 2025-01-07 10:43 ` Andre Przywara 0 siblings, 0 replies; 10+ messages in thread From: Andre Przywara @ 2025-01-07 10:43 UTC (permalink / raw) To: Lukas Schmid Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, 6 Jan 2025 19:07:01 +0000 Lukas Schmid <lukas.schmid@netcube.li> wrote: > Added the uart1_pe_pins pinctrl for use by the NetCube > Systems Kumquat board > > Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Cheers, Andre > --- > arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi > index 9e13c2aa8911..f909b1d4dbca 100644 > --- a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi > +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi > @@ -416,6 +416,12 @@ uart0_pb_pins: uart0-pb-pins { > function = "uart0"; > }; > > + /omit-if-no-ref/ > + uart1_pe_pins: uart1-pe-pins { > + pins = "PE21", "PE22"; > + function = "uart1"; > + }; > + > uart2_pins: uart2-pins { > pins = "PB0", "PB1"; > function = "uart2"; ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v5 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat 2025-01-06 19:06 [PATCH v5 0/4] Add support for NetCube Systems Kumquat Lukas Schmid ` (2 preceding siblings ...) 2025-01-06 19:07 ` [PATCH v5 3/4] ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s Lukas Schmid @ 2025-01-06 19:07 ` Lukas Schmid 2025-01-07 12:02 ` Andre Przywara 3 siblings, 1 reply; 10+ messages in thread From: Lukas Schmid @ 2025-01-06 19:07 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard Cc: Lukas Schmid, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel 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 - QWIIC connectors for external I2C devices Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> --- arch/arm/boot/dts/allwinner/Makefile | 2 + .../allwinner/sun8i-v3s-netcube-kumquat.dts | 274 ++++++++++++++++++ 2 files changed, 276 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/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 := -@ 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-v3s-netcube-kumquat := -@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a23-evb.dtb \ sun8i-a23-gt90h-v4.dtb \ @@ -261,6 +262,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ 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) += \ sun9i-a80-optimus.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts b/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts new file mode 100644 index 000000000000..b778bfa8e830 --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts @@ -0,0 +1,274 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2025 Lukas Schmid <lukas.schmid@netcube.li> + */ + +/dts-v1/; +#include "sun8i-v3s.dtsi" + +#include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> +#include <dt-bindings/gpio/gpio.h> + +/{ + model = "NetCube Systems Kumquat"; + compatible = "netcube,kumquat", "allwinner,sun8i-v3s"; + + aliases { + serial0 = &uart0; + ethernet0 = &emac; + rtc0 = &ds3232; + rtc1 = &rtc; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + /* 40 MHz Crystal Oscillator on PCB */ + clk_can0: clock-can0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + key-user { + label = "GPIO Key User"; + linux,code = <KEY_PROG1>; + gpios = <&pio 1 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PB2 */ + }; + }; + + leds { + compatible = "gpio-leds"; + + led-heartbeat { + gpios = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + linux,default-trigger = "heartbeat"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_HEARTBEAT; + }; + + led-mmc0-act { + gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + linux,default-trigger = "mmc0"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_DISK; + }; + }; + + /* EA3036C Switching 3 Channel Regulator - Channel 2 */ + reg_vcc3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <®_vcc5v0>; + }; + + /* K7805-1000R3 Switching Regulator supplied from main 12/24V terminal block */ + reg_vcc5v0: regulator-5v0 { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; +}; + +/* Exposed as the Flash/SD Header on the board */ +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + broken-cd; + status = "okay"; +}; + +/* Connected to the on-board ESP32 */ +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + broken-cd; + status = "okay"; +}; + +&usb_otg { + extcon = <&tusb320 0>; + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pio { + vcc-pb-supply = <®_vcc3v3>; + vcc-pc-supply = <®_vcc3v3>; + vcc-pe-supply = <®_vcc3v3>; + vcc-pf-supply = <®_vcc3v3>; + vcc-pg-supply = <®_vcc3v3>; + + gpio-line-names = "", "", "", "", // 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", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +&codec { + allwinner,audio-routing = + "Headphone", "HP", + "Headphone", "HPCOM", + "MIC1", "Mic", + "Mic", "HBIAS"; + status = "okay"; +}; + +/* Exposed as a USB-C connector with USB-Serial converter */ +&uart0 { + pinctrl-0 = <&uart0_pb_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Connected to the Bootloader/Console of the ESP32 */ +&uart1 { + pinctrl-0 = <&uart1_pe_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2c0 { + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; + + ds3232: rtc@68 { + compatible = "dallas,ds3232"; + reg = <0x68>; + }; + + eeprom0: eeprom@50 { + compatible = "atmel,24c02"; /* actually it's a 24AA02E48 */ + pagesize = <16>; + read-only; + reg = <0x50>; + vcc-supply = <®_vcc3v3>; + + #address-cells = <1>; + #size-cells = <1>; + + eth0_macaddress: macaddress@fa { + reg = <0xfa 0x06>; + }; + }; + + tusb320: typec@60 { + compatible = "ti,tusb320"; + reg = <0x60>; + interrupt-parent = <&pio>; + interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; + }; +}; + +&emac { + allwinner,leds-active-low; + nvmem-cells = <ð0_macaddress>; /* custom nvmem reference */ + nvmem-cell-names = "mac-address"; /* see ethernet-controller.yaml */ + status = "okay"; +}; + +&spi0 { + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <0>, <&pio 1 0 GPIO_ACTIVE_LOW>; /* PB0 */ + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + label = "firmware"; + spi-max-frequency = <40000000>; + }; + + can@1 { + compatible = "microchip,mcp2518fd"; + reg = <1>; + clocks = <&clk_can0>; + interrupt-parent = <&pio>; + interrupts = <1 1 IRQ_TYPE_LEVEL_LOW>; /* PB1 */ + spi-max-frequency = <20000000>; + vdd-supply = <®_vcc3v3>; + xceiver-supply = <®_vcc3v3>; + }; +}; -- 2.47.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v5 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat 2025-01-06 19:07 ` [PATCH v5 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat Lukas Schmid @ 2025-01-07 12:02 ` Andre Przywara 0 siblings, 0 replies; 10+ messages in thread From: Andre Przywara @ 2025-01-07 12:02 UTC (permalink / raw) To: Lukas Schmid Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, 6 Jan 2025 19:07:02 +0000 Lukas Schmid <lukas.schmid@netcube.li> wrote: Hi, > 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 > - QWIIC connectors for external I2C devices > > Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li> > --- > arch/arm/boot/dts/allwinner/Makefile | 2 + > .../allwinner/sun8i-v3s-netcube-kumquat.dts | 274 ++++++++++++++++++ > 2 files changed, 276 insertions(+) > create mode 100644 arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts > > diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/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 := -@ > 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-v3s-netcube-kumquat := -@ > dtb-$(CONFIG_MACH_SUN8I) += \ > sun8i-a23-evb.dtb \ > sun8i-a23-gt90h-v4.dtb \ > @@ -261,6 +262,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ > 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) += \ > sun9i-a80-optimus.dtb \ > diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts b/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts > new file mode 100644 > index 000000000000..b778bfa8e830 > --- /dev/null > +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s-netcube-kumquat.dts > @@ -0,0 +1,274 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (C) 2025 Lukas Schmid <lukas.schmid@netcube.li> > + */ > + > +/dts-v1/; > +#include "sun8i-v3s.dtsi" > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/leds/common.h> > +#include <dt-bindings/gpio/gpio.h> > + > +/{ > + model = "NetCube Systems Kumquat"; > + compatible = "netcube,kumquat", "allwinner,sun8i-v3s"; > + > + aliases { > + serial0 = &uart0; > + ethernet0 = &emac; > + rtc0 = &ds3232; > + rtc1 = &rtc; Please add a brief comment as to why you de-prioritise the internal RTC, something like "not battery backed" or so. > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + /* 40 MHz Crystal Oscillator on PCB */ > + clk_can0: clock-can0 { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <40000000>; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + autorepeat; > + > + key-user { > + label = "GPIO Key User"; > + linux,code = <KEY_PROG1>; > + gpios = <&pio 1 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PB2 */ > + }; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + led-heartbeat { > + gpios = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ > + linux,default-trigger = "heartbeat"; > + color = <LED_COLOR_ID_GREEN>; > + function = LED_FUNCTION_HEARTBEAT; > + }; > + > + led-mmc0-act { > + gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ > + linux,default-trigger = "mmc0"; > + color = <LED_COLOR_ID_GREEN>; > + function = LED_FUNCTION_DISK; > + }; > + }; > + > + /* EA3036C Switching 3 Channel Regulator - Channel 2 */ > + reg_vcc3v3: regulator-3v3 { > + compatible = "regulator-fixed"; > + regulator-name = "vcc3v3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + vin-supply = <®_vcc5v0>; > + }; > + > + /* K7805-1000R3 Switching Regulator supplied from main 12/24V terminal block */ > + reg_vcc5v0: regulator-5v0 { > + compatible = "regulator-fixed"; > + regulator-name = "vcc5v0"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + }; > +}; > + > +/* Exposed as the Flash/SD Header on the board */ > +&mmc0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc0_pins>; The pinctrl properties are already in the .dtsi file, because there is only one set of pins connected to this MMC controller. So please remove those two lines here, as they are redundant. > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + broken-cd; > + status = "okay"; > +}; > + > +/* Connected to the on-board ESP32 */ > +&mmc1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc1_pins>; Same here, only one set of pins, so they are in the .dtsi already. > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + broken-cd; > + status = "okay"; > +}; > + > +&usb_otg { Please keep the nodes ordered by their node name alias, as this is what the other .dts files do (ignoring some single node outliers). The DTS coding style indeed says: ================= 3. When extending nodes in the board DTS via &label, the entries shall be ordered either alpha-numerically or by keeping the order from DTSI, ... ================= but it continues: ================= ... where the choice depends on the subarchitecture. ================= So in this case sunxi decided to order .dts label references by the label name, because that's the only thing visible in this file. > + extcon = <&tusb320 0>; > + dr_mode = "otg"; > + status = "okay"; > +}; > + > +&usbphy { > + usb0_id_det-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ > + status = "okay"; > +}; > + > +&ehci { > + status = "okay"; > +}; > + > +&ohci { > + status = "okay"; > +}; > + > +&pio { > + vcc-pb-supply = <®_vcc3v3>; > + vcc-pc-supply = <®_vcc3v3>; > + vcc-pe-supply = <®_vcc3v3>; > + vcc-pf-supply = <®_vcc3v3>; > + vcc-pg-supply = <®_vcc3v3>; > + > + gpio-line-names = "", "", "", "", // 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", "", "", > + "", "", "", "", > + "", "", "", "", > + "", "", "", "", > + "", "", "", "", > + "", "", "", "", > + "", "", "", ""; > +}; > + > +&codec { > + allwinner,audio-routing = > + "Headphone", "HP", > + "Headphone", "HPCOM", > + "MIC1", "Mic", > + "Mic", "HBIAS"; > + status = "okay"; > +}; > + > +/* Exposed as a USB-C connector with USB-Serial converter */ > +&uart0 { > + pinctrl-0 = <&uart0_pb_pins>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +/* Connected to the Bootloader/Console of the ESP32 */ > +&uart1 { > + pinctrl-0 = <&uart1_pe_pins>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +&i2c0 { > + pinctrl-0 = <&i2c0_pins>; > + pinctrl-names = "default"; Those two properties are redundant, since the .dtsi already defines them. > + status = "okay"; > + > + ds3232: rtc@68 { > + compatible = "dallas,ds3232"; > + reg = <0x68>; > + }; > + > + eeprom0: eeprom@50 { > + compatible = "atmel,24c02"; /* actually it's a 24AA02E48 */ > + pagesize = <16>; > + read-only; > + reg = <0x50>; Please move "reg" up, to appear after "compatible", to comply with the DTS coding style. It makes it easier to read the DT and see the most important infos first. > + vcc-supply = <®_vcc3v3>; > + > + #address-cells = <1>; > + #size-cells = <1>; > + > + eth0_macaddress: macaddress@fa { > + reg = <0xfa 0x06>; > + }; > + }; > + > + tusb320: typec@60 { > + compatible = "ti,tusb320"; > + reg = <0x60>; > + interrupt-parent = <&pio>; > + interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; > + }; > +}; > + > +&emac { > + allwinner,leds-active-low; > + nvmem-cells = <ð0_macaddress>; /* custom nvmem reference */ > + nvmem-cell-names = "mac-address"; /* see ethernet-controller.yaml */ I don't think you need those comments. > + status = "okay"; > +}; > + > +&spi0 { > + #address-cells = <1>; > + #size-cells = <0>; > + cs-gpios = <0>, <&pio 1 0 GPIO_ACTIVE_LOW>; /* PB0 */ > + status = "okay"; > + > + flash@0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "jedec,spi-nor"; > + reg = <0>; The DTS coding style says that compatible and reg should come first, then common properties. So please move #address-cells and #size-cells down here. Cheers, Andre > + label = "firmware"; > + spi-max-frequency = <40000000>; > + }; > + > + can@1 { > + compatible = "microchip,mcp2518fd"; > + reg = <1>; > + clocks = <&clk_can0>; > + interrupt-parent = <&pio>; > + interrupts = <1 1 IRQ_TYPE_LEVEL_LOW>; /* PB1 */ > + spi-max-frequency = <20000000>; > + vdd-supply = <®_vcc3v3>; > + xceiver-supply = <®_vcc3v3>; > + }; > +}; ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-01-07 15:00 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-01-06 19:06 [PATCH v5 0/4] Add support for NetCube Systems Kumquat Lukas Schmid 2025-01-06 19:06 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add NetCube Systems Austria name Lukas Schmid 2025-01-07 6:26 ` Krzysztof Kozlowski 2025-01-07 6:27 ` Krzysztof Kozlowski 2025-01-07 14:54 ` Andre Przywara 2025-01-06 19:07 ` [PATCH v5 2/4] dt-bindings: arm: sunxi: Add NetCube Systems Kumquat board Lukas Schmid 2025-01-06 19:07 ` [PATCH v5 3/4] ARM: dts: sunxi: add uart1_pe pinctrl for sun8i-v3s Lukas Schmid 2025-01-07 10:43 ` Andre Przywara 2025-01-06 19:07 ` [PATCH v5 4/4] ARM: dts: sunxi: add support for NetCube Systems Kumquat Lukas Schmid 2025-01-07 12:02 ` Andre Przywara
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).