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

Merge tag 'sunxi-dt-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Our usual bunch of patches to improve the Allwinner SoCs support,
mainly:
- I2S Support for the V3
- Audio Codec Support for the V3s
- DMA support for the V3s
- PWM support for the V3s
- Support for Bluetooth Audio on the pinephone
- Add A10-like timers to the A64 and R40
- New boards: Forlinx OKA40i-C, Forlinx OKA40i-C, NanoPi R1S H5

* tag 'sunxi-dt-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (29 commits)
ARM: dts: sun8i: v3s: enable emac for zero Dock
arm64: dts: allwinner: pinephone: Set audio card name
ARM: dts: sun8i: r40: Add timer node
ARM: dts: sun8i: V3: add I2S interface to V3 dts
dt-bindings: sound: sun4i-i2s: add Allwinner V3 I2S compatible
ARM: dts: sun8i: V3: add codec analog frontend to V3 dts
ASoC: dt-bindings: sun8i-a23-codec-analog: add compatible for Allwinner V3
ARM: dts: sun8i: v3s: add analog codec and frontend to v3s dts
ARM: dts: sun8i: v3s: add DMA properties to peripherals supporting DMA
ARM: dts: sun8i: v3s: add DMA controller to v3s dts
ARM: dts: sun8i: v3s: add pwm controller to v3s dts
dt-bindings: pwm: allwinner: add v3s pwm compatible
arm64: dts: allwinner: h5: Add NanoPi R1S H5 support
dt-bindings: arm: Add NanoPi R1S H5
arm64: dts: allwinner: pinephone: Add support for Bluetooth audio
arm64: dts: allwinner: a64: Allow multiple DAI links
arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3
arm64: dts: allwinner: a64: Allow using multiple codec DAIs
ARM: dts: sun8i-a33: Allow using multiple codec DAIs
ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
...

Link: https://lore.kernel.org/r/96cc77ec-139d-4685-8a66-a60964cf39fd.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>

+784 -52
+11
Documentation/devicetree/bindings/arm/sunxi.yaml
··· 224 224 - const: empire-electronix,m712 225 225 - const: allwinner,sun5i-a13 226 226 227 + - description: Forlinx OKA40i-C Development board 228 + items: 229 + - const: forlinx,oka40i-c 230 + - const: forlinx,feta40i-c 231 + - const: allwinner,sun8i-r40 232 + 227 233 - description: FriendlyARM NanoPi A64 228 234 items: 229 235 - const: friendlyarm,nanopi-a64 ··· 274 268 items: 275 269 - const: friendlyarm,nanopi-r1 276 270 - const: allwinner,sun8i-h3 271 + 272 + - description: FriendlyARM NanoPi R1S H5 273 + items: 274 + - const: friendlyarm,nanopi-r1s-h5 275 + - const: allwinner,sun50i-h5 277 276 278 277 - description: FriendlyARM ZeroPi 279 278 items:
+3
Documentation/devicetree/bindings/pwm/allwinner,sun4i-a10-pwm.yaml
··· 25 25 - const: allwinner,sun8i-a83t-pwm 26 26 - const: allwinner,sun8i-h3-pwm 27 27 - items: 28 + - const: allwinner,sun8i-v3s-pwm 29 + - const: allwinner,sun7i-a20-pwm 30 + - items: 28 31 - const: allwinner,sun50i-a64-pwm 29 32 - const: allwinner,sun5i-a13-pwm 30 33 - items:
+3
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml
··· 20 20 - const: allwinner,sun6i-a31-i2s 21 21 - const: allwinner,sun8i-a83t-i2s 22 22 - const: allwinner,sun8i-h3-i2s 23 + - items: 24 + - const: allwinner,sun8i-v3-i2s 25 + - const: allwinner,sun8i-h3-i2s 23 26 - const: allwinner,sun50i-a64-codec-i2s 24 27 - items: 25 28 - const: allwinner,sun50i-a64-i2s
+6 -3
Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml
··· 12 12 13 13 properties: 14 14 compatible: 15 - enum: 15 + oneOf: 16 16 # FIXME: This is documented in the PRCM binding, but needs to be 17 17 # migrated here at some point 18 18 # - allwinner,sun8i-a23-codec-analog 19 - - allwinner,sun8i-h3-codec-analog 20 - - allwinner,sun8i-v3s-codec-analog 19 + - const: allwinner,sun8i-h3-codec-analog 20 + - items: 21 + - const: allwinner,sun8i-v3-codec-analog 22 + - const: allwinner,sun8i-h3-codec-analog 23 + - const: allwinner,sun8i-v3s-codec-analog 21 24 22 25 reg: 23 26 maxItems: 1
+6 -2
Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
··· 12 12 13 13 properties: 14 14 "#sound-dai-cells": 15 - const: 0 15 + minimum: 0 16 + maximum: 1 17 + description: 18 + A value of 0 is deprecated. When used, it only allows access to 19 + the ADC/DAC and AIF1 (the CPU DAI), not the other two AIFs/DAIs. 16 20 17 21 compatible: 18 22 oneOf: ··· 54 50 examples: 55 51 - | 56 52 audio-codec@1c22e00 { 57 - #sound-dai-cells = <0>; 53 + #sound-dai-cells = <1>; 58 54 compatible = "allwinner,sun8i-a33-codec"; 59 55 reg = <0x01c22e00 0x400>; 60 56 interrupts = <0 29 4>;
+19 -23
Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml
··· 12 12 13 13 properties: 14 14 compatible: 15 - enum: 16 - - allwinner,sun4i-a10-timer 17 - - allwinner,sun8i-a23-timer 18 - - allwinner,sun8i-v3s-timer 19 - - allwinner,suniv-f1c100s-timer 15 + oneOf: 16 + - enum: 17 + - allwinner,sun4i-a10-timer 18 + - allwinner,sun8i-a23-timer 19 + - allwinner,sun8i-v3s-timer 20 + - allwinner,suniv-f1c100s-timer 21 + - items: 22 + - enum: 23 + - allwinner,sun50i-a64-timer 24 + - allwinner,sun50i-h6-timer 25 + - allwinner,sun50i-h616-timer 26 + - const: allwinner,sun8i-a23-timer 20 27 21 28 reg: 22 29 maxItems: 1 ··· 41 34 - if: 42 35 properties: 43 36 compatible: 44 - items: 45 - const: allwinner,sun4i-a10-timer 37 + enum: 38 + - allwinner,sun4i-a10-timer 46 39 47 40 then: 48 41 properties: ··· 53 46 - if: 54 47 properties: 55 48 compatible: 56 - items: 57 - const: allwinner,sun8i-a23-timer 49 + enum: 50 + - allwinner,sun8i-a23-timer 58 51 59 52 then: 60 53 properties: ··· 65 58 - if: 66 59 properties: 67 60 compatible: 68 - items: 69 - const: allwinner,sun8i-v3s-timer 70 - 71 - then: 72 - properties: 73 - interrupts: 74 - minItems: 3 75 - maxItems: 3 76 - 77 - - if: 78 - properties: 79 - compatible: 80 - items: 81 - const: allwinner,suniv-f1c100s-timer 61 + enum: 62 + - allwinner,sun8i-v3s-timer 63 + - allwinner,suniv-f1c100s-timer 82 64 83 65 then: 84 66 properties:
+2
Documentation/devicetree/bindings/vendor-prefixes.yaml
··· 409 409 description: Firefly 410 410 "^focaltech,.*": 411 411 description: FocalTech Systems Co.,Ltd 412 + "^forlinx,.*": 413 + description: Baoding Forlinx Embedded Technology Co., Ltd. 412 414 "^frida,.*": 413 415 description: Shenzhen Frida LCD Co., Ltd. 414 416 "^friendlyarm,.*":
+1
arch/arm/boot/dts/Makefile
··· 1236 1236 sun8i-r16-nintendo-super-nes-classic.dtb \ 1237 1237 sun8i-r16-parrot.dtb \ 1238 1238 sun8i-r40-bananapi-m2-ultra.dtb \ 1239 + sun8i-r40-oka40i-c.dtb \ 1239 1240 sun8i-s3-elimo-initium.dtb \ 1240 1241 sun8i-s3-lichee-zero-plus.dtb \ 1241 1242 sun8i-s3-pinecube.dtb \
+2 -2
arch/arm/boot/dts/sun8i-a33.dtsi
··· 198 198 }; 199 199 200 200 link_codec: simple-audio-card,codec { 201 - sound-dai = <&codec>; 201 + sound-dai = <&codec 0>; 202 202 }; 203 203 }; 204 204 ··· 238 238 }; 239 239 240 240 codec: codec@1c22e00 { 241 - #sound-dai-cells = <0>; 241 + #sound-dai-cells = <1>; 242 242 compatible = "allwinner,sun8i-a33-codec"; 243 243 reg = <0x01c22e00 0x400>; 244 244 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+106
arch/arm/boot/dts/sun8i-r40-feta40i.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0+ OR MIT 2 + // Copyright (C) 2021 Ivan Uvarov <i.uvarov@cognitivepilot.com> 3 + // Based on the sun8i-r40-bananapi-m2-ultra.dts, which is: 4 + // Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> 5 + // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io> 6 + 7 + #include "sun8i-r40.dtsi" 8 + 9 + &i2c0 { 10 + status = "okay"; 11 + 12 + axp22x: pmic@34 { 13 + compatible = "x-powers,axp221"; 14 + reg = <0x34>; 15 + interrupt-parent = <&nmi_intc>; 16 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 17 + }; 18 + }; 19 + 20 + #include "axp22x.dtsi" 21 + 22 + &mmc2 { 23 + vmmc-supply = <&reg_dcdc1>; 24 + vqmmc-supply = <&reg_aldo2>; 25 + bus-width = <8>; 26 + non-removable; 27 + status = "okay"; 28 + }; 29 + 30 + &pio { 31 + pinctrl-names = "default"; 32 + pinctrl-0 = <&clk_out_a_pin>; 33 + vcc-pa-supply = <&reg_dcdc1>; 34 + vcc-pc-supply = <&reg_aldo2>; 35 + vcc-pd-supply = <&reg_dcdc1>; 36 + vcc-pf-supply = <&reg_dldo4>; 37 + vcc-pg-supply = <&reg_dldo1>; 38 + }; 39 + 40 + &reg_aldo2 { 41 + regulator-always-on; 42 + regulator-min-microvolt = <1800000>; 43 + regulator-max-microvolt = <1800000>; 44 + regulator-name = "vcc-pa"; 45 + }; 46 + 47 + &reg_aldo3 { 48 + regulator-always-on; 49 + regulator-min-microvolt = <3000000>; 50 + regulator-max-microvolt = <3000000>; 51 + regulator-name = "avcc"; 52 + }; 53 + 54 + &reg_dcdc1 { 55 + regulator-always-on; 56 + regulator-min-microvolt = <3300000>; 57 + regulator-max-microvolt = <3300000>; 58 + regulator-name = "vcc-3v3"; 59 + }; 60 + 61 + &reg_dcdc2 { 62 + regulator-always-on; 63 + regulator-min-microvolt = <1100000>; 64 + regulator-max-microvolt = <1100000>; 65 + regulator-name = "vdd-cpu"; 66 + }; 67 + 68 + &reg_dcdc3 { 69 + regulator-always-on; 70 + regulator-min-microvolt = <1100000>; 71 + regulator-max-microvolt = <1100000>; 72 + regulator-name = "vdd-sys"; 73 + }; 74 + 75 + &reg_dcdc5 { 76 + regulator-always-on; 77 + regulator-min-microvolt = <1500000>; 78 + regulator-max-microvolt = <1500000>; 79 + regulator-name = "vcc-dram"; 80 + }; 81 + 82 + &reg_dldo1 { 83 + regulator-always-on; 84 + regulator-min-microvolt = <3300000>; 85 + regulator-max-microvolt = <3300000>; 86 + regulator-name = "vcc-wifi-io"; 87 + }; 88 + 89 + &reg_dldo4 { 90 + regulator-always-on; 91 + regulator-min-microvolt = <2500000>; 92 + regulator-max-microvolt = <2500000>; 93 + regulator-name = "vdd2v5-sata"; 94 + }; 95 + 96 + &reg_eldo2 { 97 + regulator-min-microvolt = <1200000>; 98 + regulator-max-microvolt = <1200000>; 99 + regulator-name = "vdd1v2-sata"; 100 + }; 101 + 102 + &reg_eldo3 { 103 + regulator-min-microvolt = <2800000>; 104 + regulator-max-microvolt = <2800000>; 105 + regulator-name = "vcc-pe"; 106 + };
+203
arch/arm/boot/dts/sun8i-r40-oka40i-c.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0+ OR MIT 2 + // Copyright (C) 2021 Ivan Uvarov <i.uvarov@cognitivepilot.com> 3 + // Based on the sun8i-r40-bananapi-m2-ultra.dts, which is: 4 + // Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> 5 + // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io> 6 + 7 + /dts-v1/; 8 + #include "sun8i-r40-feta40i.dtsi" 9 + 10 + #include <dt-bindings/gpio/gpio.h> 11 + #include <dt-bindings/leds/common.h> 12 + 13 + / { 14 + model = "Forlinx OKA40i-C"; 15 + compatible = "forlinx,oka40i-c", "forlinx,feta40i-c", "allwinner,sun8i-r40"; 16 + 17 + aliases { 18 + ethernet0 = &gmac; 19 + serial0 = &uart0; 20 + serial2 = &uart2; 21 + serial3 = &uart3; 22 + serial4 = &uart4; 23 + serial5 = &uart5; /* RS485 */ 24 + serial7 = &uart7; 25 + }; 26 + 27 + chosen { 28 + stdout-path = "serial0:115200n8"; 29 + }; 30 + 31 + connector { 32 + compatible = "hdmi-connector"; 33 + type = "a"; 34 + 35 + port { 36 + hdmi_con_in: endpoint { 37 + remote-endpoint = <&hdmi_out_con>; 38 + }; 39 + }; 40 + }; 41 + 42 + leds { 43 + compatible = "gpio-leds"; 44 + 45 + led-5 { /* this is how the leds are labeled on the board */ 46 + gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */ 47 + color = <LED_COLOR_ID_GREEN>; 48 + function = LED_FUNCTION_STATUS; 49 + }; 50 + 51 + led-6 { 52 + gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */ 53 + color = <LED_COLOR_ID_BLUE>; 54 + function = LED_FUNCTION_STATUS; 55 + }; 56 + }; 57 + 58 + reg_vcc5v0: vcc5v0 { 59 + compatible = "regulator-fixed"; 60 + regulator-name = "vcc5v0"; 61 + regulator-min-microvolt = <5000000>; 62 + regulator-max-microvolt = <5000000>; 63 + }; 64 + 65 + wifi_pwrseq: wifi_pwrseq { 66 + compatible = "mmc-pwrseq-simple"; 67 + reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; // PB10 WIFI_EN 68 + clocks = <&ccu CLK_OUTA>; 69 + clock-names = "ext_clock"; 70 + }; 71 + }; 72 + 73 + &ahci { 74 + ahci-supply = <&reg_dldo4>; 75 + phy-supply = <&reg_eldo2>; 76 + status = "okay"; 77 + }; 78 + 79 + &de { 80 + status = "okay"; 81 + }; 82 + 83 + &ehci1 { 84 + status = "okay"; 85 + }; 86 + 87 + &ehci2 { 88 + status = "okay"; 89 + }; 90 + 91 + &gmac { 92 + pinctrl-names = "default"; 93 + pinctrl-0 = <&gmac_rgmii_pins>; 94 + phy-handle = <&phy1>; 95 + phy-mode = "rgmii-id"; 96 + phy-supply = <&reg_dcdc1>; 97 + status = "okay"; 98 + }; 99 + 100 + &gmac_mdio { 101 + phy1: ethernet-phy@1 { 102 + compatible = "ethernet-phy-ieee802.3-c22"; 103 + reg = <1>; 104 + }; 105 + }; 106 + 107 + &hdmi { 108 + status = "okay"; 109 + }; 110 + 111 + &hdmi_out { 112 + hdmi_out_con: endpoint { 113 + remote-endpoint = <&hdmi_con_in>; 114 + }; 115 + }; 116 + 117 + &i2c2 { 118 + status = "okay"; 119 + }; 120 + 121 + &mmc0 { 122 + vmmc-supply = <&reg_dcdc1>; 123 + vqmmc-supply = <&reg_dcdc1>; 124 + bus-width = <4>; 125 + cd-gpios = <&pio 8 11 GPIO_ACTIVE_LOW>; // PI11 126 + status = "okay"; 127 + }; 128 + 129 + &mmc3 { 130 + vmmc-supply = <&reg_dcdc1>; 131 + vqmmc-supply = <&reg_dcdc1>; 132 + bus-width = <4>; 133 + cd-gpios = <&pio 8 10 GPIO_ACTIVE_LOW>; // PI10 134 + status = "okay"; 135 + }; 136 + 137 + &ohci1 { 138 + status = "okay"; 139 + }; 140 + 141 + &ohci2 { 142 + status = "okay"; 143 + }; 144 + 145 + &reg_dc1sw { 146 + regulator-min-microvolt = <3300000>; 147 + regulator-max-microvolt = <3300000>; 148 + regulator-name = "vcc-lcd"; 149 + }; 150 + 151 + &reg_dldo2 { 152 + regulator-min-microvolt = <3300000>; 153 + regulator-max-microvolt = <3300000>; 154 + regulator-name = "vcc-wifi"; 155 + }; 156 + 157 + &tcon_tv0 { 158 + status = "okay"; 159 + }; 160 + 161 + &uart0 { 162 + pinctrl-names = "default"; 163 + pinctrl-0 = <&uart0_pb_pins>; 164 + status = "okay"; 165 + }; 166 + 167 + &uart2 { 168 + pinctrl-names = "default"; 169 + pinctrl-0 = <&uart2_pi_pins>, <&uart2_rts_cts_pi_pins>; 170 + uart-has-rtscts; 171 + status = "okay"; 172 + }; 173 + 174 + &uart3 { 175 + pinctrl-names = "default"; 176 + pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>; 177 + uart-has-rtscts; 178 + status = "okay"; 179 + }; 180 + 181 + &uart4 { 182 + pinctrl-names = "default"; 183 + pinctrl-0 = <&uart4_pg_pins>; 184 + status = "okay"; 185 + }; 186 + 187 + &uart5 { /* RS485 */ 188 + pinctrl-names = "default"; 189 + pinctrl-0 = <&uart5_ph_pins>; 190 + status = "okay"; 191 + }; 192 + 193 + &uart7 { 194 + pinctrl-names = "default"; 195 + pinctrl-0 = <&uart7_pi_pins>; 196 + status = "okay"; 197 + }; 198 + 199 + &usbphy { 200 + usb1_vbus-supply = <&reg_vcc5v0>; 201 + usb2_vbus-supply = <&reg_vcc5v0>; 202 + status = "okay"; 203 + };
+56
arch/arm/boot/dts/sun8i-r40.dtsi
··· 357 357 clock-names = "ahb", "mmc"; 358 358 resets = <&ccu RST_BUS_MMC3>; 359 359 reset-names = "ahb"; 360 + pinctrl-0 = <&mmc3_pins>; 361 + pinctrl-names = "default"; 360 362 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; 361 363 status = "disabled"; 362 364 #address-cells = <1>; ··· 604 602 }; 605 603 606 604 /omit-if-no-ref/ 605 + mmc3_pins: mmc3-pins { 606 + pins = "PI4", "PI5", "PI6", 607 + "PI7", "PI8", "PI9"; 608 + function = "mmc3"; 609 + drive-strength = <30>; 610 + bias-pull-up; 611 + }; 612 + 613 + /omit-if-no-ref/ 607 614 spi0_pc_pins: spi0-pc-pins { 608 615 pins = "PC0", "PC1", "PC2"; 609 616 function = "spi0"; ··· 642 631 function = "spi1"; 643 632 }; 644 633 634 + /omit-if-no-ref/ 645 635 uart0_pb_pins: uart0-pb-pins { 646 636 pins = "PB22", "PB23"; 647 637 function = "uart0"; 648 638 }; 649 639 640 + /omit-if-no-ref/ 641 + uart2_pi_pins: uart2-pi-pins { 642 + pins = "PI18", "PI19"; 643 + function = "uart2"; 644 + }; 645 + 646 + /omit-if-no-ref/ 647 + uart2_rts_cts_pi_pins: uart2-rts-cts-pi-pins{ 648 + pins = "PI16", "PI17"; 649 + function = "uart2"; 650 + }; 651 + 652 + /omit-if-no-ref/ 650 653 uart3_pg_pins: uart3-pg-pins { 651 654 pins = "PG6", "PG7"; 652 655 function = "uart3"; 653 656 }; 654 657 658 + /omit-if-no-ref/ 655 659 uart3_rts_cts_pg_pins: uart3-rts-cts-pg-pins { 656 660 pins = "PG8", "PG9"; 657 661 function = "uart3"; 658 662 }; 663 + 664 + /omit-if-no-ref/ 665 + uart4_pg_pins: uart4-pg-pins { 666 + pins = "PG10", "PG11"; 667 + function = "uart4"; 668 + }; 669 + 670 + /omit-if-no-ref/ 671 + uart5_ph_pins: uart5-ph-pins { 672 + pins = "PH6", "PH7"; 673 + function = "uart5"; 674 + }; 675 + 676 + /omit-if-no-ref/ 677 + uart7_pi_pins: uart7-pi-pins { 678 + pins = "PI20", "PI21"; 679 + function = "uart7"; 680 + }; 681 + }; 682 + 683 + timer@1c20c00 { 684 + compatible = "allwinner,sun4i-a10-timer"; 685 + reg = <0x01c20c00 0x90>; 686 + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>, 687 + <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>, 688 + <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>, 689 + <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>, 690 + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, 691 + <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; 692 + clocks = <&osc24M>; 659 693 }; 660 694 661 695 wdt: watchdog@1c20c90 {
+31
arch/arm/boot/dts/sun8i-v3.dtsi
··· 1 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 2 /* 3 3 * Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.io> 4 + * Copyright (C) 2021 Tobias Schramm <t.schramm@manjaro.org> 4 5 */ 5 6 6 7 #include "sun8i-v3s.dtsi" 7 8 9 + / { 10 + soc { 11 + i2s0: i2s@1c22000 { 12 + #sound-dai-cells = <0>; 13 + compatible = "allwinner,sun8i-v3-i2s", 14 + "allwinner,sun8i-h3-i2s"; 15 + reg = <0x01c22000 0x400>; 16 + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; 17 + clocks = <&ccu CLK_BUS_I2S0>, <&ccu CLK_I2S0>; 18 + clock-names = "apb", "mod"; 19 + dmas = <&dma 3>, <&dma 3>; 20 + dma-names = "rx", "tx"; 21 + pinctrl-names = "default"; 22 + pinctrl-0 = <&i2s0_pins>; 23 + resets = <&ccu RST_BUS_I2S0>; 24 + status = "disabled"; 25 + }; 26 + }; 27 + }; 28 + 8 29 &ccu { 9 30 compatible = "allwinner,sun8i-v3-ccu"; 31 + }; 32 + 33 + &codec_analog { 34 + compatible = "allwinner,sun8i-v3-codec-analog", 35 + "allwinner,sun8i-h3-codec-analog"; 10 36 }; 11 37 12 38 &emac { ··· 50 24 51 25 &pio { 52 26 compatible = "allwinner,sun8i-v3-pinctrl"; 27 + 28 + i2s0_pins: i2s0-pins { 29 + pins = "PG10", "PG11", "PG12", "PG13"; 30 + function = "i2s"; 31 + }; 53 32 54 33 uart1_pg_pins: uart1-pg-pins { 55 34 pins = "PG6", "PG7";
+13 -4
arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
··· 49 49 compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero", 50 50 "allwinner,sun8i-v3s"; 51 51 52 + aliases { 53 + ethernet0 = &emac; 54 + }; 55 + 52 56 leds { 53 57 /* The LEDs use PG0~2 pins, which conflict with MMC1 */ 54 58 status = "disabled"; 55 59 }; 56 60 }; 57 61 58 - &mmc1 { 59 - broken-cd; 60 - bus-width = <4>; 61 - vmmc-supply = <&reg_vcc3v3>; 62 + &emac { 63 + allwinner,leds-active-low; 62 64 status = "okay"; 63 65 }; 64 66 ··· 95 93 channel = <0>; 96 94 voltage = <800000>; 97 95 }; 96 + }; 97 + 98 + &mmc1 { 99 + broken-cd; 100 + bus-width = <4>; 101 + vmmc-supply = <&reg_vcc3v3>; 102 + status = "okay"; 98 103 };
+48
arch/arm/boot/dts/sun8i-v3s.dtsi
··· 1 1 /* 2 2 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> 3 + * Copyright (C) 2021 Tobias Schramm <t.schramm@manjaro.org> 3 4 * 4 5 * This file is dual-licensed: you can use it either under the terms 5 6 * of the GPL or the X11 license, at your option. Note that this dual ··· 173 172 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 174 173 }; 175 174 175 + dma: dma-controller@1c02000 { 176 + compatible = "allwinner,sun8i-v3s-dma"; 177 + reg = <0x01c02000 0x1000>; 178 + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 179 + clocks = <&ccu CLK_BUS_DMA>; 180 + resets = <&ccu RST_BUS_DMA>; 181 + #dma-cells = <1>; 182 + }; 183 + 176 184 tcon0: lcd-controller@1c0c000 { 177 185 compatible = "allwinner,sun8i-v3s-tcon"; 178 186 reg = <0x01c0c000 0x1000>; ··· 285 275 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; 286 276 clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>; 287 277 clock-names = "ahb", "mod"; 278 + dmas = <&dma 16>, <&dma 16>; 279 + dma-names = "rx", "tx"; 288 280 resets = <&ccu RST_BUS_CE>; 289 281 reset-names = "ahb"; 290 282 }; ··· 434 422 clocks = <&osc24M>; 435 423 }; 436 424 425 + pwm: pwm@1c21400 { 426 + compatible = "allwinner,sun8i-v3s-pwm", 427 + "allwinner,sun7i-a20-pwm"; 428 + reg = <0x01c21400 0xc>; 429 + clocks = <&osc24M>; 430 + #pwm-cells = <3>; 431 + status = "disabled"; 432 + }; 433 + 437 434 lradc: lradc@1c22800 { 438 435 compatible = "allwinner,sun4i-a10-lradc-keys"; 439 436 reg = <0x01c22800 0x400>; 440 437 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 441 438 status = "disabled"; 439 + }; 440 + 441 + codec: codec@1c22c00 { 442 + #sound-dai-cells = <0>; 443 + compatible = "allwinner,sun8i-v3s-codec"; 444 + reg = <0x01c22c00 0x400>; 445 + interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; 446 + clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>; 447 + clock-names = "apb", "codec"; 448 + resets = <&ccu RST_BUS_CODEC>; 449 + dmas = <&dma 15>, <&dma 15>; 450 + dma-names = "rx", "tx"; 451 + allwinner,codec-analog-controls = <&codec_analog>; 452 + status = "disabled"; 453 + }; 454 + 455 + codec_analog: codec-analog@1c23000 { 456 + compatible = "allwinner,sun8i-v3s-codec-analog"; 457 + reg = <0x01c23000 0x4>; 442 458 }; 443 459 444 460 uart0: serial@1c28000 { ··· 476 436 reg-shift = <2>; 477 437 reg-io-width = <4>; 478 438 clocks = <&ccu CLK_BUS_UART0>; 439 + dmas = <&dma 6>, <&dma 6>; 440 + dma-names = "rx", "tx"; 479 441 resets = <&ccu RST_BUS_UART0>; 480 442 status = "disabled"; 481 443 }; ··· 489 447 reg-shift = <2>; 490 448 reg-io-width = <4>; 491 449 clocks = <&ccu CLK_BUS_UART1>; 450 + dmas = <&dma 7>, <&dma 7>; 451 + dma-names = "rx", "tx"; 492 452 resets = <&ccu RST_BUS_UART1>; 493 453 status = "disabled"; 494 454 }; ··· 502 458 reg-shift = <2>; 503 459 reg-io-width = <4>; 504 460 clocks = <&ccu CLK_BUS_UART2>; 461 + dmas = <&dma 8>, <&dma 8>; 462 + dma-names = "rx", "tx"; 505 463 resets = <&ccu RST_BUS_UART2>; 506 464 pinctrl-0 = <&uart2_pins>; 507 465 pinctrl-names = "default"; ··· 583 537 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 584 538 clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>; 585 539 clock-names = "ahb", "mod"; 540 + dmas = <&dma 23>, <&dma 23>; 541 + dma-names = "rx", "tx"; 586 542 pinctrl-names = "default"; 587 543 pinctrl-0 = <&spi0_pins>; 588 544 resets = <&ccu RST_BUS_SPI0>;
+1
arch/arm64/boot/dts/allwinner/Makefile
··· 25 25 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h5-cc.dtb 26 26 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb 27 27 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb 28 + dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-r1s-h5.dtb 28 29 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb 29 30 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb 30 31 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
+25
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
··· 25 25 /* Backlight configuration differs per PinePhone revision. */ 26 26 }; 27 27 28 + bt_sco_codec: bt-sco-codec { 29 + #sound-dai-cells = <1>; 30 + compatible = "linux,bt-sco"; 31 + }; 32 + 28 33 chosen { 29 34 stdout-path = "serial0:115200n8"; 30 35 }; ··· 96 91 }; 97 92 98 93 &codec { 94 + pinctrl-names = "default"; 95 + pinctrl-0 = <&aif3_pins>; 99 96 status = "okay"; 100 97 }; 101 98 ··· 433 426 434 427 &sound { 435 428 status = "okay"; 429 + simple-audio-card,name = "PinePhone"; 436 430 simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>; 437 431 simple-audio-card,widgets = "Microphone", "Headset Microphone", 438 432 "Microphone", "Internal Microphone", ··· 455 447 "MIC1", "Internal Microphone", 456 448 "Headset Microphone", "HBIAS", 457 449 "MIC2", "Headset Microphone"; 450 + 451 + simple-audio-card,dai-link@2 { 452 + format = "dsp_a"; 453 + frame-master = <&link2_codec>; 454 + bitclock-master = <&link2_codec>; 455 + bitclock-inversion; 456 + 457 + link2_cpu: cpu { 458 + sound-dai = <&bt_sco_codec 0>; 459 + }; 460 + 461 + link2_codec: codec { 462 + sound-dai = <&codec 2>; 463 + dai-tdm-slot-num = <1>; 464 + dai-tdm-slot-width = <32>; 465 + }; 466 + }; 458 467 }; 459 468 460 469 &uart0 {
+44 -18
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
··· 131 131 }; 132 132 133 133 sound: sound { 134 + #address-cells = <1>; 135 + #size-cells = <0>; 134 136 compatible = "simple-audio-card"; 135 137 simple-audio-card,name = "sun50i-a64-audio"; 136 - simple-audio-card,format = "i2s"; 137 - simple-audio-card,frame-master = <&cpudai>; 138 - simple-audio-card,bitclock-master = <&cpudai>; 139 - simple-audio-card,mclk-fs = <128>; 140 138 simple-audio-card,aux-devs = <&codec_analog>; 141 139 simple-audio-card,routing = 142 140 "Left DAC", "DACL", ··· 143 145 "ADCR", "Right ADC"; 144 146 status = "disabled"; 145 147 146 - cpudai: simple-audio-card,cpu { 147 - sound-dai = <&dai>; 148 - }; 148 + simple-audio-card,dai-link@0 { 149 + format = "i2s"; 150 + frame-master = <&link0_cpu>; 151 + bitclock-master = <&link0_cpu>; 152 + mclk-fs = <128>; 149 153 150 - link_codec: simple-audio-card,codec { 151 - sound-dai = <&codec>; 154 + link0_cpu: cpu { 155 + sound-dai = <&dai>; 156 + }; 157 + 158 + link0_codec: codec { 159 + sound-dai = <&codec 0>; 160 + }; 152 161 }; 153 162 }; 154 163 ··· 664 659 interrupt-controller; 665 660 #interrupt-cells = <3>; 666 661 662 + /omit-if-no-ref/ 663 + aif2_pins: aif2-pins { 664 + pins = "PB4", "PB5", "PB6", "PB7"; 665 + function = "aif2"; 666 + }; 667 + 668 + /omit-if-no-ref/ 669 + aif3_pins: aif3-pins { 670 + pins = "PG10", "PG11", "PG12", "PG13"; 671 + function = "aif3"; 672 + }; 673 + 667 674 csi_pins: csi-pins { 668 675 pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6", 669 676 "PE7", "PE8", "PE9", "PE10", "PE11"; ··· 816 799 }; 817 800 }; 818 801 802 + timer@1c20c00 { 803 + compatible = "allwinner,sun50i-a64-timer", 804 + "allwinner,sun8i-a23-timer"; 805 + reg = <0x01c20c00 0xa0>; 806 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 807 + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 808 + clocks = <&osc24M>; 809 + }; 810 + 811 + wdt0: watchdog@1c20ca0 { 812 + compatible = "allwinner,sun50i-a64-wdt", 813 + "allwinner,sun6i-a31-wdt"; 814 + reg = <0x01c20ca0 0x20>; 815 + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 816 + clocks = <&osc24M>; 817 + }; 818 + 819 819 spdif: spdif@1c21000 { 820 820 #sound-dai-cells = <0>; 821 821 compatible = "allwinner,sun50i-a64-spdif", ··· 914 880 }; 915 881 916 882 codec: codec@1c22e00 { 917 - #sound-dai-cells = <0>; 883 + #sound-dai-cells = <1>; 918 884 compatible = "allwinner,sun50i-a64-codec", 919 885 "allwinner,sun8i-a33-codec"; 920 886 reg = <0x01c22e00 0x600>; ··· 1358 1324 status = "disabled"; 1359 1325 #address-cells = <1>; 1360 1326 #size-cells = <0>; 1361 - }; 1362 - 1363 - wdt0: watchdog@1c20ca0 { 1364 - compatible = "allwinner,sun50i-a64-wdt", 1365 - "allwinner,sun6i-a31-wdt"; 1366 - reg = <0x01c20ca0 0x20>; 1367 - interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 1368 - clocks = <&osc24M>; 1369 1327 }; 1370 1328 }; 1371 1329 };
+195
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (C) 2021 Chukun Pan <amadeus@jmu.edu.cn> 4 + * 5 + * Based on sun50i-h5-nanopi-neo-plus2.dts, which is: 6 + * Copyright (C) 2017 Antony Antony <antony@phenome.org> 7 + * Copyright (C) 2016 ARM Ltd. 8 + */ 9 + 10 + /dts-v1/; 11 + #include "sun50i-h5.dtsi" 12 + #include "sun50i-h5-cpu-opp.dtsi" 13 + 14 + #include <dt-bindings/gpio/gpio.h> 15 + #include <dt-bindings/input/input.h> 16 + #include <dt-bindings/leds/common.h> 17 + 18 + / { 19 + model = "FriendlyARM NanoPi R1S H5"; 20 + compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5"; 21 + 22 + aliases { 23 + ethernet0 = &emac; 24 + ethernet1 = &rtl8189etv; 25 + serial0 = &uart0; 26 + }; 27 + 28 + chosen { 29 + stdout-path = "serial0:115200n8"; 30 + }; 31 + 32 + leds { 33 + compatible = "gpio-leds"; 34 + 35 + led-0 { 36 + function = LED_FUNCTION_LAN; 37 + color = <LED_COLOR_ID_GREEN>; 38 + gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; 39 + }; 40 + 41 + led-1 { 42 + function = LED_FUNCTION_STATUS; 43 + color = <LED_COLOR_ID_RED>; 44 + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; 45 + linux,default-trigger = "heartbeat"; 46 + }; 47 + 48 + led-2 { 49 + function = LED_FUNCTION_WAN; 50 + color = <LED_COLOR_ID_GREEN>; 51 + gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; 52 + }; 53 + }; 54 + 55 + r-gpio-keys { 56 + compatible = "gpio-keys"; 57 + 58 + reset { 59 + label = "reset"; 60 + linux,code = <KEY_RESTART>; 61 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; 62 + }; 63 + }; 64 + 65 + reg_gmac_3v3: gmac-3v3 { 66 + compatible = "regulator-fixed"; 67 + regulator-name = "gmac-3v3"; 68 + regulator-min-microvolt = <3300000>; 69 + regulator-max-microvolt = <3300000>; 70 + startup-delay-us = <100000>; 71 + enable-active-high; 72 + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 73 + }; 74 + 75 + reg_vcc3v3: vcc3v3 { 76 + compatible = "regulator-fixed"; 77 + regulator-name = "vcc3v3"; 78 + regulator-min-microvolt = <3300000>; 79 + regulator-max-microvolt = <3300000>; 80 + }; 81 + 82 + reg_usb0_vbus: usb0-vbus { 83 + compatible = "regulator-fixed"; 84 + regulator-name = "usb0-vbus"; 85 + regulator-min-microvolt = <5000000>; 86 + regulator-max-microvolt = <5000000>; 87 + enable-active-high; 88 + gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 89 + status = "okay"; 90 + }; 91 + 92 + vdd_cpux: gpio-regulator { 93 + compatible = "regulator-gpio"; 94 + regulator-name = "vdd-cpux"; 95 + regulator-type = "voltage"; 96 + regulator-boot-on; 97 + regulator-always-on; 98 + regulator-min-microvolt = <1100000>; 99 + regulator-max-microvolt = <1300000>; 100 + regulator-ramp-delay = <50>; /* 4ms */ 101 + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; 102 + gpios-states = <0x1>; 103 + states = <1100000 0x0>, <1300000 0x1>; 104 + }; 105 + 106 + wifi_pwrseq: wifi_pwrseq { 107 + compatible = "mmc-pwrseq-simple"; 108 + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ 109 + post-power-on-delay-ms = <200>; 110 + }; 111 + }; 112 + 113 + &cpu0 { 114 + cpu-supply = <&vdd_cpux>; 115 + }; 116 + 117 + &ehci1 { 118 + status = "okay"; 119 + }; 120 + 121 + &ehci2 { 122 + status = "okay"; 123 + }; 124 + 125 + &emac { 126 + pinctrl-names = "default"; 127 + pinctrl-0 = <&emac_rgmii_pins>; 128 + phy-supply = <&reg_gmac_3v3>; 129 + phy-handle = <&ext_rgmii_phy>; 130 + phy-mode = "rgmii-id"; 131 + status = "okay"; 132 + }; 133 + 134 + &external_mdio { 135 + ext_rgmii_phy: ethernet-phy@7 { 136 + compatible = "ethernet-phy-ieee802.3-c22"; 137 + reg = <7>; 138 + }; 139 + }; 140 + 141 + &i2c0 { 142 + status = "okay"; 143 + 144 + eeprom@51 { 145 + compatible = "microchip,24c02"; 146 + reg = <0x51>; 147 + pagesize = <16>; 148 + }; 149 + }; 150 + 151 + &mmc0 { 152 + vmmc-supply = <&reg_vcc3v3>; 153 + bus-width = <4>; 154 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 155 + status = "okay"; 156 + }; 157 + 158 + &mmc1 { 159 + vmmc-supply = <&reg_vcc3v3>; 160 + vqmmc-supply = <&reg_vcc3v3>; 161 + mmc-pwrseq = <&wifi_pwrseq>; 162 + bus-width = <4>; 163 + non-removable; 164 + status = "okay"; 165 + 166 + rtl8189etv: sdio_wifi@1 { 167 + reg = <1>; 168 + }; 169 + }; 170 + 171 + &ohci1 { 172 + status = "okay"; 173 + }; 174 + 175 + &ohci2 { 176 + status = "okay"; 177 + }; 178 + 179 + &uart0 { 180 + pinctrl-names = "default"; 181 + pinctrl-0 = <&uart0_pa_pins>; 182 + status = "okay"; 183 + }; 184 + 185 + &usb_otg { 186 + dr_mode = "peripheral"; 187 + status = "okay"; 188 + }; 189 + 190 + &usbphy { 191 + /* USB Type-A port's VBUS is always on */ 192 + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 193 + usb0_vbus-supply = <&reg_usb0_vbus>; 194 + status = "okay"; 195 + };
+9
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
··· 271 271 }; 272 272 }; 273 273 274 + timer@3009000 { 275 + compatible = "allwinner,sun50i-h6-timer", 276 + "allwinner,sun8i-a23-timer"; 277 + reg = <0x03009000 0xa0>; 278 + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>, 279 + <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; 280 + clocks = <&osc24M>; 281 + }; 282 + 274 283 watchdog: watchdog@30090a0 { 275 284 compatible = "allwinner,sun50i-h6-wdt", 276 285 "allwinner,sun6i-a31-wdt";