b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | |
| 3 | #include "ar9331.dtsi" |
| 4 | |
| 5 | #include <dt-bindings/gpio/gpio.h> |
| 6 | #include <dt-bindings/input/input.h> |
| 7 | |
| 8 | / { |
| 9 | model = "Arduino Yun"; |
| 10 | compatible = "arduino,yun", "qca,ar9331"; |
| 11 | |
| 12 | chosen { |
| 13 | bootargs = "console=ttyATH0,250000"; |
| 14 | }; |
| 15 | |
| 16 | ahb { |
| 17 | apb { |
| 18 | pinmux_extended: pinmux@18040030 { |
| 19 | compatible = "pinctrl-single"; |
| 20 | reg = <0x18040030 0x4>; |
| 21 | |
| 22 | pinctrl-single,bit-per-mux; |
| 23 | pinctrl-single,register-width = <32>; |
| 24 | pinctrl-single,function-mask = <0x1>; |
| 25 | #pinctrl-cells = <2>; |
| 26 | |
| 27 | enable_gpio11: pinmux_enable_gpio11 { |
| 28 | pinctrl-single,bits = <0x0 0x200 0x200>; |
| 29 | }; |
| 30 | }; |
| 31 | |
| 32 | pinmux_bootstrap: pinmux@180600ac { |
| 33 | compatible = "pinctrl-single"; |
| 34 | reg = <0x180600ac 0x4>; |
| 35 | |
| 36 | pinctrl-single,bit-per-mux; |
| 37 | pinctrl-single,register-width = <32>; |
| 38 | pinctrl-single,function-mask = <0x1>; |
| 39 | #pinctrl-cells = <2>; |
| 40 | |
| 41 | enable_gpio26_gpio27: pinmux_enable_gpio26_gpio27 { |
| 42 | pinctrl-single,bits = <0x0 0x40000 0x40000>; |
| 43 | }; |
| 44 | }; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | leds { |
| 49 | compatible = "gpio-leds"; |
| 50 | |
| 51 | wlan { |
| 52 | label = "blue:wlan"; |
| 53 | gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; |
| 54 | linux,default-trigger = "phy0tpt"; |
| 55 | }; |
| 56 | |
| 57 | usb { |
| 58 | label = "white:usb"; |
| 59 | gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; |
| 60 | trigger-sources = <&hub_port1>; |
| 61 | linux,default-trigger = "usbport"; |
| 62 | }; |
| 63 | }; |
| 64 | |
| 65 | keys { |
| 66 | compatible = "gpio-keys"; |
| 67 | |
| 68 | config { |
| 69 | label = "config"; |
| 70 | linux,code = <BTN_0>; |
| 71 | gpios = <&gpio 20 GPIO_ACTIVE_LOW>; |
| 72 | }; |
| 73 | }; |
| 74 | |
| 75 | gpio-export { |
| 76 | compatible = "gpio-export"; |
| 77 | |
| 78 | gpio_spi_enable { |
| 79 | gpio-export,name = "yun:oe:spi"; |
| 80 | gpio-export,output = <0>; |
| 81 | gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; |
| 82 | }; |
| 83 | |
| 84 | gpio_handshake_enable { |
| 85 | gpio-export,name = "yun:oe:hs"; |
| 86 | gpio-export,output = <0>; |
| 87 | gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; |
| 88 | }; |
| 89 | |
| 90 | gpio_uart_enable { |
| 91 | gpio-export,name = "yun:oe:uart"; |
| 92 | gpio-export,output = <0>; |
| 93 | gpios = <&gpio 23 GPIO_ACTIVE_LOW>; |
| 94 | }; |
| 95 | }; |
| 96 | |
| 97 | reg_usb_vbus: reg_usb_vbus { |
| 98 | compatible = "regulator-fixed"; |
| 99 | regulator-name = "usb_vbus"; |
| 100 | regulator-min-microvolt = <5000000>; |
| 101 | regulator-max-microvolt = <5000000>; |
| 102 | enable-active-high; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | &pinmux { |
| 107 | pinctrl-names = "default"; |
| 108 | pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins>; |
| 109 | }; |
| 110 | |
| 111 | &switch_led_disable_pins { |
| 112 | pinctrl-single,bits = <0x0 0x80 0xf8>; |
| 113 | }; |
| 114 | |
| 115 | &pinmux_extended { |
| 116 | pinctrl-names = "default"; |
| 117 | pinctrl-0 = <&enable_gpio11>; |
| 118 | }; |
| 119 | |
| 120 | &pinmux_bootstrap { |
| 121 | pinctrl-names = "default"; |
| 122 | pinctrl-0 = <&enable_gpio26_gpio27>; |
| 123 | }; |
| 124 | |
| 125 | &usb { |
| 126 | status = "okay"; |
| 127 | |
| 128 | #address-cells = <1>; |
| 129 | #size-cells = <0>; |
| 130 | dr_mode = "host"; |
| 131 | vbus-supply = <®_usb_vbus>; |
| 132 | |
| 133 | port@1 { |
| 134 | #address-cells = <1>; |
| 135 | #size-cells = <0>; |
| 136 | reg = <1>; |
| 137 | #trigger-source-cells = <0>; |
| 138 | |
| 139 | hub_port1: port@1 { |
| 140 | reg = <1>; |
| 141 | #trigger-source-cells = <0>; |
| 142 | }; |
| 143 | }; |
| 144 | }; |
| 145 | |
| 146 | &usb_phy { |
| 147 | status = "okay"; |
| 148 | }; |
| 149 | |
| 150 | &spi { |
| 151 | status = "okay"; |
| 152 | |
| 153 | flash@0 { |
| 154 | compatible = "jedec,spi-nor"; |
| 155 | reg = <0>; |
| 156 | spi-max-frequency = <50000000>; |
| 157 | |
| 158 | partitions { |
| 159 | compatible = "fixed-partitions"; |
| 160 | #address-cells = <1>; |
| 161 | #size-cells = <1>; |
| 162 | |
| 163 | partition@0 { |
| 164 | label = "u-boot"; |
| 165 | reg = <0x0 0x40000>; |
| 166 | read-only; |
| 167 | }; |
| 168 | |
| 169 | partition@40000 { |
| 170 | label = "u-boot-env"; |
| 171 | reg = <0x40000 0x10000>; |
| 172 | }; |
| 173 | |
| 174 | partition@50000 { |
| 175 | compatible = "denx,uimage"; |
| 176 | label = "firmware"; |
| 177 | reg = <0x50000 0xf90000>; |
| 178 | }; |
| 179 | |
| 180 | partition@fe0000 { |
| 181 | label = "nvram"; |
| 182 | reg = <0xfe0000 0x10000>; |
| 183 | }; |
| 184 | |
| 185 | art: partition@ff0000 { |
| 186 | label = "art"; |
| 187 | reg = <0xff0000 0x10000>; |
| 188 | read-only; |
| 189 | }; |
| 190 | }; |
| 191 | }; |
| 192 | }; |
| 193 | |
| 194 | ð0 { |
| 195 | status = "okay"; |
| 196 | }; |
| 197 | |
| 198 | ð1 { |
| 199 | status = "okay"; |
| 200 | |
| 201 | compatible = "syscon", "simple-mfd"; |
| 202 | }; |
| 203 | |
| 204 | &wmac { |
| 205 | status = "okay"; |
| 206 | |
| 207 | mtd-cal-data = <&art 0x1000>; |
| 208 | }; |