Chris Packham | 4a54e54 | 2018-05-17 21:45:59 +1200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | #include "kirkwood.dtsi" |
| 3 | #include "kirkwood-6281.dtsi" |
| 4 | |
| 5 | / { |
| 6 | chosen { |
| 7 | bootargs = "console=ttyS0,115200n8 earlyprintk"; |
| 8 | stdout-path = &uart0; |
| 9 | }; |
| 10 | |
Michael Walle | 134a6b6 | 2018-05-29 23:13:20 +0200 | [diff] [blame] | 11 | aliases { |
| 12 | spi0 = &spi0; |
| 13 | }; |
| 14 | |
Chris Packham | 4a54e54 | 2018-05-17 21:45:59 +1200 | [diff] [blame] | 15 | ocp@f1000000 { |
| 16 | pinctrl: pin-controller@10000 { |
| 17 | pmx_power_hdd: pmx-power-hdd { |
| 18 | marvell,pins = "mpp10"; |
| 19 | marvell,function = "gpo"; |
| 20 | }; |
| 21 | pmx_usb_vbus: pmx-usb-vbus { |
| 22 | marvell,pins = "mpp11"; |
| 23 | marvell,function = "gpio"; |
| 24 | }; |
| 25 | pmx_fan_high: pmx-fan-high { |
| 26 | marvell,pins = "mpp18"; |
| 27 | marvell,function = "gpo"; |
| 28 | }; |
| 29 | pmx_fan_low: pmx-fan-low { |
| 30 | marvell,pins = "mpp19"; |
| 31 | marvell,function = "gpo"; |
| 32 | }; |
| 33 | pmx_led_function_blue: pmx-led-function-blue { |
| 34 | marvell,pins = "mpp36"; |
| 35 | marvell,function = "gpio"; |
| 36 | }; |
| 37 | pmx_led_alarm: pmx-led-alarm { |
| 38 | marvell,pins = "mpp37"; |
| 39 | marvell,function = "gpio"; |
| 40 | }; |
| 41 | pmx_led_info: pmx-led-info { |
| 42 | marvell,pins = "mpp38"; |
| 43 | marvell,function = "gpio"; |
| 44 | }; |
| 45 | pmx_led_power: pmx-led-power { |
| 46 | marvell,pins = "mpp39"; |
| 47 | marvell,function = "gpio"; |
| 48 | }; |
| 49 | pmx_fan_lock: pmx-fan-lock { |
| 50 | marvell,pins = "mpp40"; |
| 51 | marvell,function = "gpio"; |
| 52 | }; |
| 53 | pmx_button_function: pmx-button-function { |
| 54 | marvell,pins = "mpp41"; |
| 55 | marvell,function = "gpio"; |
| 56 | }; |
| 57 | pmx_power_switch: pmx-power-switch { |
| 58 | marvell,pins = "mpp42"; |
| 59 | marvell,function = "gpio"; |
| 60 | }; |
| 61 | pmx_power_auto_switch: pmx-power-auto-switch { |
| 62 | marvell,pins = "mpp43"; |
| 63 | marvell,function = "gpio"; |
| 64 | }; |
| 65 | pmx_led_function_red: pmx-led-function_red { |
| 66 | marvell,pins = "mpp48"; |
| 67 | marvell,function = "gpio"; |
| 68 | }; |
| 69 | |
| 70 | }; |
| 71 | sata@80000 { |
| 72 | status = "okay"; |
| 73 | nr-ports = <1>; |
| 74 | }; |
| 75 | |
| 76 | spi@10600 { |
| 77 | status = "okay"; |
| 78 | |
| 79 | m25p40@0 { |
| 80 | #address-cells = <1>; |
| 81 | #size-cells = <1>; |
Neil Armstrong | ffd4c7c | 2019-02-10 10:16:20 +0000 | [diff] [blame] | 82 | compatible = "m25p40", "jedec,spi-nor"; |
Chris Packham | 4a54e54 | 2018-05-17 21:45:59 +1200 | [diff] [blame] | 83 | reg = <0>; |
| 84 | spi-max-frequency = <25000000>; |
| 85 | mode = <0>; |
| 86 | |
| 87 | partition@0 { |
| 88 | reg = <0x0 0x60000>; |
| 89 | label = "uboot"; |
| 90 | read-only; |
| 91 | }; |
| 92 | |
| 93 | partition@60000 { |
| 94 | reg = <0x60000 0x10000>; |
| 95 | label = "dtb"; |
| 96 | read-only; |
| 97 | }; |
| 98 | |
| 99 | partition@70000 { |
| 100 | reg = <0x70000 0x10000>; |
| 101 | label = "uboot_env"; |
| 102 | }; |
| 103 | }; |
| 104 | }; |
| 105 | }; |
| 106 | |
| 107 | gpio_keys { |
| 108 | compatible = "gpio-keys"; |
| 109 | #address-cells = <1>; |
| 110 | #size-cells = <0>; |
| 111 | pinctrl-0 = <&pmx_button_function &pmx_power_switch |
| 112 | &pmx_power_auto_switch>; |
| 113 | pinctrl-names = "default"; |
| 114 | |
| 115 | option { |
| 116 | label = "Function Button"; |
| 117 | linux,code = <KEY_OPTION>; |
| 118 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
| 119 | }; |
| 120 | reserved { |
| 121 | label = "Power-on Switch"; |
| 122 | linux,code = <KEY_RESERVED>; |
| 123 | linux,input-type = <5>; |
| 124 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; |
| 125 | }; |
| 126 | power { |
| 127 | label = "Power-auto Switch"; |
| 128 | linux,code = <KEY_ESC>; |
| 129 | linux,input-type = <5>; |
| 130 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | gpio_leds { |
| 135 | compatible = "gpio-leds"; |
| 136 | pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm |
| 137 | &pmx_led_info &pmx_led_power |
| 138 | &pmx_led_function_blue>; |
| 139 | pinctrl-names = "default"; |
| 140 | |
| 141 | func_blue { |
| 142 | label = "lsxl:blue:func"; |
| 143 | gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
| 144 | }; |
| 145 | |
| 146 | alarm { |
| 147 | label = "lsxl:red:alarm"; |
| 148 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
| 149 | }; |
| 150 | |
| 151 | info { |
| 152 | label = "lsxl:amber:info"; |
| 153 | gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; |
| 154 | }; |
| 155 | |
| 156 | power { |
| 157 | label = "lsxl:blue:power"; |
| 158 | gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; |
| 159 | default-state = "keep"; |
| 160 | }; |
| 161 | |
| 162 | func_red { |
| 163 | label = "lsxl:red:func"; |
| 164 | gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; |
| 165 | }; |
| 166 | }; |
| 167 | |
| 168 | gpio_fan { |
| 169 | compatible = "gpio-fan"; |
| 170 | pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>; |
| 171 | pinctrl-names = "default"; |
| 172 | gpios = <&gpio0 19 GPIO_ACTIVE_LOW |
| 173 | &gpio0 18 GPIO_ACTIVE_LOW>; |
| 174 | gpio-fan,speed-map = <0 3 |
| 175 | 1500 2 |
| 176 | 3250 1 |
| 177 | 5000 0>; |
| 178 | alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; |
| 179 | }; |
| 180 | |
| 181 | restart_poweroff { |
| 182 | compatible = "restart-poweroff"; |
| 183 | }; |
| 184 | |
| 185 | regulators { |
| 186 | compatible = "simple-bus"; |
| 187 | #address-cells = <1>; |
| 188 | #size-cells = <0>; |
| 189 | pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>; |
| 190 | pinctrl-names = "default"; |
| 191 | |
| 192 | usb_power: regulator@1 { |
| 193 | compatible = "regulator-fixed"; |
| 194 | reg = <1>; |
| 195 | regulator-name = "USB Power"; |
| 196 | regulator-min-microvolt = <5000000>; |
| 197 | regulator-max-microvolt = <5000000>; |
| 198 | enable-active-high; |
| 199 | regulator-always-on; |
| 200 | regulator-boot-on; |
| 201 | gpio = <&gpio0 11 0>; |
| 202 | }; |
| 203 | hdd_power: regulator@2 { |
| 204 | compatible = "regulator-fixed"; |
| 205 | reg = <2>; |
| 206 | regulator-name = "HDD Power"; |
| 207 | regulator-min-microvolt = <5000000>; |
| 208 | regulator-max-microvolt = <5000000>; |
| 209 | enable-active-high; |
| 210 | regulator-always-on; |
| 211 | regulator-boot-on; |
| 212 | gpio = <&gpio0 10 0>; |
| 213 | }; |
| 214 | }; |
| 215 | }; |
| 216 | |
| 217 | &mdio { |
| 218 | status = "okay"; |
| 219 | |
| 220 | ethphy0: ethernet-phy@0 { |
| 221 | reg = <0>; |
| 222 | }; |
| 223 | |
| 224 | ethphy1: ethernet-phy@8 { |
| 225 | reg = <8>; |
| 226 | }; |
| 227 | }; |
| 228 | |
| 229 | ð0 { |
| 230 | status = "okay"; |
| 231 | ethernet0-port@0 { |
| 232 | phy-handle = <ðphy0>; |
| 233 | }; |
| 234 | }; |
| 235 | |
| 236 | ð1 { |
| 237 | status = "okay"; |
| 238 | ethernet1-port@0 { |
| 239 | phy-handle = <ðphy1>; |
| 240 | }; |
| 241 | }; |