treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm / boot / dts / sun8i-h3-nanopi-duo2.dts
blobc73f59900975b38fd4c2569bbb2a0f988a0a66b5
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (C) 2019 Karl Palsson <karlp@tweak.net.au>
4  */
6 /dts-v1/;
7 #include "sun8i-h3.dtsi"
8 #include "sunxi-common-regulators.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
13 / {
14         model = "FriendlyARM NanoPi Duo2";
15         compatible = "friendlyarm,nanopi-duo2", "allwinner,sun8i-h3";
17         aliases {
18                 serial0 = &uart0;
19         };
21         chosen {
22                 stdout-path = "serial0:115200n8";
23         };
25         leds {
26                 compatible = "gpio-leds";
28                 pwr {
29                         label = "nanopi:red:pwr";
30                         gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
31                         default-state = "on";
32                 };
34                 status {
35                         label = "nanopi:green:status";
36                         gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
37                 };
38         };
40         r_gpio_keys {
41                 compatible = "gpio-keys";
43                 k1 {
44                         label = "k1";
45                         linux,code = <BTN_0>;
46                         gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */
47                 };
48         };
50         reg_vdd_cpux: vdd-cpux-regulator {
51                 compatible = "regulator-gpio";
52                 regulator-name = "vdd-cpux";
53                 regulator-min-microvolt = <1100000>;
54                 regulator-max-microvolt = <1300000>;
55                 regulator-always-on;
56                 regulator-boot-on;
57                 regulator-ramp-delay = <50>; /* 4ms */
59                 enable-active-high;
60                 enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
61                 gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
62                 gpios-states = <0x1>;
63                 states = <1100000 0x0
64                           1300000 0x1>;
65         };
67         reg_vcc_dram: vcc-dram {
68                 compatible = "regulator-fixed";
69                 regulator-name = "vcc-dram";
70                 regulator-min-microvolt = <1500000>;
71                 regulator-max-microvolt = <1500000>;
72                 regulator-always-on;
73                 regulator-boot-on;
74                 enable-active-high;
75                 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
76                 vin-supply = <&reg_vcc5v0>;
77         };
79         reg_vdd_sys: vdd-sys {
80                 compatible = "regulator-fixed";
81                 regulator-name = "vdd-sys";
82                 regulator-min-microvolt = <1200000>;
83                 regulator-max-microvolt = <1200000>;
84                 regulator-always-on;
85                 regulator-boot-on;
86                 enable-active-high;
87                 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
88                 vin-supply = <&reg_vcc5v0>;
89         };
91         wifi_pwrseq: wifi_pwrseq {
92                 compatible = "mmc-pwrseq-simple";
93                 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
94                 clocks = <&rtc 1>;
95                 clock-names = "ext_clock";
96         };
100 &cpu0 {
101         cpu-supply = <&reg_vdd_cpux>;
104 &ehci0 {
105         status = "okay";
108 &mmc0 {
109         bus-width = <4>;
110         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
111         status = "okay";
112         vmmc-supply = <&reg_vcc3v3>;
115 &mmc1 {
116         vmmc-supply = <&reg_vcc3v3>;
117         vqmmc-supply = <&reg_vcc3v3>;
118         mmc-pwrseq = <&wifi_pwrseq>;
119         bus-width = <4>;
120         non-removable;
121         status = "okay";
123         sdio_wifi: sdio_wifi@1 {
124                 reg = <1>;
125                 compatible = "brcm,bcm4329-fmac";
126                 interrupt-parent = <&pio>;
127                 interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
128                 interrupt-names = "host-wake";
129         };
132 &ohci0 {
133         status = "okay";
136 &reg_usb0_vbus {
137         gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
138         status = "okay";
141 &uart0 {
142         pinctrl-names = "default";
143         pinctrl-0 = <&uart0_pa_pins>;
144         status = "okay";
147 &uart2 {
148         pinctrl-names = "default";
149         pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>;
150         uart-has-rtscts;
151         status = "okay";
153         bluetooth {
154                 compatible = "brcm,bcm43438-bt";
155                 clocks = <&rtc 1>;
156                 clock-names = "lpo";
157                 vbat-supply = <&reg_vcc3v3>;
158                 vddio-supply = <&reg_vcc3v3>;
159                 device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
160                 host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
161                 shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
162         };
165 &usb_otg {
166         status = "okay";
167         dr_mode = "otg";
170 &usbphy {
171         usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
172         usb0_vbus-supply = <&reg_usb0_vbus>;
173         status = "okay";