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

Merge tag 'sunxi-dt-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt

Pull "Allwinner DT changes for 4.15, take 2" from Maxime Ripard:

Here are a few commits that would be great to get in 4.15, given how
long they've been hanging around.

The first and most important one is the reintroduction of the EMAC DT
changes after they've been reverted at the last minute in 4.13.

There's a arm64 patch that crept in because the H5 and H3 share a
common DTSI that is located in arch/arm, and merging that patch
through the arm64 PR, especially given the pull requests that have
already been sent, would just have generated too many conflicts.

* tag 'sunxi-dt-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
ARM: dts: sun8i: a711: Enable USB OTG
ARM: dts: sun8i: a711: Add regulator support
ARM: dts: sun8i: a83t: bananapi-m3: Enable AP6212 WiFi on mmc1
ARM: dts: sun8i: a83t: cubietruck-plus: Enable AP6330 WiFi on mmc1
ARM: dts: sun8i: a83t: Move mmc1 pinctrl setting to dtsi file
ARM: dts: sun8i: a83t: allwinner-h8homlet-v2: Add AXP818 regulator nodes
ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes
ARM: dts: sun8i: a83t: cubietruck-plus: Add AXP818 regulator nodes
ARM: dts: sunxi: Add dtsi for AXP81x PMIC
arm64: dts: allwinner: H5: Restore EMAC changes
ARM: dts: sunxi: Restore EMAC changes (boards)
ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac
arm: dts: sunxi: h3/h5: Restore EMAC changes
dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY
dt-bindings: net: Restore sun8i dwmac binding

+1210 -46
+207
Documentation/devicetree/bindings/net/dwmac-sun8i.txt
··· 1 + * Allwinner sun8i GMAC ethernet controller 2 + 3 + This device is a platform glue layer for stmmac. 4 + Please see stmmac.txt for the other unchanged properties. 5 + 6 + Required properties: 7 + - compatible: must be one of the following string: 8 + "allwinner,sun8i-a83t-emac" 9 + "allwinner,sun8i-h3-emac" 10 + "allwinner,sun8i-v3s-emac" 11 + "allwinner,sun50i-a64-emac" 12 + - reg: address and length of the register for the device. 13 + - interrupts: interrupt for the device 14 + - interrupt-names: must be "macirq" 15 + - clocks: A phandle to the reference clock for this device 16 + - clock-names: must be "stmmaceth" 17 + - resets: A phandle to the reset control for this device 18 + - reset-names: must be "stmmaceth" 19 + - phy-mode: See ethernet.txt 20 + - phy-handle: See ethernet.txt 21 + - #address-cells: shall be 1 22 + - #size-cells: shall be 0 23 + - syscon: A phandle to the syscon of the SoC with one of the following 24 + compatible string: 25 + - allwinner,sun8i-h3-system-controller 26 + - allwinner,sun8i-v3s-system-controller 27 + - allwinner,sun50i-a64-system-controller 28 + - allwinner,sun8i-a83t-system-controller 29 + 30 + Optional properties: 31 + - allwinner,tx-delay-ps: TX clock delay chain value in ps. Range value is 0-700. Default is 0) 32 + - allwinner,rx-delay-ps: RX clock delay chain value in ps. Range value is 0-3100. Default is 0) 33 + Both delay properties need to be a multiple of 100. They control the delay for 34 + external PHY. 35 + 36 + Optional properties for the following compatibles: 37 + - "allwinner,sun8i-h3-emac", 38 + - "allwinner,sun8i-v3s-emac": 39 + - allwinner,leds-active-low: EPHY LEDs are active low 40 + 41 + Required child node of emac: 42 + - mdio bus node: should be named mdio with compatible "snps,dwmac-mdio" 43 + 44 + Required properties of the mdio node: 45 + - #address-cells: shall be 1 46 + - #size-cells: shall be 0 47 + 48 + The device node referenced by "phy" or "phy-handle" must be a child node 49 + of the mdio node. See phy.txt for the generic PHY bindings. 50 + 51 + The following compatibles require that the emac node have a mdio-mux child 52 + node called "mdio-mux": 53 + - "allwinner,sun8i-h3-emac" 54 + - "allwinner,sun8i-v3s-emac": 55 + Required properties for the mdio-mux node: 56 + - compatible = "allwinner,sun8i-h3-mdio-mux" 57 + - mdio-parent-bus: a phandle to EMAC mdio 58 + - one child mdio for the integrated mdio with the compatible 59 + "allwinner,sun8i-h3-mdio-internal" 60 + - one child mdio for the external mdio if present (V3s have none) 61 + Required properties for the mdio-mux children node: 62 + - reg: 1 for internal MDIO bus, 2 for external MDIO bus 63 + 64 + The following compatibles require a PHY node representing the integrated 65 + PHY, under the integrated MDIO bus node if an mdio-mux node is used: 66 + - "allwinner,sun8i-h3-emac", 67 + - "allwinner,sun8i-v3s-emac": 68 + 69 + Additional information regarding generic multiplexer properties can be found 70 + at Documentation/devicetree/bindings/net/mdio-mux.txt 71 + 72 + Required properties of the integrated phy node: 73 + - clocks: a phandle to the reference clock for the EPHY 74 + - resets: a phandle to the reset control for the EPHY 75 + - Must be a child of the integrated mdio 76 + 77 + Example with integrated PHY: 78 + emac: ethernet@1c0b000 { 79 + compatible = "allwinner,sun8i-h3-emac"; 80 + syscon = <&syscon>; 81 + reg = <0x01c0b000 0x104>; 82 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 83 + interrupt-names = "macirq"; 84 + resets = <&ccu RST_BUS_EMAC>; 85 + reset-names = "stmmaceth"; 86 + clocks = <&ccu CLK_BUS_EMAC>; 87 + clock-names = "stmmaceth"; 88 + #address-cells = <1>; 89 + #size-cells = <0>; 90 + 91 + phy-handle = <&int_mii_phy>; 92 + phy-mode = "mii"; 93 + allwinner,leds-active-low; 94 + 95 + mdio: mdio { 96 + #address-cells = <1>; 97 + #size-cells = <0>; 98 + compatible = "snps,dwmac-mdio"; 99 + }; 100 + 101 + mdio-mux { 102 + compatible = "mdio-mux", "allwinner,sun8i-h3-mdio-mux"; 103 + #address-cells = <1>; 104 + #size-cells = <0>; 105 + 106 + mdio-parent-bus = <&mdio>; 107 + 108 + int_mdio: mdio@1 { 109 + compatible = "allwinner,sun8i-h3-mdio-internal"; 110 + reg = <1>; 111 + #address-cells = <1>; 112 + #size-cells = <0>; 113 + int_mii_phy: ethernet-phy@1 { 114 + reg = <1>; 115 + clocks = <&ccu CLK_BUS_EPHY>; 116 + resets = <&ccu RST_BUS_EPHY>; 117 + phy-is-integrated; 118 + }; 119 + }; 120 + ext_mdio: mdio@2 { 121 + reg = <2>; 122 + #address-cells = <1>; 123 + #size-cells = <0>; 124 + }; 125 + }; 126 + }; 127 + 128 + Example with external PHY: 129 + emac: ethernet@1c0b000 { 130 + compatible = "allwinner,sun8i-h3-emac"; 131 + syscon = <&syscon>; 132 + reg = <0x01c0b000 0x104>; 133 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 134 + interrupt-names = "macirq"; 135 + resets = <&ccu RST_BUS_EMAC>; 136 + reset-names = "stmmaceth"; 137 + clocks = <&ccu CLK_BUS_EMAC>; 138 + clock-names = "stmmaceth"; 139 + #address-cells = <1>; 140 + #size-cells = <0>; 141 + 142 + phy-handle = <&ext_rgmii_phy>; 143 + phy-mode = "rgmii"; 144 + allwinner,leds-active-low; 145 + 146 + mdio: mdio { 147 + #address-cells = <1>; 148 + #size-cells = <0>; 149 + compatible = "snps,dwmac-mdio"; 150 + }; 151 + 152 + mdio-mux { 153 + compatible = "allwinner,sun8i-h3-mdio-mux"; 154 + #address-cells = <1>; 155 + #size-cells = <0>; 156 + 157 + mdio-parent-bus = <&mdio>; 158 + 159 + int_mdio: mdio@1 { 160 + compatible = "allwinner,sun8i-h3-mdio-internal"; 161 + reg = <1>; 162 + #address-cells = <1>; 163 + #size-cells = <0>; 164 + int_mii_phy: ethernet-phy@1 { 165 + reg = <1>; 166 + clocks = <&ccu CLK_BUS_EPHY>; 167 + resets = <&ccu RST_BUS_EPHY>; 168 + }; 169 + }; 170 + ext_mdio: mdio@2 { 171 + reg = <2>; 172 + #address-cells = <1>; 173 + #size-cells = <0>; 174 + ext_rgmii_phy: ethernet-phy@1 { 175 + reg = <1>; 176 + }; 177 + }: 178 + }; 179 + }; 180 + 181 + Example with SoC without integrated PHY 182 + 183 + emac: ethernet@1c0b000 { 184 + compatible = "allwinner,sun8i-a83t-emac"; 185 + syscon = <&syscon>; 186 + reg = <0x01c0b000 0x104>; 187 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 188 + interrupt-names = "macirq"; 189 + resets = <&ccu RST_BUS_EMAC>; 190 + reset-names = "stmmaceth"; 191 + clocks = <&ccu CLK_BUS_EMAC>; 192 + clock-names = "stmmaceth"; 193 + #address-cells = <1>; 194 + #size-cells = <0>; 195 + 196 + phy-handle = <&ext_rgmii_phy>; 197 + phy-mode = "rgmii"; 198 + 199 + mdio: mdio { 200 + compatible = "snps,dwmac-mdio"; 201 + #address-cells = <1>; 202 + #size-cells = <0>; 203 + ext_rgmii_phy: ethernet-phy@1 { 204 + reg = <1>; 205 + }; 206 + }; 207 + };
+139
arch/arm/boot/dts/axp81x.dtsi
··· 1 + /* 2 + * Copyright 2017 Chen-Yu Tsai 3 + * 4 + * Chen-Yu Tsai <wens@csie.org> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This file is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * Or, alternatively, 22 + * 23 + * b) Permission is hereby granted, free of charge, to any person 24 + * obtaining a copy of this software and associated documentation 25 + * files (the "Software"), to deal in the Software without 26 + * restriction, including without limitation the rights to use, 27 + * copy, modify, merge, publish, distribute, sublicense, and/or 28 + * sell copies of the Software, and to permit persons to whom the 29 + * Software is furnished to do so, subject to the following 30 + * conditions: 31 + * 32 + * The above copyright notice and this permission notice shall be 33 + * included in all copies or substantial portions of the Software. 34 + * 35 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42 + * OTHER DEALINGS IN THE SOFTWARE. 43 + */ 44 + 45 + /* AXP813/818 Integrated Power Management Chip */ 46 + 47 + &axp81x { 48 + interrupt-controller; 49 + #interrupt-cells = <1>; 50 + 51 + regulators { 52 + /* Default work frequency for buck regulators */ 53 + x-powers,dcdc-freq = <3000>; 54 + 55 + reg_dcdc1: dcdc1 { 56 + }; 57 + 58 + reg_dcdc2: dcdc2 { 59 + }; 60 + 61 + reg_dcdc3: dcdc3 { 62 + }; 63 + 64 + reg_dcdc4: dcdc4 { 65 + }; 66 + 67 + reg_dcdc5: dcdc5 { 68 + }; 69 + 70 + reg_dcdc6: dcdc6 { 71 + }; 72 + 73 + reg_dcdc7: dcdc7 { 74 + }; 75 + 76 + reg_aldo1: aldo1 { 77 + }; 78 + 79 + reg_aldo2: aldo2 { 80 + }; 81 + 82 + reg_aldo3: aldo3 { 83 + }; 84 + 85 + reg_dldo1: dldo1 { 86 + }; 87 + 88 + reg_dldo2: dldo2 { 89 + }; 90 + 91 + reg_dldo3: dldo3 { 92 + }; 93 + 94 + reg_dldo4: dldo4 { 95 + }; 96 + 97 + reg_eldo1: eldo1 { 98 + }; 99 + 100 + reg_eldo2: eldo2 { 101 + }; 102 + 103 + reg_eldo3: eldo3 { 104 + }; 105 + 106 + reg_fldo1: fldo1 { 107 + }; 108 + 109 + reg_fldo2: fldo2 { 110 + }; 111 + 112 + reg_fldo3: fldo3 { 113 + }; 114 + 115 + reg_ldo_io0: ldo-io0 { 116 + /* Disable by default to avoid conflicts with GPIO */ 117 + status = "disabled"; 118 + }; 119 + 120 + reg_ldo_io1: ldo-io1 { 121 + /* Disable by default to avoid conflicts with GPIO */ 122 + status = "disabled"; 123 + }; 124 + 125 + reg_rtc_ldo: rtc-ldo { 126 + /* RTC_LDO is a fixed, always-on regulator */ 127 + regulator-always-on; 128 + regulator-min-microvolt = <1800000>; 129 + regulator-max-microvolt = <1800000>; 130 + }; 131 + 132 + reg_sw: sw { 133 + }; 134 + 135 + reg_drivevbus: drivevbus { 136 + status = "disabled"; 137 + }; 138 + }; 139 + };
+134 -13
arch/arm/boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts
··· 43 43 44 44 /dts-v1/; 45 45 #include "sun8i-a83t.dtsi" 46 - #include "sunxi-common-regulators.dtsi" 46 + 47 + #include <dt-bindings/gpio/gpio.h> 47 48 48 49 / { 49 50 model = "Allwinner A83T H8Homlet Proto Dev Board v2.0"; ··· 57 56 chosen { 58 57 stdout-path = "serial0:115200n8"; 59 58 }; 59 + 60 + reg_usb0_vbus: reg-usb0-vbus { 61 + compatible = "regulator-fixed"; 62 + regulator-name = "usb0-vbus"; 63 + regulator-min-microvolt = <5000000>; 64 + regulator-max-microvolt = <5000000>; 65 + regulator-boot-on; 66 + enable-active-high; 67 + gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ 68 + }; 69 + 70 + reg_usb1_vbus: reg-usb1-vbus { 71 + compatible = "regulator-fixed"; 72 + regulator-name = "usb1-vbus"; 73 + regulator-min-microvolt = <5000000>; 74 + regulator-max-microvolt = <5000000>; 75 + regulator-boot-on; 76 + enable-active-high; 77 + gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 78 + }; 60 79 }; 61 80 62 81 &ehci0 { ··· 86 65 &mmc0 { 87 66 pinctrl-names = "default"; 88 67 pinctrl-0 = <&mmc0_pins>; 89 - vmmc-supply = <&reg_vcc3v0>; 68 + vmmc-supply = <&reg_dcdc1>; 90 69 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ 91 70 bus-width = <4>; 92 71 cd-inverted; ··· 96 75 &mmc2 { 97 76 pinctrl-names = "default"; 98 77 pinctrl-0 = <&mmc2_8bit_emmc_pins>; 99 - vmmc-supply = <&reg_vcc3v0>; 78 + vmmc-supply = <&reg_dcdc1>; 79 + vqmmc-supply = <&reg_dcdc1>; 100 80 bus-width = <8>; 101 81 non-removable; 102 82 cap-mmc-hw-reset; ··· 105 83 }; 106 84 107 85 &ohci0 { 108 - status = "okay"; 109 - }; 110 - 111 - &reg_usb0_vbus { 112 - gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ 113 - status = "okay"; 114 - }; 115 - 116 - &reg_usb1_vbus { 117 - gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 118 86 status = "okay"; 119 87 }; 120 88 ··· 116 104 reg = <0x3a3>; 117 105 interrupt-parent = <&r_intc>; 118 106 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 107 + eldoin-supply = <&reg_dcdc1>; 108 + swin-supply = <&reg_dcdc1>; 119 109 }; 120 110 121 111 ac100: codec@e89 { ··· 143 129 "cko3_rtc"; 144 130 }; 145 131 }; 132 + }; 133 + 134 + #include "axp81x.dtsi" 135 + 136 + &reg_aldo1 { 137 + regulator-always-on; 138 + regulator-min-microvolt = <1800000>; 139 + regulator-max-microvolt = <1800000>; 140 + regulator-name = "vcc-1v8"; 141 + }; 142 + 143 + &reg_aldo2 { 144 + regulator-always-on; 145 + regulator-min-microvolt = <1800000>; 146 + regulator-max-microvolt = <1800000>; 147 + regulator-name = "dram-pll"; 148 + }; 149 + 150 + &reg_aldo3 { 151 + regulator-always-on; 152 + regulator-min-microvolt = <3000000>; 153 + regulator-max-microvolt = <3000000>; 154 + regulator-name = "avcc"; 155 + }; 156 + 157 + &reg_dcdc1 { 158 + regulator-always-on; 159 + regulator-min-microvolt = <3300000>; 160 + regulator-max-microvolt = <3300000>; 161 + regulator-name = "vcc-3v3"; 162 + }; 163 + 164 + &reg_dcdc2 { 165 + regulator-always-on; 166 + regulator-min-microvolt = <700000>; 167 + regulator-max-microvolt = <1100000>; 168 + regulator-name = "vdd-cpua"; 169 + }; 170 + 171 + &reg_dcdc3 { 172 + regulator-always-on; 173 + regulator-min-microvolt = <700000>; 174 + regulator-max-microvolt = <1100000>; 175 + regulator-name = "vdd-cpub"; 176 + }; 177 + 178 + &reg_dcdc4 { 179 + regulator-min-microvolt = <700000>; 180 + regulator-max-microvolt = <1100000>; 181 + regulator-name = "vdd-gpu"; 182 + }; 183 + 184 + &reg_dcdc5 { 185 + regulator-always-on; 186 + regulator-min-microvolt = <1500000>; 187 + regulator-max-microvolt = <1500000>; 188 + regulator-name = "vcc-dram"; 189 + }; 190 + 191 + &reg_dcdc6 { 192 + regulator-always-on; 193 + regulator-min-microvolt = <900000>; 194 + regulator-max-microvolt = <900000>; 195 + regulator-name = "vdd-sys"; 196 + }; 197 + 198 + &reg_dldo2 { 199 + regulator-min-microvolt = <3300000>; 200 + regulator-max-microvolt = <3300000>; 201 + regulator-name = "vcc-mipi"; 202 + }; 203 + 204 + &reg_dldo4 { 205 + /* 206 + * The PHY requires 20ms after all voltages are applied until core 207 + * logic is ready and 30ms after the reset pin is de-asserted. 208 + * Set a 100ms delay to account for PMIC ramp time and board traces. 209 + */ 210 + regulator-enable-ramp-delay = <100000>; 211 + regulator-min-microvolt = <3300000>; 212 + regulator-max-microvolt = <3300000>; 213 + regulator-name = "vcc-ephy"; 214 + }; 215 + 216 + &reg_fldo1 { 217 + regulator-min-microvolt = <1080000>; 218 + regulator-max-microvolt = <1320000>; 219 + regulator-name = "vdd12-hsic"; 220 + }; 221 + 222 + &reg_fldo2 { 223 + /* 224 + * Despite the embedded CPUs core not being used in any way, 225 + * this must remain on or the system will hang. 226 + */ 227 + regulator-always-on; 228 + regulator-min-microvolt = <700000>; 229 + regulator-max-microvolt = <1100000>; 230 + regulator-name = "vdd-cpus"; 231 + }; 232 + 233 + &reg_rtc_ldo { 234 + regulator-name = "vcc-rtc"; 235 + }; 236 + 237 + &reg_sw { 238 + regulator-name = "vcc-wifi"; 146 239 }; 147 240 148 241 &uart0 {
+160 -9
arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
··· 44 44 45 45 /dts-v1/; 46 46 #include "sun8i-a83t.dtsi" 47 - #include "sunxi-common-regulators.dtsi" 48 47 49 48 #include <dt-bindings/gpio/gpio.h> 50 49 ··· 58 59 chosen { 59 60 stdout-path = "serial0:115200n8"; 60 61 }; 62 + 63 + reg_usb1_vbus: reg-usb1-vbus { 64 + compatible = "regulator-fixed"; 65 + regulator-name = "usb1-vbus"; 66 + regulator-min-microvolt = <5000000>; 67 + regulator-max-microvolt = <5000000>; 68 + regulator-boot-on; 69 + enable-active-high; 70 + gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ 71 + }; 72 + 73 + wifi_pwrseq: wifi_pwrseq { 74 + compatible = "mmc-pwrseq-simple"; 75 + clocks = <&ac100_rtc 1>; 76 + clock-names = "ext_clock"; 77 + /* The WiFi low power clock must be 32768 Hz */ 78 + assigned-clocks = <&ac100_rtc 1>; 79 + assigned-clock-rates = <32768>; 80 + /* enables internal regulator and de-asserts reset */ 81 + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */ 82 + }; 61 83 }; 62 84 63 85 &ehci0 { ··· 91 71 &mmc0 { 92 72 pinctrl-names = "default"; 93 73 pinctrl-0 = <&mmc0_pins>; 94 - vmmc-supply = <&reg_vcc3v3>; 74 + vmmc-supply = <&reg_dcdc1>; 95 75 bus-width = <4>; 96 76 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ 97 77 cd-inverted; 98 78 status = "okay"; 99 79 }; 100 80 81 + &mmc1 { 82 + vmmc-supply = <&reg_dldo1>; 83 + vqmmc-supply = <&reg_dldo1>; 84 + mmc-pwrseq = <&wifi_pwrseq>; 85 + bus-width = <4>; 86 + non-removable; 87 + status = "okay"; 88 + 89 + brcmf: wifi@1 { 90 + reg = <1>; 91 + compatible = "brcm,bcm4329-fmac"; 92 + interrupt-parent = <&r_pio>; 93 + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; 94 + interrupt-names = "host-wake"; 95 + }; 96 + }; 97 + 101 98 &mmc2 { 102 99 pinctrl-names = "default"; 103 100 pinctrl-0 = <&mmc2_8bit_emmc_pins>; 104 - vmmc-supply = <&reg_vcc3v3>; 101 + vmmc-supply = <&reg_dcdc1>; 102 + vqmmc-supply = <&reg_dcdc1>; 105 103 bus-width = <8>; 106 104 non-removable; 107 105 cap-mmc-hw-reset; ··· 134 96 reg = <0x3a3>; 135 97 interrupt-parent = <&r_intc>; 136 98 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 99 + eldoin-supply = <&reg_dcdc1>; 100 + fldoin-supply = <&reg_dcdc5>; 101 + swin-supply = <&reg_dcdc1>; 102 + x-powers,drive-vbus-en; 137 103 }; 138 104 139 105 ac100: codec@e89 { ··· 165 123 }; 166 124 }; 167 125 168 - &reg_usb1_vbus { 169 - gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ 126 + #include "axp81x.dtsi" 127 + 128 + &reg_aldo1 { 129 + regulator-always-on; 130 + regulator-min-microvolt = <1800000>; 131 + regulator-max-microvolt = <1800000>; 132 + regulator-name = "vcc-1v8"; 133 + }; 134 + 135 + &reg_aldo2 { 136 + regulator-always-on; 137 + regulator-min-microvolt = <1800000>; 138 + regulator-max-microvolt = <1800000>; 139 + regulator-name = "dram-pll"; 140 + }; 141 + 142 + &reg_aldo3 { 143 + regulator-always-on; 144 + regulator-min-microvolt = <3000000>; 145 + regulator-max-microvolt = <3000000>; 146 + regulator-name = "avcc"; 147 + }; 148 + 149 + &reg_dcdc1 { 150 + /* schematics says 3.1V but FEX file says 3.3V */ 151 + regulator-always-on; 152 + regulator-min-microvolt = <3300000>; 153 + regulator-max-microvolt = <3300000>; 154 + regulator-name = "vcc-3v3"; 155 + }; 156 + 157 + &reg_dcdc2 { 158 + regulator-always-on; 159 + regulator-min-microvolt = <700000>; 160 + regulator-max-microvolt = <1100000>; 161 + regulator-name = "vdd-cpua"; 162 + }; 163 + 164 + &reg_dcdc3 { 165 + regulator-always-on; 166 + regulator-min-microvolt = <700000>; 167 + regulator-max-microvolt = <1100000>; 168 + regulator-name = "vdd-cpub"; 169 + }; 170 + 171 + &reg_dcdc4 { 172 + regulator-min-microvolt = <700000>; 173 + regulator-max-microvolt = <1100000>; 174 + regulator-name = "vdd-gpu"; 175 + }; 176 + 177 + &reg_dcdc5 { 178 + regulator-always-on; 179 + regulator-min-microvolt = <1200000>; 180 + regulator-max-microvolt = <1200000>; 181 + regulator-name = "vcc-dram"; 182 + }; 183 + 184 + &reg_dcdc6 { 185 + regulator-always-on; 186 + regulator-min-microvolt = <900000>; 187 + regulator-max-microvolt = <900000>; 188 + regulator-name = "vdd-sys"; 189 + }; 190 + 191 + &reg_dldo1 { 192 + /* 193 + * This powers both the WiFi/BT module's main power, I/O supply, 194 + * and external pull-ups on all the data lines. It should be set 195 + * to the same voltage as the I/O supply (DCDC1 in this case) to 196 + * avoid any leakage or mismatch. 197 + */ 198 + regulator-min-microvolt = <3300000>; 199 + regulator-max-microvolt = <3300000>; 200 + regulator-name = "vcc-wifi"; 201 + }; 202 + 203 + &reg_dldo3 { 204 + regulator-always-on; 205 + regulator-min-microvolt = <2500000>; 206 + regulator-max-microvolt = <2500000>; 207 + regulator-name = "vcc-pd"; 208 + }; 209 + 210 + &reg_drivevbus { 211 + regulator-name = "usb0-vbus"; 170 212 status = "okay"; 171 213 }; 172 214 173 - &reg_vcc3v0 { 174 - status = "disabled"; 215 + &reg_fldo1 { 216 + regulator-min-microvolt = <1080000>; 217 + regulator-max-microvolt = <1320000>; 218 + regulator-name = "vdd12-hsic"; 175 219 }; 176 220 177 - &reg_vcc5v0 { 178 - status = "disabled"; 221 + &reg_fldo2 { 222 + /* 223 + * Despite the embedded CPUs core not being used in any way, 224 + * this must remain on or the system will hang. 225 + */ 226 + regulator-always-on; 227 + regulator-min-microvolt = <700000>; 228 + regulator-max-microvolt = <1100000>; 229 + regulator-name = "vdd-cpus"; 230 + }; 231 + 232 + &reg_rtc_ldo { 233 + regulator-name = "vcc-rtc"; 234 + }; 235 + 236 + &reg_sw { 237 + /* 238 + * The PHY requires 20ms after all voltages 239 + * are applied until core logic is ready and 240 + * 30ms after the reset pin is de-asserted. 241 + * Set a 100ms delay to account for PMIC 242 + * ramp time and board traces. 243 + */ 244 + regulator-enable-ramp-delay = <100000>; 245 + regulator-name = "vcc-ephy"; 179 246 }; 180 247 181 248 &uart0 {
+175 -12
arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
··· 44 44 45 45 /dts-v1/; 46 46 #include "sun8i-a83t.dtsi" 47 - #include "sunxi-common-regulators.dtsi" 48 47 49 48 #include <dt-bindings/gpio/gpio.h> 50 49 ··· 94 95 refclk-frequency = <19200000>; 95 96 }; 96 97 98 + reg_usb1_vbus: reg-usb1-vbus { 99 + compatible = "regulator-fixed"; 100 + regulator-name = "usb1-vbus"; 101 + regulator-min-microvolt = <5000000>; 102 + regulator-max-microvolt = <5000000>; 103 + regulator-boot-on; 104 + enable-active-high; 105 + gpio = <&pio 3 29 GPIO_ACTIVE_HIGH>; /* PD29 */ 106 + }; 107 + 108 + reg_usb2_vbus: reg-usb2-vbus { 109 + compatible = "regulator-fixed"; 110 + regulator-name = "usb2-vbus"; 111 + regulator-min-microvolt = <5000000>; 112 + regulator-max-microvolt = <5000000>; 113 + regulator-boot-on; 114 + enable-active-high; 115 + gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 116 + }; 117 + 97 118 sound { 98 119 compatible = "simple-audio-card"; 99 120 simple-audio-card,name = "On-board SPDIF"; ··· 131 112 #sound-dai-cells = <0>; 132 113 compatible = "linux,spdif-dit"; 133 114 }; 115 + 116 + wifi_pwrseq: wifi_pwrseq { 117 + compatible = "mmc-pwrseq-simple"; 118 + clocks = <&ac100_rtc 1>; 119 + clock-names = "ext_clock"; 120 + /* The WiFi low power clock must be 32768 Hz */ 121 + assigned-clocks = <&ac100_rtc 1>; 122 + assigned-clock-rates = <32768>; 123 + /* enables internal regulator and de-asserts reset */ 124 + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */ 125 + }; 134 126 }; 135 127 136 128 &ehci0 { ··· 157 127 &mmc0 { 158 128 pinctrl-names = "default"; 159 129 pinctrl-0 = <&mmc0_pins>; 160 - vmmc-supply = <&reg_vcc3v3>; 130 + vmmc-supply = <&reg_dcdc1>; 161 131 bus-width = <4>; 162 132 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ 163 133 cd-inverted; 164 134 status = "okay"; 165 135 }; 166 136 137 + &mmc1 { 138 + vmmc-supply = <&reg_dcdc1>; 139 + vqmmc-supply = <&reg_sw>; 140 + mmc-pwrseq = <&wifi_pwrseq>; 141 + bus-width = <4>; 142 + non-removable; 143 + status = "okay"; 144 + }; 145 + 167 146 &mmc2 { 168 147 pinctrl-names = "default"; 169 148 pinctrl-0 = <&mmc2_8bit_emmc_pins>; 170 - vmmc-supply = <&reg_vcc3v3>; 149 + vmmc-supply = <&reg_dcdc1>; 171 150 bus-width = <8>; 172 151 non-removable; 173 152 cap-mmc-hw-reset; ··· 191 152 reg = <0x3a3>; 192 153 interrupt-parent = <&r_intc>; 193 154 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 155 + eldoin-supply = <&reg_dcdc1>; 156 + swin-supply = <&reg_dcdc1>; 157 + x-powers,drive-vbus-en; 194 158 }; 195 159 196 160 ac100: codec@e89 { ··· 221 179 }; 222 180 }; 223 181 224 - &reg_usb1_vbus { 225 - gpio = <&pio 3 29 GPIO_ACTIVE_HIGH>; /* PD29 */ 182 + #include "axp81x.dtsi" 183 + 184 + &reg_aldo1 { 185 + regulator-always-on; 186 + regulator-min-microvolt = <1800000>; 187 + regulator-max-microvolt = <1800000>; 188 + regulator-name = "vcc-1v8"; 189 + }; 190 + 191 + &reg_aldo2 { 192 + regulator-always-on; 193 + regulator-min-microvolt = <1800000>; 194 + regulator-max-microvolt = <1800000>; 195 + regulator-name = "dram-pll"; 196 + }; 197 + 198 + &reg_aldo3 { 199 + regulator-always-on; 200 + regulator-min-microvolt = <3000000>; 201 + regulator-max-microvolt = <3000000>; 202 + regulator-name = "avcc"; 203 + }; 204 + 205 + &reg_dcdc1 { 206 + /* 207 + * The schematics say this should be 3.3V, but the FEX file says 208 + * it should be 3V. The latter makes sense, as the WiFi module's 209 + * I/O is indirectly powered from DCDC1, through SW. It is rated 210 + * at 2.98V maximum. 211 + */ 212 + regulator-always-on; 213 + regulator-min-microvolt = <3000000>; 214 + regulator-max-microvolt = <3000000>; 215 + regulator-name = "vcc-3v"; 216 + }; 217 + 218 + &reg_dcdc2 { 219 + regulator-always-on; 220 + regulator-min-microvolt = <700000>; 221 + regulator-max-microvolt = <1100000>; 222 + regulator-name = "vdd-cpua"; 223 + }; 224 + 225 + &reg_dcdc3 { 226 + regulator-always-on; 227 + regulator-min-microvolt = <700000>; 228 + regulator-max-microvolt = <1100000>; 229 + regulator-name = "vdd-cpub"; 230 + }; 231 + 232 + &reg_dcdc4 { 233 + regulator-min-microvolt = <700000>; 234 + regulator-max-microvolt = <1100000>; 235 + regulator-name = "vdd-gpu"; 236 + }; 237 + 238 + &reg_dcdc5 { 239 + regulator-always-on; 240 + regulator-min-microvolt = <1500000>; 241 + regulator-max-microvolt = <1500000>; 242 + regulator-name = "vcc-dram"; 243 + }; 244 + 245 + &reg_dcdc6 { 246 + regulator-always-on; 247 + regulator-min-microvolt = <900000>; 248 + regulator-max-microvolt = <900000>; 249 + regulator-name = "vdd-sys"; 250 + }; 251 + 252 + &reg_dldo2 { 253 + regulator-min-microvolt = <3300000>; 254 + regulator-max-microvolt = <3300000>; 255 + regulator-name = "dp-pwr"; 256 + }; 257 + 258 + &reg_dldo3 { 259 + regulator-always-on; 260 + regulator-min-microvolt = <2500000>; 261 + regulator-max-microvolt = <2500000>; 262 + regulator-name = "ephy-io"; 263 + }; 264 + 265 + &reg_dldo4 { 266 + /* 267 + * The PHY requires 20ms after all voltages are applied until core 268 + * logic is ready and 30ms after the reset pin is de-asserted. 269 + * Set a 100ms delay to account for PMIC ramp time and board traces. 270 + */ 271 + regulator-enable-ramp-delay = <100000>; 272 + regulator-min-microvolt = <3300000>; 273 + regulator-max-microvolt = <3300000>; 274 + regulator-name = "ephy"; 275 + }; 276 + 277 + &reg_drivevbus { 278 + regulator-name = "usb0-vbus"; 226 279 status = "okay"; 227 280 }; 228 281 229 - &reg_usb2_vbus { 230 - gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 231 - status = "okay"; 282 + &reg_eldo1 { 283 + regulator-min-microvolt = <1200000>; 284 + regulator-max-microvolt = <1200000>; 285 + regulator-name = "dp-bridge-1"; 232 286 }; 233 287 234 - &reg_vcc3v0 { 235 - status = "disabled"; 288 + &reg_eldo2 { 289 + regulator-min-microvolt = <1200000>; 290 + regulator-max-microvolt = <1200000>; 291 + regulator-name = "dp-bridge-2"; 236 292 }; 237 293 238 - &reg_vcc5v0 { 239 - status = "disabled"; 294 + &reg_fldo1 { 295 + /* TODO should be handled by USB PHY */ 296 + regulator-always-on; 297 + regulator-min-microvolt = <1080000>; 298 + regulator-max-microvolt = <1320000>; 299 + regulator-name = "vdd12-hsic"; 300 + }; 301 + 302 + &reg_fldo2 { 303 + /* 304 + * Despite the embedded CPUs core not being used in any way, 305 + * this must remain on or the system will hang. 306 + */ 307 + regulator-always-on; 308 + regulator-min-microvolt = <700000>; 309 + regulator-max-microvolt = <1100000>; 310 + regulator-name = "vdd-cpus"; 311 + }; 312 + 313 + &reg_rtc_ldo { 314 + regulator-name = "vcc-rtc"; 315 + }; 316 + 317 + &reg_sw { 318 + regulator-name = "vcc-wifi-io"; 240 319 }; 241 320 242 321 &spdif {
+162 -12
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
··· 43 43 44 44 /dts-v1/; 45 45 #include "sun8i-a83t.dtsi" 46 - #include "sunxi-common-regulators.dtsi" 46 + 47 + #include <dt-bindings/gpio/gpio.h> 47 48 48 49 / { 49 50 model = "TBS A711 Tablet"; ··· 106 105 }; 107 106 108 107 &mmc0 { 109 - vmmc-supply = <&reg_vcc3v3>; 108 + vmmc-supply = <&reg_dcdc1>; 110 109 pinctrl-names = "default"; 111 110 pinctrl-0 = <&mmc0_pins>; 112 111 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; ··· 116 115 &mmc1 { 117 116 mmc-pwrseq = <&wifi_pwrseq>; 118 117 bus-width = <4>; 119 - pinctrl-names = "default"; 120 - pinctrl-0 = <&mmc1_pins>; 121 - vmmc-supply = <&reg_vcc3v3>; 122 - vqmmc-supply = <&reg_vcc3v3>; 118 + vmmc-supply = <&reg_dldo1>; 119 + vqmmc-supply = <&reg_dldo1>; 123 120 non-removable; 124 121 wakeup-source; 125 122 status = "okay"; ··· 134 135 &mmc2 { 135 136 pinctrl-0 = <&mmc2_8bit_emmc_pins>; 136 137 pinctrl-names = "default"; 137 - vmmc-supply = <&reg_vcc3v3>; 138 - vqmmc-supply = <&reg_vcc3v3>; 138 + vmmc-supply = <&reg_dcdc1>; 139 + vqmmc-supply = <&reg_dcdc1>; 139 140 bus-width = <8>; 140 141 non-removable; 141 142 cap-mmc-hw-reset; ··· 145 146 &r_rsb { 146 147 status = "okay"; 147 148 148 - axp813: pmic@3a3 { 149 - compatible = "x-powers,axp813"; 149 + axp81x: pmic@3a3 { 150 150 reg = <0x3a3>; 151 151 interrupt-parent = <&r_intc>; 152 152 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 153 + swin-supply = <&reg_dcdc1>; 154 + x-powers,drive-vbus-en; 153 155 }; 154 156 155 157 ac100: codec@e89 { ··· 179 179 180 180 }; 181 181 182 + #include "axp81x.dtsi" 183 + 184 + &reg_aldo1 { 185 + regulator-min-microvolt = <1800000>; 186 + regulator-max-microvolt = <1800000>; 187 + regulator-name = "vcc-1.8"; 188 + }; 189 + 190 + &reg_aldo2 { 191 + regulator-min-microvolt = <1800000>; 192 + regulator-max-microvolt = <1800000>; 193 + regulator-always-on; 194 + regulator-name = "vdd-drampll"; 195 + }; 196 + 197 + &reg_aldo3 { 198 + regulator-min-microvolt = <3000000>; 199 + regulator-max-microvolt = <3000000>; 200 + regulator-always-on; 201 + regulator-name = "avcc"; 202 + }; 203 + 204 + &reg_dcdc1 { 205 + regulator-min-microvolt = <3100000>; 206 + regulator-max-microvolt = <3100000>; 207 + regulator-always-on; 208 + regulator-name = "vcc-io"; 209 + }; 210 + 211 + &reg_dcdc2 { 212 + regulator-min-microvolt = <700000>; 213 + regulator-max-microvolt = <1100000>; 214 + regulator-always-on; 215 + regulator-name = "vdd-cpu-A"; 216 + }; 217 + 218 + &reg_dcdc3 { 219 + regulator-min-microvolt = <700000>; 220 + regulator-max-microvolt = <1100000>; 221 + regulator-always-on; 222 + regulator-name = "vdd-cpu-B"; 223 + }; 224 + 225 + &reg_dcdc4 { 226 + regulator-min-microvolt = <700000>; 227 + regulator-max-microvolt = <1100000>; 228 + regulator-name = "vdd-gpu"; 229 + }; 230 + 231 + &reg_dcdc5 { 232 + regulator-min-microvolt = <1200000>; 233 + regulator-max-microvolt = <1500000>; 234 + regulator-always-on; 235 + regulator-name = "vcc-dram"; 236 + }; 237 + 238 + &reg_dcdc6 { 239 + regulator-min-microvolt = <900000>; 240 + regulator-max-microvolt = <900000>; 241 + regulator-always-on; 242 + regulator-name = "vdd-sys"; 243 + }; 244 + 245 + &reg_dldo1 { 246 + regulator-min-microvolt = <3100000>; 247 + regulator-max-microvolt = <3100000>; 248 + regulator-name = "vcc-wifi-io"; 249 + }; 250 + 251 + &reg_dldo2 { 252 + regulator-min-microvolt = <2800000>; 253 + regulator-max-microvolt = <4200000>; 254 + regulator-name = "vcc-mipi"; 255 + }; 256 + 257 + &reg_dldo3 { 258 + regulator-min-microvolt = <2800000>; 259 + regulator-max-microvolt = <2800000>; 260 + regulator-name = "vdd-csi"; 261 + }; 262 + 263 + &reg_dldo4 { 264 + regulator-min-microvolt = <2800000>; 265 + regulator-max-microvolt = <2800000>; 266 + regulator-name = "avdd-csi"; 267 + }; 268 + 269 + &reg_drivevbus { 270 + regulator-name = "usb0-vbus"; 271 + status = "okay"; 272 + }; 273 + 274 + &reg_eldo1 { 275 + regulator-min-microvolt = <1200000>; 276 + regulator-max-microvolt = <1800000>; 277 + regulator-name = "dvdd-csi-r"; 278 + }; 279 + 280 + &reg_eldo2 { 281 + regulator-min-microvolt = <1800000>; 282 + regulator-max-microvolt = <1800000>; 283 + regulator-name = "vcc-dsi"; 284 + }; 285 + 286 + &reg_eldo3 { 287 + regulator-min-microvolt = <1200000>; 288 + regulator-max-microvolt = <1800000>; 289 + regulator-name = "dvdd-csi-f"; 290 + }; 291 + 292 + &reg_fldo1 { 293 + regulator-min-microvolt = <1200000>; 294 + regulator-max-microvolt = <1200000>; 295 + regulator-name = "vcc-hsic"; 296 + }; 297 + 298 + &reg_fldo2 { 299 + regulator-min-microvolt = <700000>; 300 + regulator-max-microvolt = <1100000>; 301 + regulator-always-on; 302 + regulator-name = "vdd-cpus"; 303 + }; 304 + 305 + &reg_ldo_io0 { 306 + regulator-min-microvolt = <3100000>; 307 + regulator-max-microvolt = <3100000>; 308 + regulator-name = "vcc-ctp"; 309 + status = "okay"; 310 + }; 311 + 312 + &reg_ldo_io1 { 313 + regulator-min-microvolt = <3100000>; 314 + regulator-max-microvolt = <3100000>; 315 + regulator-name = "vcc-vb"; 316 + status = "okay"; 317 + }; 318 + 319 + &reg_sw { 320 + regulator-min-microvolt = <3100000>; 321 + regulator-max-microvolt = <3100000>; 322 + regulator-name = "vcc-lcd"; 323 + }; 324 + 182 325 &uart0 { 183 326 pinctrl-names = "default"; 184 327 pinctrl-0 = <&uart0_pb_pins>; ··· 335 192 status = "okay"; 336 193 }; 337 194 195 + &usb_otg { 196 + dr_mode = "otg"; 197 + status = "okay"; 198 + }; 199 + 338 200 &usbphy { 339 - usb1_vbus_supply = <&reg_vcc5v0>; 340 - usb2_vbus_supply = <&reg_vcc5v0>; 201 + usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ 202 + usb0_vbus-supply = <&reg_drivevbus>; 203 + usb1_vbus_supply = <&reg_vmain>; 204 + usb2_vbus_supply = <&reg_vmain>; 341 205 status = "okay"; 342 206 };
+2
arch/arm/boot/dts/sun8i-a83t.dtsi
··· 212 212 resets = <&ccu RST_BUS_MMC1>; 213 213 reset-names = "ahb"; 214 214 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 215 + pinctrl-names = "default"; 216 + pinctrl-0 = <&mmc1_pins>; 215 217 status = "disabled"; 216 218 #address-cells = <1>; 217 219 #size-cells = <0>;
+9
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
··· 56 56 57 57 aliases { 58 58 serial0 = &uart0; 59 + /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ 60 + ethernet0 = &emac; 59 61 ethernet1 = &xr819; 60 62 }; 61 63 ··· 101 99 }; 102 100 103 101 &ehci1 { 102 + status = "okay"; 103 + }; 104 + 105 + &emac { 106 + phy-handle = <&int_mii_phy>; 107 + phy-mode = "mii"; 108 + allwinner,leds-active-low; 104 109 status = "okay"; 105 110 }; 106 111
+19
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
··· 52 52 compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; 53 53 54 54 aliases { 55 + ethernet0 = &emac; 55 56 serial0 = &uart0; 56 57 serial1 = &uart1; 57 58 }; ··· 110 109 111 110 &ehci2 { 112 111 status = "okay"; 112 + }; 113 + 114 + &emac { 115 + pinctrl-names = "default"; 116 + pinctrl-0 = <&emac_rgmii_pins>; 117 + phy-supply = <&reg_gmac_3v3>; 118 + phy-handle = <&ext_rgmii_phy>; 119 + phy-mode = "rgmii"; 120 + 121 + allwinner,leds-active-low; 122 + status = "okay"; 123 + }; 124 + 125 + &external_mdio { 126 + ext_rgmii_phy: ethernet-phy@1 { 127 + compatible = "ethernet-phy-ieee802.3-c22"; 128 + reg = <0>; 129 + }; 113 130 }; 114 131 115 132 &ir {
+29
arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
··· 51 51 ethernet1 = &sdio_wifi; 52 52 }; 53 53 54 + reg_gmac_3v3: gmac-3v3 { 55 + compatible = "regulator-fixed"; 56 + regulator-name = "gmac-3v3"; 57 + regulator-min-microvolt = <3300000>; 58 + regulator-max-microvolt = <3300000>; 59 + startup-delay-us = <100000>; 60 + enable-active-high; 61 + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 62 + }; 63 + 54 64 wifi_pwrseq: wifi_pwrseq { 55 65 compatible = "mmc-pwrseq-simple"; 56 66 pinctrl-names = "default"; ··· 74 64 75 65 &ehci2 { 76 66 status = "okay"; 67 + }; 68 + 69 + &emac { 70 + pinctrl-names = "default"; 71 + pinctrl-0 = <&emac_rgmii_pins>; 72 + phy-supply = <&reg_gmac_3v3>; 73 + phy-handle = <&ext_rgmii_phy>; 74 + phy-mode = "rgmii"; 75 + 76 + allwinner,leds-active-low; 77 + 78 + status = "okay"; 79 + }; 80 + 81 + &external_mdio { 82 + ext_rgmii_phy: ethernet-phy@1 { 83 + compatible = "ethernet-phy-ieee802.3-c22"; 84 + reg = <7>; 85 + }; 77 86 }; 78 87 79 88 &ir {
+7
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
··· 46 46 model = "FriendlyARM NanoPi NEO"; 47 47 compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; 48 48 }; 49 + 50 + &emac { 51 + phy-handle = <&int_mii_phy>; 52 + phy-mode = "mii"; 53 + allwinner,leds-active-low; 54 + status = "okay"; 55 + };
+8
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
··· 54 54 aliases { 55 55 serial0 = &uart0; 56 56 /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ 57 + ethernet0 = &emac; 57 58 ethernet1 = &rtl8189; 58 59 }; 59 60 ··· 115 114 }; 116 115 117 116 &ehci1 { 117 + status = "okay"; 118 + }; 119 + 120 + &emac { 121 + phy-handle = <&int_mii_phy>; 122 + phy-mode = "mii"; 123 + allwinner,leds-active-low; 118 124 status = "okay"; 119 125 }; 120 126
+8
arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
··· 52 52 compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3"; 53 53 54 54 aliases { 55 + ethernet0 = &emac; 55 56 serial0 = &uart0; 56 57 }; 57 58 ··· 95 94 }; 96 95 97 96 &ehci1 { 97 + status = "okay"; 98 + }; 99 + 100 + &emac { 101 + phy-handle = <&int_mii_phy>; 102 + phy-mode = "mii"; 103 + allwinner,leds-active-low; 98 104 status = "okay"; 99 105 }; 100 106
+5
arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
··· 53 53 }; 54 54 }; 55 55 56 + &emac { 57 + /* LEDs changed to active high on the plus */ 58 + /delete-property/ allwinner,leds-active-low; 59 + }; 60 + 56 61 &mmc1 { 57 62 pinctrl-names = "default"; 58 63 pinctrl-0 = <&mmc1_pins_a>;
+8
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
··· 52 52 compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3"; 53 53 54 54 aliases { 55 + ethernet0 = &emac; 55 56 serial0 = &uart0; 56 57 }; 57 58 ··· 111 110 }; 112 111 113 112 &ehci3 { 113 + status = "okay"; 114 + }; 115 + 116 + &emac { 117 + phy-handle = <&int_mii_phy>; 118 + phy-mode = "mii"; 119 + allwinner,leds-active-low; 114 120 status = "okay"; 115 121 }; 116 122
+22
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
··· 47 47 model = "Xunlong Orange Pi Plus / Plus 2"; 48 48 compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3"; 49 49 50 + aliases { 51 + ethernet0 = &emac; 52 + }; 53 + 50 54 reg_gmac_3v3: gmac-3v3 { 51 55 compatible = "regulator-fixed"; 52 56 regulator-name = "gmac-3v3"; ··· 76 72 77 73 &ehci3 { 78 74 status = "okay"; 75 + }; 76 + 77 + &emac { 78 + pinctrl-names = "default"; 79 + pinctrl-0 = <&emac_rgmii_pins>; 80 + phy-supply = <&reg_gmac_3v3>; 81 + phy-handle = <&ext_rgmii_phy>; 82 + phy-mode = "rgmii"; 83 + 84 + allwinner,leds-active-low; 85 + status = "okay"; 86 + }; 87 + 88 + &external_mdio { 89 + ext_rgmii_phy: ethernet-phy@1 { 90 + compatible = "ethernet-phy-ieee802.3-c22"; 91 + reg = <0>; 92 + }; 79 93 }; 80 94 81 95 &mmc2 {
+16
arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
··· 61 61 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ 62 62 }; 63 63 }; 64 + 65 + &emac { 66 + pinctrl-names = "default"; 67 + pinctrl-0 = <&emac_rgmii_pins>; 68 + phy-supply = <&reg_gmac_3v3>; 69 + phy-handle = <&ext_rgmii_phy>; 70 + phy-mode = "rgmii"; 71 + status = "okay"; 72 + }; 73 + 74 + &external_mdio { 75 + ext_rgmii_phy: ethernet-phy@1 { 76 + compatible = "ethernet-phy-ieee802.3-c22"; 77 + reg = <1>; 78 + }; 79 + };
+49
arch/arm/boot/dts/sunxi-h3-h5.dtsi
··· 396 396 clocks = <&osc24M>; 397 397 }; 398 398 399 + emac: ethernet@1c30000 { 400 + compatible = "allwinner,sun8i-h3-emac"; 401 + syscon = <&syscon>; 402 + reg = <0x01c30000 0x10000>; 403 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 404 + interrupt-names = "macirq"; 405 + resets = <&ccu RST_BUS_EMAC>; 406 + reset-names = "stmmaceth"; 407 + clocks = <&ccu CLK_BUS_EMAC>; 408 + clock-names = "stmmaceth"; 409 + #address-cells = <1>; 410 + #size-cells = <0>; 411 + status = "disabled"; 412 + 413 + mdio: mdio { 414 + #address-cells = <1>; 415 + #size-cells = <0>; 416 + compatible = "snps,dwmac-mdio"; 417 + }; 418 + 419 + mdio-mux { 420 + compatible = "allwinner,sun8i-h3-mdio-mux"; 421 + #address-cells = <1>; 422 + #size-cells = <0>; 423 + 424 + mdio-parent-bus = <&mdio>; 425 + /* Only one MDIO is usable at the time */ 426 + internal_mdio: mdio@1 { 427 + compatible = "allwinner,sun8i-h3-mdio-internal"; 428 + reg = <1>; 429 + #address-cells = <1>; 430 + #size-cells = <0>; 431 + 432 + int_mii_phy: ethernet-phy@1 { 433 + compatible = "ethernet-phy-ieee802.3-c22"; 434 + reg = <1>; 435 + clocks = <&ccu CLK_BUS_EPHY>; 436 + resets = <&ccu RST_BUS_EPHY>; 437 + }; 438 + }; 439 + 440 + external_mdio: mdio@2 { 441 + reg = <2>; 442 + #address-cells = <1>; 443 + #size-cells = <0>; 444 + }; 445 + }; 446 + }; 447 + 399 448 spi0: spi@1c68000 { 400 449 compatible = "allwinner,sun8i-h3-spi"; 401 450 reg = <0x01c68000 0x1000>;
+17
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
··· 50 50 compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5"; 51 51 52 52 aliases { 53 + ethernet0 = &emac; 53 54 serial0 = &uart0; 54 55 }; 55 56 ··· 107 106 108 107 &ehci3 { 109 108 status = "okay"; 109 + }; 110 + 111 + &emac { 112 + pinctrl-names = "default"; 113 + pinctrl-0 = <&emac_rgmii_pins>; 114 + phy-supply = <&reg_gmac_3v3>; 115 + phy-handle = <&ext_rgmii_phy>; 116 + phy-mode = "rgmii"; 117 + status = "okay"; 118 + }; 119 + 120 + &external_mdio { 121 + ext_rgmii_phy: ethernet-phy@7 { 122 + compatible = "ethernet-phy-ieee802.3-c22"; 123 + reg = <7>; 124 + }; 110 125 }; 111 126 112 127 &mmc0 {
+17
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
··· 59 59 }; 60 60 61 61 aliases { 62 + ethernet0 = &emac; 62 63 serial0 = &uart0; 63 64 }; 64 65 ··· 135 134 136 135 &ehci3 { 137 136 status = "okay"; 137 + }; 138 + 139 + &emac { 140 + pinctrl-names = "default"; 141 + pinctrl-0 = <&emac_rgmii_pins>; 142 + phy-supply = <&reg_gmac_3v3>; 143 + phy-handle = <&ext_rgmii_phy>; 144 + phy-mode = "rgmii"; 145 + status = "okay"; 146 + }; 147 + 148 + &external_mdio { 149 + ext_rgmii_phy: ethernet-phy@1 { 150 + compatible = "ethernet-phy-ieee802.3-c22"; 151 + reg = <1>; 152 + }; 138 153 }; 139 154 140 155 &ir {
+17
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
··· 54 54 compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5"; 55 55 56 56 aliases { 57 + ethernet0 = &emac; 57 58 serial0 = &uart0; 58 59 }; 59 60 ··· 142 141 143 142 &ehci3 { 144 143 status = "okay"; 144 + }; 145 + 146 + &emac { 147 + pinctrl-names = "default"; 148 + pinctrl-0 = <&emac_rgmii_pins>; 149 + phy-supply = <&reg_gmac_3v3>; 150 + phy-handle = <&ext_rgmii_phy>; 151 + phy-mode = "rgmii"; 152 + status = "okay"; 153 + }; 154 + 155 + &external_mdio { 156 + ext_rgmii_phy: ethernet-phy@1 { 157 + compatible = "ethernet-phy-ieee802.3-c22"; 158 + reg = <1>; 159 + }; 145 160 }; 146 161 147 162 &ir {