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

Merge tag 'sunxi-dt-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt

Allwinner Device Tree changes for 6.18

This tag contains two DT binding header changes that are shared with
the clk tree.

In this cycle we gained support for the MCU PRCM clock and reset
controller on the A523/A527/T527 family of SoCs, the NPU which is a
Vivante GC9000 IP block, and the NPU clock that was missing. The other
PRCM clock controller gained default bus clock rate settings. These
were not configured in the upstream U-boot bootloader, leading to them
running at slower rates. The assigned rates are from the user manual.

There is also a new board, the NetCube Systems Nagami SoM and two of
its carrier boards.

The A523 family development boards now have their internal RTC clocks
configured correctly, so that the RTC does not drift wildly. The missing
functions for the AXP717 on these boards are added. Missing reset GPIOs
and delays for Ethernet PHYs are added. Last, the Cubie A5E now has its
LEDs described and usable.

An overlay for the Orange Pi Zero interface (addon) board was added.
This can be used with the Orange Pi Zero and Zero Plus 2. Default audio
routing for these two boards (to be used with the addon) were added to
complement the overlay.

* tag 'sunxi-dt-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
arm64: dts: allwinner: sun55i: Complete AXP717A sub-functions
arm64: dts: allwinner: t527: orangepi-4a: hook up external 32k crystal
arm64: dts: allwinner: t527: avaota-a1: hook up external 32k crystal
arm64: dts: allwinner: a527: cubie-a5e: Drop external 32.768 KHz crystal
arm64: dts: sun55i: a523: Assign standard clock rates to PRCM bus clocks
ARM: dts: sunxi: add support for NetCube Systems Nagami Keypad Carrier
ARM: dts: sunxi: add support for NetCube Systems Nagami Basic Carrier
ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
riscv: dts: allwinner: d1s-t113: Add pinctrl's required by NetCube Systems Nagami SoM
dt-bindings: arm: sunxi: Add NetCube Systems Nagami SoM and carrier board bindings
ARM: dts: allwinner: Add Orange Pi Zero Interface Board overlay
ARM: dts: allwinner: orangepi-zero-plus2: Add default audio routing
ARM: dts: allwinner: orangepi-zero: Add default audio routing
arm64: dts: allwinner: a523: Add NPU device node
arm64: dts: allwinner: a523: Add MCU PRCM CCU node
dt-bindings: clock: sun55i-a523-ccu: Add A523 MCU CCU clock controller
dt-bindings: clock: sun55i-a523-ccu: Add missing NPU module clock
arm64: dts: allwinner: t527: avaota-a1: Add ethernet PHY reset setting
arm64: dts: allwinner: a527: cubie-a5e: Add ethernet PHY reset setting
arm64: dts: allwinner: a527: cubie-a5e: Add LEDs

Link: https://lore.kernel.org/r/aMrtuZg8HlR--TAt@wens.tw
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+853 -7
+8
Documentation/devicetree/bindings/arm/sunxi.yaml
··· 595 595 - const: netcube,kumquat 596 596 - const: allwinner,sun8i-v3s 597 597 598 + - description: NetCube Systems Nagami SoM based boards 599 + items: 600 + - enum: 601 + - netcube,nagami-basic-carrier 602 + - netcube,nagami-keypad-carrier 603 + - const: netcube,nagami 604 + - const: allwinner,sun8i-t113s 605 + 598 606 - description: NextThing Co. CHIP 599 607 items: 600 608 - const: nextthing,chip
+35 -2
Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
··· 19 19 compatible: 20 20 enum: 21 21 - allwinner,sun55i-a523-ccu 22 + - allwinner,sun55i-a523-mcu-ccu 22 23 - allwinner,sun55i-a523-r-ccu 23 24 24 25 reg: ··· 27 26 28 27 clocks: 29 28 minItems: 4 30 - maxItems: 5 29 + maxItems: 9 31 30 32 31 clock-names: 33 32 minItems: 4 34 - maxItems: 5 33 + maxItems: 9 35 34 36 35 required: 37 36 - "#clock-cells" ··· 63 62 - const: losc 64 63 - const: iosc 65 64 - const: losc-fanout 65 + 66 + - if: 67 + properties: 68 + compatible: 69 + enum: 70 + - allwinner,sun55i-a523-mcu-ccu 71 + 72 + then: 73 + properties: 74 + clocks: 75 + items: 76 + - description: High Frequency Oscillator (usually at 24MHz) 77 + - description: Low Frequency Oscillator (usually at 32kHz) 78 + - description: Internal Oscillator 79 + - description: Audio PLL (4x) 80 + - description: Peripherals PLL 0 (300 MHz output) 81 + - description: DSP module clock 82 + - description: MBUS clock 83 + - description: PRCM AHB clock 84 + - description: PRCM APB0 clock 85 + 86 + clock-names: 87 + items: 88 + - const: hosc 89 + - const: losc 90 + - const: iosc 91 + - const: pll-audio0-4x 92 + - const: pll-periph0-300m 93 + - const: dsp 94 + - const: mbus 95 + - const: r-ahb 96 + - const: r-apb0 66 97 67 98 - if: 68 99 properties:
+10
arch/arm/boot/dts/allwinner/Makefile
··· 182 182 sun7i-a20-wits-pro-a20-dkt.dtb 183 183 184 184 # Enables support for device-tree overlays for all pis 185 + DTC_FLAGS_sun8i-h2-plus-orangepi-zero := -@ 185 186 DTC_FLAGS_sun8i-h3-orangepi-lite := -@ 186 187 DTC_FLAGS_sun8i-h3-bananapi-m2-plus := -@ 187 188 DTC_FLAGS_sun8i-h3-nanopi-m1-plus := -@ ··· 200 199 DTC_FLAGS_sun8i-h3-orangepi-pc := -@ 201 200 DTC_FLAGS_sun8i-h3-bananapi-m2-plus-v1.2 := -@ 202 201 DTC_FLAGS_sun8i-h3-orangepi-pc-plus := -@ 202 + DTC_FLAGS_sun8i-t113s-netcube-nagami-basic-carrier := -@ 203 203 DTC_FLAGS_sun8i-v3s-netcube-kumquat := -@ 204 204 dtb-$(CONFIG_MACH_SUN8I) += \ 205 205 sun8i-a23-evb.dtb \ ··· 227 225 sun8i-h2-plus-libretech-all-h3-cc.dtb \ 228 226 sun8i-h2-plus-orangepi-r1.dtb \ 229 227 sun8i-h2-plus-orangepi-zero.dtb \ 228 + sun8i-h2-plus-orangepi-zero-interface-board.dtb \ 230 229 sun8i-h3-bananapi-m2-plus.dtb \ 231 230 sun8i-h3-bananapi-m2-plus-v1.2.dtb \ 232 231 sun8i-h3-beelink-x2.dtb \ ··· 247 244 sun8i-h3-orangepi-plus.dtb \ 248 245 sun8i-h3-orangepi-plus2e.dtb \ 249 246 sun8i-h3-orangepi-zero-plus2.dtb \ 247 + sun8i-h3-orangepi-zero-plus2-interface-board.dtb \ 250 248 sun8i-h3-rervision-dvk.dtb \ 251 249 sun8i-h3-zeropi.dtb \ 252 250 sun8i-h3-emlid-neutis-n5h3-devboard.dtb \ ··· 261 257 sun8i-s3-lichee-zero-plus.dtb \ 262 258 sun8i-s3-pinecube.dtb \ 263 259 sun8i-t113s-mangopi-mq-r-t113.dtb \ 260 + sun8i-t113s-netcube-nagami-basic-carrier.dtb \ 261 + sun8i-t113s-netcube-nagami-keypad-carrier.dtb \ 264 262 sun8i-t3-cqa3t-bv3.dtb \ 265 263 sun8i-v3-sl631-imx179.dtb \ 266 264 sun8i-v3s-anbernic-rg-nano.dtb \ ··· 270 264 sun8i-v3s-licheepi-zero-dock.dtb \ 271 265 sun8i-v3s-netcube-kumquat.dtb \ 272 266 sun8i-v40-bananapi-m2-berry.dtb 267 + sun8i-h2-plus-orangepi-zero-interface-board-dtbs += \ 268 + sun8i-h2-plus-orangepi-zero.dtb sun8i-orangepi-zero-interface-board.dtbo 269 + sun8i-h3-orangepi-zero-plus2-interface-board-dtbs += \ 270 + sun8i-h3-orangepi-zero-plus2.dtb sun8i-orangepi-zero-interface-board.dtbo 273 271 dtb-$(CONFIG_MACH_SUN9I) += \ 274 272 sun9i-a80-optimus.dtb \ 275 273 sun9i-a80-cubieboard4.dtb
+14
arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
··· 112 112 }; 113 113 }; 114 114 115 + /* 116 + * Audio input/output is exposed on the 13-pin header and can't be used for 117 + * anything else. However, adapter boards may use different audio routing. 118 + * - https://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Expansion_Port 119 + * - Allwinner H3 Datasheet, section 3.1. Pin Characteristics 120 + */ 121 + &codec { 122 + allwinner,audio-routing = 123 + "Line Out", "LINEOUT", 124 + "MIC1", "Mic", 125 + "Mic", "MBIAS"; 126 + status = "disabled"; 127 + }; 128 + 115 129 &cpu0 { 116 130 cpu-supply = <&reg_vdd_cpux>; 117 131 };
+14
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts
··· 99 99 }; 100 100 }; 101 101 102 + /* 103 + * Audio input/output is exposed on the 13-pin header and can't be used for 104 + * anything else. However, adapter boards may use different audio routing. 105 + * - http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-Plus-2.html 106 + * - Allwinner H3 Datasheet, section 3.1. Pin Characteristics 107 + */ 108 + &codec { 109 + allwinner,audio-routing = 110 + "Line Out", "LINEOUT", 111 + "MIC1", "Mic", 112 + "Mic", "MBIAS"; 113 + status = "disabled"; 114 + }; 115 + 102 116 &de { 103 117 status = "okay"; 104 118 };
+46
arch/arm/boot/dts/allwinner/sun8i-orangepi-zero-interface-board.dtso
··· 1 + // SPDX-License-Identifier: (GPL-2.0-or-later OR X11) 2 + /* 3 + * Copyright (C) 2025 J. Neuschäfer <j.ne@posteo.net> 4 + * 5 + * Devicetree overlay for the Orange Pi Zero Interface board (OP0014). 6 + * 7 + * https://orangepi.com/index.php?route=product/product&product_id=871 8 + * 9 + * This overlay applies to the following base files: 10 + * 11 + * - arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts 12 + * - arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts 13 + */ 14 + 15 + /dts-v1/; 16 + /plugin/; 17 + 18 + &codec { 19 + status = "okay"; 20 + }; 21 + 22 + &de { 23 + status = "okay"; 24 + }; 25 + 26 + &ehci2 { 27 + status = "okay"; 28 + }; 29 + 30 + &ehci3 { 31 + status = "okay"; 32 + }; 33 + 34 + &ir { 35 + pinctrl-names = "default"; 36 + pinctrl-0 = <&r_ir_rx_pin>; 37 + status = "okay"; 38 + }; 39 + 40 + &ohci2 { 41 + status = "okay"; 42 + }; 43 + 44 + &ohci3 { 45 + status = "okay"; 46 + };
+67
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-basic-carrier.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (C) 2025 Lukas Schmid <lukas.schmid@netcube.li> 4 + */ 5 + 6 + /dts-v1/; 7 + #include "sun8i-t113s-netcube-nagami.dtsi" 8 + 9 + / { 10 + model = "NetCube Systems Nagami Basic Carrier Board"; 11 + compatible = "netcube,nagami-basic-carrier", "netcube,nagami", 12 + "allwinner,sun8i-t113s"; 13 + }; 14 + 15 + &can0 { 16 + status = "okay"; 17 + }; 18 + 19 + &can1 { 20 + status = "okay"; 21 + }; 22 + 23 + &ehci0 { 24 + status = "okay"; 25 + }; 26 + 27 + &ehci1 { 28 + status = "okay"; 29 + }; 30 + 31 + &i2c2 { 32 + status = "okay"; 33 + }; 34 + 35 + &i2s1 { 36 + status = "okay"; 37 + }; 38 + 39 + &mmc0 { 40 + vmmc-supply = <&reg_vcc3v3>; 41 + broken-cd; 42 + disable-wp; 43 + bus-width = <4>; 44 + status = "okay"; 45 + }; 46 + 47 + &ohci0 { 48 + status = "okay"; 49 + }; 50 + 51 + &ohci1 { 52 + status = "okay"; 53 + }; 54 + 55 + &spi1 { 56 + status = "okay"; 57 + }; 58 + 59 + &usb_otg { 60 + dr_mode = "otg"; 61 + status = "okay"; 62 + }; 63 + 64 + &usbphy { 65 + usb0_id_det-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ 66 + status = "okay"; 67 + };
+129
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami-keypad-carrier.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (C) 2025 Lukas Schmid <lukas.schmid@netcube.li> 4 + */ 5 + 6 + /dts-v1/; 7 + #include "sun8i-t113s-netcube-nagami.dtsi" 8 + 9 + #include <dt-bindings/input/input.h> 10 + #include <dt-bindings/leds/common.h> 11 + 12 + / { 13 + model = "NetCube Systems Nagami Keypad Carrier Board"; 14 + compatible = "netcube,nagami-keypad-carrier", "netcube,nagami", 15 + "allwinner,sun8i-t113s"; 16 + 17 + leds { 18 + compatible = "gpio-leds"; 19 + 20 + led_status_red: led-status-red { 21 + gpios = <&pio 3 16 GPIO_ACTIVE_HIGH>; /* PD16 */ 22 + color = <LED_COLOR_ID_RED>; 23 + function = LED_FUNCTION_STATUS; 24 + }; 25 + 26 + led_status_green: led-status-green { 27 + gpios = <&pio 3 22 GPIO_ACTIVE_HIGH>; /* PD22 */ 28 + color = <LED_COLOR_ID_GREEN>; 29 + function = LED_FUNCTION_STATUS; 30 + }; 31 + }; 32 + }; 33 + 34 + &i2c2 { 35 + status = "okay"; 36 + 37 + tca8418: keypad@34 { 38 + compatible = "ti,tca8418"; 39 + reg = <0x34>; 40 + interrupts-extended = <&pio 5 6 IRQ_TYPE_EDGE_FALLING>; /* PF6 */ 41 + linux,keymap = <MATRIX_KEY(0x03, 0x00, KEY_NUMERIC_A) 42 + MATRIX_KEY(0x03, 0x01, KEY_NUMERIC_1) 43 + MATRIX_KEY(0x03, 0x02, KEY_NUMERIC_2) 44 + MATRIX_KEY(0x03, 0x03, KEY_NUMERIC_3) 45 + MATRIX_KEY(0x02, 0x00, KEY_NUMERIC_B) 46 + MATRIX_KEY(0x02, 0x01, KEY_NUMERIC_4) 47 + MATRIX_KEY(0x02, 0x02, KEY_NUMERIC_5) 48 + MATRIX_KEY(0x02, 0x03, KEY_NUMERIC_6) 49 + MATRIX_KEY(0x01, 0x00, KEY_NUMERIC_C) 50 + MATRIX_KEY(0x01, 0x01, KEY_NUMERIC_7) 51 + MATRIX_KEY(0x01, 0x02, KEY_NUMERIC_8) 52 + MATRIX_KEY(0x01, 0x03, KEY_NUMERIC_9) 53 + MATRIX_KEY(0x00, 0x00, KEY_NUMERIC_D) 54 + MATRIX_KEY(0x00, 0x01, KEY_CLEAR) 55 + MATRIX_KEY(0x00, 0x02, KEY_NUMERIC_0) 56 + MATRIX_KEY(0x00, 0x03, KEY_OK) 57 + >; 58 + keypad,num-rows = <4>; 59 + keypad,num-columns = <4>; 60 + }; 61 + }; 62 + 63 + &pio { 64 + gpio-line-names = "", "", "", "", // PA 65 + "", "", "", "", 66 + "", "", "", "", 67 + "", "", "", "", 68 + "", "", "", "", 69 + "", "", "", "", 70 + "", "", "", "", 71 + "", "", "", "", 72 + "", "", "", "", // PB 73 + "", "", "UART3_TX", "UART3_RX", 74 + "", "", "", "", 75 + "", "", "", "", 76 + "", "", "", "", 77 + "", "", "", "", 78 + "", "", "", "", 79 + "", "", "", "", 80 + "", "", "eMMC_CLK", "eMMC_CMD", // PC 81 + "eMMC_D2", "eMMC_D1", "eMMC_D0", "eMMC_D3", 82 + "", "", "", "", 83 + "", "", "", "", 84 + "", "", "", "", 85 + "", "", "", "", 86 + "", "", "", "", 87 + "", "", "", "", 88 + "", "", "", "", // PD 89 + "", "", "", "", 90 + "", "USB_SEC_EN", "", "", 91 + "", "", "", "", 92 + "LED_STATUS_RED", "", "", "", 93 + "I2C2_SCL", "I2C2_SDA", "LED_STATUS_GREEN", "", 94 + "", "", "", "", 95 + "", "", "", "", 96 + "ETH_CRSDV", "ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PE 97 + "ETH_TXD0", "ETH_TXD1", "ETH_TXEN", "", 98 + "ETH_MDC", "ETH_MDIO", "QWIIC_nINT", "", 99 + "", "", "", "", 100 + "", "", "", "", 101 + "", "", "", "", 102 + "", "", "", "", 103 + "", "", "", "", 104 + "", "", "", "", // PF 105 + "", "", "KEY_nINT", "", 106 + "", "", "", "", 107 + "", "", "", "", 108 + "", "", "", "", 109 + "", "", "", "", 110 + "", "", "", "", 111 + "", "", "", "", 112 + "ESP_CLK", "ESP_CMD", "ESP_D0", "ESP_D1", // PG 113 + "ESP_D2", "ESP_D3", "UART1_TXD", "UART1_RXD", 114 + "ESP_nBOOT", "ESP_nRST", "I2C3_SCL", "I2C3_SDA", 115 + "", "", "", "", 116 + "", "", "", "", 117 + "", "", "", "", 118 + "", "", "", "", 119 + "", "", "", ""; 120 + }; 121 + 122 + &usb_otg { 123 + dr_mode = "peripheral"; 124 + status = "okay"; 125 + }; 126 + 127 + &usbphy { 128 + status = "okay"; 129 + };
+250
arch/arm/boot/dts/allwinner/sun8i-t113s-netcube-nagami.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (C) 2025 Lukas Schmid <lukas.schmid@netcube.li> 4 + */ 5 + 6 + /dts-v1/; 7 + #include "sun8i-t113s.dtsi" 8 + 9 + #include <dt-bindings/gpio/gpio.h> 10 + #include <dt-bindings/interrupt-controller/irq.h> 11 + 12 + / { 13 + model = "NetCube Systems Nagami SoM"; 14 + compatible = "netcube,nagami", "allwinner,sun8i-t113s"; 15 + 16 + aliases { 17 + serial1 = &uart1; // ESP32 Bootloader UART 18 + serial3 = &uart3; // Console UART on Card Edge 19 + ethernet0 = &emac; 20 + }; 21 + 22 + chosen { 23 + stdout-path = "serial3:115200n8"; 24 + }; 25 + 26 + /* module wide 3.3V supply directly from the card edge */ 27 + reg_vcc3v3: regulator-3v3 { 28 + compatible = "regulator-fixed"; 29 + regulator-name = "vcc-3v3"; 30 + regulator-min-microvolt = <3300000>; 31 + regulator-max-microvolt = <3300000>; 32 + regulator-always-on; 33 + }; 34 + 35 + /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ 36 + reg_vcc_core: regulator-core { 37 + compatible = "regulator-fixed"; 38 + regulator-name = "vcc-core"; 39 + regulator-min-microvolt = <880000>; 40 + regulator-max-microvolt = <880000>; 41 + vin-supply = <&reg_vcc3v3>; 42 + }; 43 + 44 + /* USB0 MUX to switch connect to Card-Edge only after BootROM */ 45 + usb0_sec_mux: mux-controller{ 46 + compatible = "gpio-mux"; 47 + #mux-control-cells = <0>; 48 + mux-gpios = <&pio 3 9 GPIO_ACTIVE_HIGH>; /* PD9 */ 49 + idle-state = <1>; /* USB connected to Card-Edge by default */ 50 + }; 51 + 52 + /* Reset of ESP32 */ 53 + wifi_pwrseq: wifi-pwrseq { 54 + compatible = "mmc-pwrseq-simple"; 55 + reset-gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ 56 + post-power-on-delay-ms = <1500>; 57 + power-off-delay-us = <200>; 58 + }; 59 + }; 60 + 61 + &cpu0 { 62 + cpu-supply = <&reg_vcc_core>; 63 + }; 64 + 65 + &cpu1 { 66 + cpu-supply = <&reg_vcc_core>; 67 + }; 68 + 69 + &dcxo { 70 + clock-frequency = <24000000>; 71 + }; 72 + 73 + &emac { 74 + nvmem-cells = <&eth0_macaddress>; 75 + nvmem-cell-names = "mac-address"; 76 + phy-handle = <&lan8720a>; 77 + phy-mode = "rmii"; 78 + pinctrl-0 = <&rmii_pe_pins>; 79 + pinctrl-names = "default"; 80 + status = "okay"; 81 + }; 82 + 83 + /* Default I2C Interface on Card-Edge */ 84 + &i2c2 { 85 + pinctrl-0 = <&i2c2_pd_pins>; 86 + pinctrl-names = "default"; 87 + status = "disabled"; 88 + }; 89 + 90 + /* Exposed as the QWIIC connector and used by the internal EEPROM */ 91 + &i2c3 { 92 + pinctrl-0 = <&i2c3_pg_pins>; 93 + pinctrl-names = "default"; 94 + status = "okay"; 95 + 96 + eeprom0: eeprom@50 { 97 + compatible = "atmel,24c02"; /* actually it's a 24AA02E48 */ 98 + reg = <0x50>; 99 + pagesize = <16>; 100 + read-only; 101 + vcc-supply = <&reg_vcc3v3>; 102 + 103 + #address-cells = <1>; 104 + #size-cells = <1>; 105 + 106 + eth0_macaddress: macaddress@fa { 107 + reg = <0xfa 0x06>; 108 + }; 109 + }; 110 + }; 111 + 112 + /* Default I2S Interface on Card-Edge */ 113 + &i2s1 { 114 + pinctrl-0 = <&i2s1_pins>, <&i2s1_din0_pin>, <&i2s1_dout0_pin>; 115 + pinctrl-names = "default"; 116 + status = "disabled"; 117 + }; 118 + 119 + /* Phy is on SoM. MDI signals pre-magnetics are on the card edge */ 120 + &mdio { 121 + lan8720a: ethernet-phy@0 { 122 + compatible = "ethernet-phy-ieee802.3-c22"; 123 + reg = <0>; 124 + }; 125 + }; 126 + 127 + /* Default SD Interface on Card-Edge */ 128 + &mmc0 { 129 + pinctrl-0 = <&mmc0_pins>; 130 + pinctrl-names = "default"; 131 + status = "disabled"; 132 + }; 133 + 134 + /* Connected to the on-board ESP32 */ 135 + &mmc1 { 136 + pinctrl-0 = <&mmc1_pins>; 137 + pinctrl-names = "default"; 138 + vmmc-supply = <&reg_vcc3v3>; 139 + bus-width = <4>; 140 + non-removable; 141 + mmc-pwrseq = <&wifi_pwrseq>; 142 + status = "okay"; 143 + }; 144 + 145 + /* Connected to the on-board eMMC */ 146 + &mmc2 { 147 + pinctrl-0 = <&mmc2_pins>; 148 + pinctrl-names = "default"; 149 + vmmc-supply = <&reg_vcc3v3>; 150 + vqmmc-supply = <&reg_vcc3v3>; 151 + bus-width = <4>; 152 + non-removable; 153 + status = "okay"; 154 + }; 155 + 156 + &pio { 157 + vcc-pb-supply = <&reg_vcc3v3>; 158 + vcc-pc-supply = <&reg_vcc3v3>; 159 + vcc-pd-supply = <&reg_vcc3v3>; 160 + vcc-pe-supply = <&reg_vcc3v3>; 161 + vcc-pf-supply = <&reg_vcc3v3>; 162 + vcc-pg-supply = <&reg_vcc3v3>; 163 + 164 + gpio-line-names = "", "", "", "", // PA 165 + "", "", "", "", 166 + "", "", "", "", 167 + "", "", "", "", 168 + "", "", "", "", 169 + "", "", "", "", 170 + "", "", "", "", 171 + "", "", "", "", 172 + "", "", "CAN0_TX", "CAN0_RX", // PB 173 + "CAN1_TX", "CAN1_RX", "UART3_TX", "UART3_RX", 174 + "", "", "", "", 175 + "", "", "", "", 176 + "", "", "", "", 177 + "", "", "", "", 178 + "", "", "", "", 179 + "", "", "", "", 180 + "", "", "eMMC_CLK", "eMMC_CMD", // PC 181 + "eMMC_D2", "eMMC_D1", "eMMC_D0", "eMMC_D3", 182 + "", "", "", "", 183 + "", "", "", "", 184 + "", "", "", "", 185 + "", "", "", "", 186 + "", "", "", "", 187 + "", "", "", "", 188 + "", "", "", "", // PD 189 + "", "", "", "", 190 + "", "USB_SEC_EN", "SPI1_CS", "SPI1_CLK", 191 + "SPI1_MOSI", "SPI1_MISO", "SPI1_HOLD", "SPI1_WP", 192 + "PD16", "", "", "", 193 + "I2C2_SCL", "I2C2_SDA", "PD22", "", 194 + "", "", "", "", 195 + "", "", "", "", 196 + "ETH_CRSDV", "ETH_RXD0", "ETH_RXD1", "ETH_TXCK", // PE 197 + "ETH_TXD0", "ETH_TXD1", "ETH_TXEN", "", 198 + "ETH_MDC", "ETH_MDIO", "QWIIC_nINT", "", 199 + "", "", "", "", 200 + "", "", "", "", 201 + "", "", "", "", 202 + "", "", "", "", 203 + "", "", "", "", 204 + "SD_D1", "SD_D0", "SD_CLK", "SD_CLK", // PF 205 + "SD_D3", "SD_D2", "PF6", "", 206 + "", "", "", "", 207 + "", "", "", "", 208 + "", "", "", "", 209 + "", "", "", "", 210 + "", "", "", "", 211 + "", "", "", "", 212 + "ESP_CLK", "ESP_CMD", "ESP_D0", "ESP_D1", // PG 213 + "ESP_D2", "ESP_D3", "UART1_TXD", "UART1_RXD", 214 + "ESP_nBOOT", "ESP_nRST", "I2C3_SCL", "I2C3_SDA", 215 + "I2S1_WS", "I2S1_CLK", "I2S1_DIN0", "I2S1_DOUT0", 216 + "", "", "", "", 217 + "", "", "", "", 218 + "", "", "", "", 219 + "", "", "", ""; 220 + }; 221 + 222 + /* Remove the unused CK pin from the pinctl as it is unconnected */ 223 + &rmii_pe_pins { 224 + pins = "PE0", "PE1", "PE2", "PE3", "PE4", 225 + "PE5", "PE6", "PE8", "PE9"; 226 + }; 227 + 228 + /* Default SPI Interface on Card-Edge */ 229 + &spi1 { 230 + #address-cells = <1>; 231 + #size-cells = <0>; 232 + pinctrl-0 = <&spi1_pins>, <&spi1_hold_pin>, <&spi1_wp_pin>; 233 + pinctrl-names = "default"; 234 + cs-gpios = <0>; 235 + status = "disabled"; 236 + }; 237 + 238 + /* Connected to the Bootloader/Console of the ESP32 */ 239 + &uart1 { 240 + pinctrl-0 = <&uart1_pg6_pins>; 241 + pinctrl-names = "default"; 242 + status = "okay"; 243 + }; 244 + 245 + /* Console/Debug UART on Card-Edge */ 246 + &uart3 { 247 + pinctrl-0 = <&uart3_pb_pins>; 248 + pinctrl-names = "default"; 249 + status = "okay"; 250 + };
+41
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
··· 4 4 #include <dt-bindings/interrupt-controller/arm-gic.h> 5 5 #include <dt-bindings/clock/sun6i-rtc.h> 6 6 #include <dt-bindings/clock/sun55i-a523-ccu.h> 7 + #include <dt-bindings/clock/sun55i-a523-mcu-ccu.h> 7 8 #include <dt-bindings/clock/sun55i-a523-r-ccu.h> 8 9 #include <dt-bindings/reset/sun55i-a523-ccu.h> 10 + #include <dt-bindings/reset/sun55i-a523-mcu-ccu.h> 9 11 #include <dt-bindings/reset/sun55i-a523-r-ccu.h> 10 12 #include <dt-bindings/power/allwinner,sun55i-a523-ppu.h> 11 13 #include <dt-bindings/power/allwinner,sun55i-a523-pck-600.h> ··· 626 624 "pll-audio"; 627 625 #clock-cells = <1>; 628 626 #reset-cells = <1>; 627 + assigned-clocks = <&r_ccu CLK_R_AHB>, <&r_ccu CLK_R_APB0>; 628 + assigned-clock-rates = <200000000>, <100000000>; 629 629 }; 630 630 631 631 nmi_intc: interrupt-controller@7010320 { ··· 693 689 <&r_ccu CLK_R_AHB>; 694 690 clock-names = "bus", "hosc", "ahb"; 695 691 #clock-cells = <1>; 692 + }; 693 + 694 + mcu_ccu: clock-controller@7102000 { 695 + compatible = "allwinner,sun55i-a523-mcu-ccu"; 696 + reg = <0x7102000 0x200>; 697 + clocks = <&osc24M>, 698 + <&rtc CLK_OSC32K>, 699 + <&rtc CLK_IOSC>, 700 + <&ccu CLK_PLL_AUDIO0_4X>, 701 + <&ccu CLK_PLL_PERIPH0_300M>, 702 + <&ccu CLK_DSP>, 703 + <&ccu CLK_MBUS>, 704 + <&r_ccu CLK_R_AHB>, 705 + <&r_ccu CLK_R_APB0>; 706 + clock-names = "hosc", 707 + "losc", 708 + "iosc", 709 + "pll-audio0-4x", 710 + "pll-periph0-300m", 711 + "dsp", 712 + "mbus", 713 + "r-ahb", 714 + "r-apb0"; 715 + #clock-cells = <1>; 716 + #reset-cells = <1>; 717 + }; 718 + 719 + npu: npu@7122000 { 720 + compatible = "vivante,gc"; 721 + reg = <0x07122000 0x1000>; 722 + interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; 723 + clocks = <&mcu_ccu CLK_BUS_MCU_NPU_ACLK>, 724 + <&ccu CLK_NPU>, 725 + <&mcu_ccu CLK_BUS_MCU_NPU_HCLK>; 726 + clock-names = "bus", "core", "reg"; 727 + resets = <&mcu_ccu RST_BUS_MCU_NPU>; 728 + power-domains = <&ppu PD_NPU>; 696 729 }; 697 730 }; 698 731 };
+41 -5
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
··· 6 6 #include "sun55i-a523.dtsi" 7 7 8 8 #include <dt-bindings/gpio/gpio.h> 9 + #include <dt-bindings/leds/common.h> 9 10 10 11 / { 11 12 model = "Radxa Cubie A5E"; ··· 21 20 stdout-path = "serial0:115200n8"; 22 21 }; 23 22 24 - ext_osc32k: ext-osc32k-clk { 25 - #clock-cells = <0>; 26 - compatible = "fixed-clock"; 27 - clock-frequency = <32768>; 28 - clock-output-names = "ext_osc32k"; 23 + leds { 24 + compatible = "gpio-leds"; 25 + 26 + power-led { 27 + function = LED_FUNCTION_POWER; 28 + color = <LED_COLOR_ID_GREEN>; 29 + gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */ 30 + default-state = "on"; 31 + linux,default-trigger = "heartbeat"; 32 + }; 33 + 34 + use-led { 35 + function = LED_FUNCTION_ACTIVITY; 36 + color = <LED_COLOR_ID_BLUE>; 37 + gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ 38 + }; 39 + }; 40 + 41 + iio-hwmon { 42 + compatible = "iio-hwmon"; 43 + io-channels = <&axp717_adc 3>, /* vsys_v */ 44 + <&axp717_adc 4>; /* pmic_temp */ 29 45 }; 30 46 31 47 reg_vcc5v: vcc5v { ··· 93 75 ext_rgmii_phy: ethernet-phy@1 { 94 76 compatible = "ethernet-phy-ieee802.3-c22"; 95 77 reg = <1>; 78 + reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ 79 + reset-assert-us = <10000>; 80 + reset-deassert-us = <150000>; 96 81 }; 97 82 }; 98 83 ··· 145 124 aldoin-supply = <&reg_vcc5v>; 146 125 bldoin-supply = <&reg_vcc5v>; 147 126 cldoin-supply = <&reg_vcc5v>; 127 + 128 + axp717_adc: adc { 129 + compatible = "x-powers,axp717-adc"; 130 + #io-channel-cells = <1>; 131 + }; 132 + 133 + battery-power { 134 + compatible = "x-powers,axp717-battery-power-supply"; 135 + /* charger mode design but has no battery terminal */ 136 + status = "disabled"; 137 + }; 148 138 149 139 regulators { 150 140 /* Supplies the "little" cluster (1.4 GHz cores) */ ··· 259 227 regulator-max-microvolt = <900000>; 260 228 regulator-name = "vdd-cpus"; 261 229 }; 230 + }; 231 + 232 + usb-power { 233 + compatible = "x-powers,axp717-usb-power-supply"; 262 234 }; 263 235 }; 264 236
+34
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
··· 27 27 clock-output-names = "ext_osc32k"; 28 28 }; 29 29 30 + iio-hwmon { 31 + compatible = "iio-hwmon"; 32 + io-channels = <&axp717_adc 3>, /* vsys_v */ 33 + <&axp717_adc 4>; /* pmic_temp */ 34 + }; 35 + 30 36 reg_vcc12v: vcc12v { 31 37 /* DC input jack */ 32 38 compatible = "regulator-fixed"; ··· 91 85 ext_rgmii_phy: ethernet-phy@1 { 92 86 compatible = "ethernet-phy-ieee802.3-c22"; 93 87 reg = <1>; 88 + reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ 89 + reset-assert-us = <10000>; 90 + reset-deassert-us = <150000>; 94 91 }; 95 92 }; 96 93 ··· 154 145 aldoin-supply = <&reg_vcc5v>; 155 146 bldoin-supply = <&reg_vcc5v>; 156 147 cldoin-supply = <&reg_vcc5v>; 148 + 149 + axp717_adc: adc { 150 + compatible = "x-powers,axp717-adc"; 151 + #io-channel-cells = <1>; 152 + }; 153 + 154 + battery-power { 155 + compatible = "x-powers,axp717-battery-power-supply"; 156 + /* no battery; output used for dcdc4 instead */ 157 + status = "disabled"; 158 + }; 157 159 158 160 regulators { 159 161 /* Supplies the "little" cluster (1.4 GHz cores) */ ··· 272 252 regulator-name = "vdd-cpus"; 273 253 }; 274 254 }; 255 + 256 + usb-power { 257 + compatible = "x-powers,axp717-usb-power-supply"; 258 + /* 12V-5V buck converter can supply up to 5A */ 259 + input-current-limit-microamp = <3250000>; 260 + }; 275 261 }; 276 262 277 263 axp323: pmic@36 { ··· 330 304 * vcc-pl-supply = <&reg_aldo3>; 331 305 */ 332 306 vcc-pm-supply = <&reg_aldo3>; 307 + }; 308 + 309 + &rtc { 310 + clocks = <&r_ccu CLK_BUS_R_RTC>, <&osc24M>, 311 + <&r_ccu CLK_R_AHB>, <&ext_osc32k>; 312 + clock-names = "bus", "hosc", "ahb", "ext-osc32k"; 313 + assigned-clocks = <&rtc CLK_OSC32K>; 314 + assigned-clock-rates = <32768>; 333 315 }; 334 316 335 317 &uart0 {
+31
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
··· 40 40 }; 41 41 }; 42 42 43 + iio-hwmon { 44 + compatible = "iio-hwmon"; 45 + io-channels = <&axp717_adc 3>, /* vsys_v */ 46 + <&axp717_adc 4>, /* pmic_temp */ 47 + <&axp717_adc 7>; /* bkup_batt_v */ 48 + }; 49 + 43 50 wifi_pwrseq: pwrseq { 44 51 compatible = "mmc-pwrseq-simple"; 45 52 reset-gpios = <&r_pio 1 1 GPIO_ACTIVE_LOW>; /* PM1 */ ··· 181 174 bldoin-supply = <&reg_vcc5v>; 182 175 cldoin-supply = <&reg_vcc5v>; 183 176 177 + axp717_adc: adc { 178 + compatible = "x-powers,axp717-adc"; 179 + #io-channel-cells = <1>; 180 + }; 181 + 182 + battery-power { 183 + compatible = "x-powers,axp717-battery-power-supply"; 184 + /* no battery; output used for dcdc4 instead */ 185 + status = "disabled"; 186 + }; 187 + 184 188 regulators { 185 189 /* Supplies the "little" cluster (1.4 GHz cores) */ 186 190 reg_dcdc1: dcdc1 { ··· 306 288 regulator-name = "vdd-cpus-usb-0v9"; 307 289 }; 308 290 }; 291 + 292 + usb-power { 293 + compatible = "x-powers,axp717-usb-power-supply"; 294 + input-current-limit-microamp = <3000000>; 295 + }; 309 296 }; 310 297 311 298 axp323: pmic@36 { ··· 367 344 * vcc-pl-supply = <&reg_aldo3>; 368 345 */ 369 346 vcc-pm-supply = <&reg_bldo2>; 347 + }; 348 + 349 + &rtc { 350 + clocks = <&r_ccu CLK_BUS_R_RTC>, <&osc24M>, 351 + <&r_ccu CLK_R_AHB>, <&ext_osc32k>; 352 + clock-names = "bus", "hosc", "ahb", "ext-osc32k"; 353 + assigned-clocks = <&rtc CLK_OSC32K>; 354 + assigned-clock-rates = <32768>; 370 355 }; 371 356 372 357 &uart0 {
+48
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi
··· 79 79 }; 80 80 81 81 /omit-if-no-ref/ 82 + i2c2_pd_pins: i2c2-pd-pins { 83 + pins = "PD20", "PD21"; 84 + function = "i2c2"; 85 + }; 86 + 87 + /omit-if-no-ref/ 88 + i2c3_pg_pins: i2c3-pg-pins { 89 + pins = "PG10", "PG11"; 90 + function = "i2c3"; 91 + }; 92 + 93 + /omit-if-no-ref/ 94 + i2s1_pins: i2s1-pins { 95 + pins = "PG12", "PG13"; 96 + function = "i2s1"; 97 + }; 98 + 99 + /omit-if-no-ref/ 100 + i2s1_din0_pin: i2s1-din0-pin { 101 + pins = "PG14"; 102 + function = "i2s1_din"; 103 + }; 104 + 105 + /omit-if-no-ref/ 106 + i2s1_dout0_pin: i2s1-dout0-pin { 107 + pins = "PG15"; 108 + function = "i2s1_dout"; 109 + }; 110 + 111 + /omit-if-no-ref/ 82 112 lcd_rgb666_pins: lcd-rgb666-pins { 83 113 pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", 84 114 "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", ··· 154 124 spi0_pins: spi0-pins { 155 125 pins = "PC2", "PC3", "PC4", "PC5"; 156 126 function = "spi0"; 127 + }; 128 + 129 + /omit-if-no-ref/ 130 + spi1_pins: spi1-pins { 131 + pins = "PD10", "PD11", "PD12", "PD13"; 132 + function = "spi1"; 133 + }; 134 + 135 + /omit-if-no-ref/ 136 + spi1_hold_pin: spi1-hold-pin { 137 + pins = "PD14"; 138 + function = "spi1"; 139 + }; 140 + 141 + /omit-if-no-ref/ 142 + spi1_wp_pin: spi1-wp-pin { 143 + pins = "PD15"; 144 + function = "spi1"; 157 145 }; 158 146 159 147 /omit-if-no-ref/
+1
include/dt-bindings/clock/sun55i-a523-ccu.h
··· 185 185 #define CLK_FANOUT0 176 186 186 #define CLK_FANOUT1 177 187 187 #define CLK_FANOUT2 178 188 + #define CLK_NPU 179 188 189 189 190 #endif /* _DT_BINDINGS_CLK_SUN55I_A523_CCU_H_ */
+54
include/dt-bindings/clock/sun55i-a523-mcu-ccu.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ 2 + /* 3 + * Copyright (C) 2025 Chen-Yu Tsai <wens@csie.org> 4 + */ 5 + 6 + #ifndef _DT_BINDINGS_CLK_SUN55I_A523_MCU_CCU_H_ 7 + #define _DT_BINDINGS_CLK_SUN55I_A523_MCU_CCU_H_ 8 + 9 + #define CLK_MCU_PLL_AUDIO1 0 10 + #define CLK_MCU_PLL_AUDIO1_DIV2 1 11 + #define CLK_MCU_PLL_AUDIO1_DIV5 2 12 + #define CLK_MCU_AUDIO_OUT 3 13 + #define CLK_MCU_DSP 4 14 + #define CLK_MCU_I2S0 5 15 + #define CLK_MCU_I2S1 6 16 + #define CLK_MCU_I2S2 7 17 + #define CLK_MCU_I2S3 8 18 + #define CLK_MCU_I2S3_ASRC 9 19 + #define CLK_BUS_MCU_I2S0 10 20 + #define CLK_BUS_MCU_I2S1 11 21 + #define CLK_BUS_MCU_I2S2 12 22 + #define CLK_BUS_MCU_I2S3 13 23 + #define CLK_MCU_SPDIF_TX 14 24 + #define CLK_MCU_SPDIF_RX 15 25 + #define CLK_BUS_MCU_SPDIF 16 26 + #define CLK_MCU_DMIC 17 27 + #define CLK_BUS_MCU_DMIC 18 28 + #define CLK_MCU_AUDIO_CODEC_DAC 19 29 + #define CLK_MCU_AUDIO_CODEC_ADC 20 30 + #define CLK_BUS_MCU_AUDIO_CODEC 21 31 + #define CLK_BUS_MCU_DSP_MSGBOX 22 32 + #define CLK_BUS_MCU_DSP_CFG 23 33 + #define CLK_BUS_MCU_NPU_HCLK 24 34 + #define CLK_BUS_MCU_NPU_ACLK 25 35 + #define CLK_MCU_TIMER0 26 36 + #define CLK_MCU_TIMER1 27 37 + #define CLK_MCU_TIMER2 28 38 + #define CLK_MCU_TIMER3 29 39 + #define CLK_MCU_TIMER4 30 40 + #define CLK_MCU_TIMER5 31 41 + #define CLK_BUS_MCU_TIMER 32 42 + #define CLK_BUS_MCU_DMA 33 43 + #define CLK_MCU_TZMA0 34 44 + #define CLK_MCU_TZMA1 35 45 + #define CLK_BUS_MCU_PUBSRAM 36 46 + #define CLK_MCU_MBUS_DMA 37 47 + #define CLK_MCU_MBUS 38 48 + #define CLK_MCU_RISCV 39 49 + #define CLK_BUS_MCU_RISCV_CFG 40 50 + #define CLK_BUS_MCU_RISCV_MSGBOX 41 51 + #define CLK_MCU_PWM0 42 52 + #define CLK_BUS_MCU_PWM0 43 53 + 54 + #endif /* _DT_BINDINGS_CLK_SUN55I_A523_MCU_CCU_H_ */
+30
include/dt-bindings/reset/sun55i-a523-mcu-ccu.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ 2 + /* 3 + * Copyright (C) 2025 Chen-Yu Tsai <wens@csie.org> 4 + */ 5 + 6 + #ifndef _DT_BINDINGS_RST_SUN55I_A523_MCU_CCU_H_ 7 + #define _DT_BINDINGS_RST_SUN55I_A523_MCU_CCU_H_ 8 + 9 + #define RST_BUS_MCU_I2S0 0 10 + #define RST_BUS_MCU_I2S1 1 11 + #define RST_BUS_MCU_I2S2 2 12 + #define RST_BUS_MCU_I2S3 3 13 + #define RST_BUS_MCU_SPDIF 4 14 + #define RST_BUS_MCU_DMIC 5 15 + #define RST_BUS_MCU_AUDIO_CODEC 6 16 + #define RST_BUS_MCU_DSP_MSGBOX 7 17 + #define RST_BUS_MCU_DSP_CFG 8 18 + #define RST_BUS_MCU_NPU 9 19 + #define RST_BUS_MCU_TIMER 10 20 + #define RST_BUS_MCU_DSP_DEBUG 11 21 + #define RST_BUS_MCU_DSP 12 22 + #define RST_BUS_MCU_DMA 13 23 + #define RST_BUS_MCU_PUBSRAM 14 24 + #define RST_BUS_MCU_RISCV_CFG 15 25 + #define RST_BUS_MCU_RISCV_DEBUG 16 26 + #define RST_BUS_MCU_RISCV_CORE 17 27 + #define RST_BUS_MCU_RISCV_MSGBOX 18 28 + #define RST_BUS_MCU_PWM0 19 29 + 30 + #endif /* _DT_BINDINGS_RST_SUN55I_A523_MCU_CCU_H_ */