1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (C) 2023 Arm Ltd. 3 * Copyright (C) 2023 Arm Ltd. 4 */ 4 */ 5 5 6 /dts-v1/; 6 /dts-v1/; 7 7 8 #include "sun50i-h616.dtsi" 8 #include "sun50i-h616.dtsi" 9 #include "sun50i-h616-cpu-opp.dtsi" 9 #include "sun50i-h616-cpu-opp.dtsi" 10 10 11 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/interrupt-controller/arm 12 #include <dt-bindings/interrupt-controller/arm-gic.h> 13 #include <dt-bindings/leds/common.h> 13 #include <dt-bindings/leds/common.h> 14 14 15 / { 15 / { 16 model = "OrangePi Zero 2W"; 16 model = "OrangePi Zero 2W"; 17 compatible = "xunlong,orangepi-zero2w" 17 compatible = "xunlong,orangepi-zero2w", "allwinner,sun50i-h618"; 18 18 19 aliases { 19 aliases { 20 serial0 = &uart0; 20 serial0 = &uart0; 21 }; 21 }; 22 22 23 chosen { 23 chosen { 24 stdout-path = "serial0:115200n 24 stdout-path = "serial0:115200n8"; 25 }; 25 }; 26 26 27 leds { 27 leds { 28 compatible = "gpio-leds"; 28 compatible = "gpio-leds"; 29 29 30 led-0 { 30 led-0 { 31 function = LED_FUNCTIO 31 function = LED_FUNCTION_STATUS; 32 color = <LED_COLOR_ID_ 32 color = <LED_COLOR_ID_GREEN>; 33 gpios = <&pio 2 13 GPI 33 gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */ 34 }; 34 }; 35 }; 35 }; 36 36 37 reg_vcc5v: vcc5v { 37 reg_vcc5v: vcc5v { 38 /* board wide 5V supply direct 38 /* board wide 5V supply directly from the USB-C socket */ 39 compatible = "regulator-fixed" 39 compatible = "regulator-fixed"; 40 regulator-name = "vcc-5v"; 40 regulator-name = "vcc-5v"; 41 regulator-min-microvolt = <500 41 regulator-min-microvolt = <5000000>; 42 regulator-max-microvolt = <500 42 regulator-max-microvolt = <5000000>; 43 regulator-always-on; 43 regulator-always-on; 44 }; 44 }; 45 45 46 reg_vcc3v3: vcc3v3 { 46 reg_vcc3v3: vcc3v3 { 47 /* SY8089 DC/DC converter */ 47 /* SY8089 DC/DC converter */ 48 compatible = "regulator-fixed" 48 compatible = "regulator-fixed"; 49 regulator-name = "vcc-3v3"; 49 regulator-name = "vcc-3v3"; 50 regulator-min-microvolt = <330 50 regulator-min-microvolt = <3300000>; 51 regulator-max-microvolt = <330 51 regulator-max-microvolt = <3300000>; 52 vin-supply = <®_vcc5v>; 52 vin-supply = <®_vcc5v>; 53 regulator-always-on; 53 regulator-always-on; 54 }; 54 }; 55 }; 55 }; 56 56 57 &cpu0 { 57 &cpu0 { 58 cpu-supply = <®_dcdc2>; 58 cpu-supply = <®_dcdc2>; 59 }; 59 }; 60 60 61 &ehci1 { 61 &ehci1 { 62 status = "okay"; 62 status = "okay"; 63 }; 63 }; 64 64 65 /* USB 2 & 3 are on the FPC connector (or the 65 /* USB 2 & 3 are on the FPC connector (or the exansion board) */ 66 66 67 &mmc0 { 67 &mmc0 { 68 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 68 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 69 bus-width = <4>; 69 bus-width = <4>; 70 vmmc-supply = <®_vcc3v3>; 70 vmmc-supply = <®_vcc3v3>; 71 status = "okay"; 71 status = "okay"; 72 }; 72 }; 73 73 74 &ohci1 { 74 &ohci1 { 75 status = "okay"; 75 status = "okay"; 76 }; 76 }; 77 77 78 &pio { 78 &pio { 79 vcc-pc-supply = <®_dldo1>; 79 vcc-pc-supply = <®_dldo1>; 80 vcc-pf-supply = <®_dldo1>; /* int 80 vcc-pf-supply = <®_dldo1>; /* internally via VCC-IO */ 81 vcc-pg-supply = <®_aldo1>; 81 vcc-pg-supply = <®_aldo1>; 82 vcc-ph-supply = <®_dldo1>; /* int 82 vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */ 83 vcc-pi-supply = <®_dldo1>; 83 vcc-pi-supply = <®_dldo1>; 84 }; 84 }; 85 85 86 &r_i2c { 86 &r_i2c { 87 status = "okay"; 87 status = "okay"; 88 88 89 axp313: pmic@36 { 89 axp313: pmic@36 { 90 compatible = "x-powers,axp313a 90 compatible = "x-powers,axp313a"; 91 reg = <0x36>; 91 reg = <0x36>; 92 #interrupt-cells = <1>; 92 #interrupt-cells = <1>; 93 interrupt-controller; 93 interrupt-controller; 94 interrupt-parent = <&pio>; 94 interrupt-parent = <&pio>; 95 interrupts = <2 9 IRQ_TYPE_LEV 95 interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */ 96 96 97 vin1-supply = <®_vcc5v>; 97 vin1-supply = <®_vcc5v>; 98 vin2-supply = <®_vcc5v>; 98 vin2-supply = <®_vcc5v>; 99 vin3-supply = <®_vcc5v>; 99 vin3-supply = <®_vcc5v>; 100 100 101 regulators { 101 regulators { 102 /* Supplies VCC-PLL an 102 /* Supplies VCC-PLL and DRAM */ 103 reg_aldo1: aldo1 { 103 reg_aldo1: aldo1 { 104 regulator-alwa 104 regulator-always-on; 105 regulator-min- 105 regulator-min-microvolt = <1800000>; 106 regulator-max- 106 regulator-max-microvolt = <1800000>; 107 regulator-name 107 regulator-name = "vcc1v8"; 108 }; 108 }; 109 109 110 /* Supplies VCC-IO, so 110 /* Supplies VCC-IO, so needs to be always on. */ 111 reg_dldo1: dldo1 { 111 reg_dldo1: dldo1 { 112 regulator-alwa 112 regulator-always-on; 113 regulator-min- 113 regulator-min-microvolt = <3300000>; 114 regulator-max- 114 regulator-max-microvolt = <3300000>; 115 regulator-name 115 regulator-name = "vcc3v3"; 116 }; 116 }; 117 117 118 reg_dcdc1: dcdc1 { 118 reg_dcdc1: dcdc1 { 119 regulator-alwa 119 regulator-always-on; 120 regulator-min- 120 regulator-min-microvolt = <810000>; 121 regulator-max- 121 regulator-max-microvolt = <990000>; 122 regulator-name 122 regulator-name = "vdd-gpu-sys"; 123 }; 123 }; 124 124 125 reg_dcdc2: dcdc2 { 125 reg_dcdc2: dcdc2 { 126 regulator-alwa 126 regulator-always-on; 127 regulator-min- 127 regulator-min-microvolt = <810000>; 128 regulator-max- 128 regulator-max-microvolt = <1100000>; 129 regulator-name 129 regulator-name = "vdd-cpu"; 130 }; 130 }; 131 131 132 reg_dcdc3: dcdc3 { 132 reg_dcdc3: dcdc3 { 133 regulator-alwa 133 regulator-always-on; 134 regulator-min- 134 regulator-min-microvolt = <1100000>; 135 regulator-max- 135 regulator-max-microvolt = <1100000>; 136 regulator-name 136 regulator-name = "vdd-dram"; 137 }; 137 }; 138 }; 138 }; 139 }; 139 }; 140 }; 140 }; 141 141 142 &spi0 { 142 &spi0 { 143 status = "okay"; 143 status = "okay"; 144 pinctrl-names = "default"; 144 pinctrl-names = "default"; 145 pinctrl-0 = <&spi0_pins>, <&spi0_cs0_p 145 pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>; 146 146 147 flash@0 { 147 flash@0 { 148 #address-cells = <1>; 148 #address-cells = <1>; 149 #size-cells = <1>; 149 #size-cells = <1>; 150 compatible = "jedec,spi-nor"; 150 compatible = "jedec,spi-nor"; 151 reg = <0>; 151 reg = <0>; 152 spi-max-frequency = <40000000> 152 spi-max-frequency = <40000000>; 153 }; 153 }; 154 }; 154 }; 155 155 156 &uart0 { 156 &uart0 { 157 pinctrl-names = "default"; 157 pinctrl-names = "default"; 158 pinctrl-0 = <&uart0_ph_pins>; 158 pinctrl-0 = <&uart0_ph_pins>; 159 status = "okay"; 159 status = "okay"; 160 }; 160 }; 161 161 162 &usbotg { 162 &usbotg { 163 /* 163 /* 164 * PHY0 pins are connected to a USB-C 164 * PHY0 pins are connected to a USB-C socket, but a role switch 165 * is not implemented: both CC pins ar 165 * is not implemented: both CC pins are pulled to GND. 166 * The VBUS pins power the device, so 166 * The VBUS pins power the device, so a fixed peripheral mode 167 * is the best choice. 167 * is the best choice. 168 * The board can be powered via GPIOs, 168 * The board can be powered via GPIOs, in this case port0 *can* 169 * act as a host (with a cable/adapter 169 * act as a host (with a cable/adapter ignoring CC), as VBUS is 170 * then provided by the GPIOs. Any use 170 * then provided by the GPIOs. Any user of this setup would 171 * need to adjust the DT accordingly: 171 * need to adjust the DT accordingly: dr_mode set to "host", 172 * enabling OHCI0 and EHCI0. 172 * enabling OHCI0 and EHCI0. 173 */ 173 */ 174 dr_mode = "peripheral"; 174 dr_mode = "peripheral"; 175 status = "okay"; 175 status = "okay"; 176 }; 176 }; 177 177 178 &usbphy { 178 &usbphy { 179 usb1_vbus-supply = <®_vcc5v>; 179 usb1_vbus-supply = <®_vcc5v>; 180 status = "okay"; 180 status = "okay"; 181 }; 181 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.