1 /* 1 /* 2 * Copyright 2016 Icenowy Zheng <icenowy@aosc.x 2 * Copyright 2016 Icenowy Zheng <icenowy@aosc.xyz> 3 * 3 * 4 * Based on sun5i-a13-olinuxino.dts, which is 4 * Based on sun5i-a13-olinuxino.dts, which is 5 * Copyright 2012 Maxime Ripard <maxime.ripar 5 * Copyright 2012 Maxime Ripard <maxime.ripard@free-electrons.com> 6 * Copyright 2013 Hans de Goede <hdegoede@red 6 * Copyright 2013 Hans de Goede <hdegoede@redhat.com> 7 * 7 * 8 * This file is dual-licensed: you can use it 8 * This file is dual-licensed: you can use it either under the terms 9 * of the GPL or the X11 license, at your opti 9 * of the GPL or the X11 license, at your option. Note that this dual 10 * licensing only applies to this file, and no 10 * licensing only applies to this file, and not this project as a 11 * whole. 11 * whole. 12 * 12 * 13 * a) This file is free software; you can red 13 * a) This file is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU Ge 14 * modify it under the terms of the GNU General Public License as 15 * published by the Free Software Foundati 15 * published by the Free Software Foundation; either version 2 of the 16 * License, or (at your option) any later 16 * License, or (at your option) any later version. 17 * 17 * 18 * This file is distributed in the hope th 18 * This file is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTIC 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more det 21 * GNU General Public License for more details. 22 * 22 * 23 * Or, alternatively, 23 * Or, alternatively, 24 * 24 * 25 * b) Permission is hereby granted, free of c 25 * b) Permission is hereby granted, free of charge, to any person 26 * obtaining a copy of this software and a 26 * obtaining a copy of this software and associated documentation 27 * files (the "Software"), to deal in the 27 * files (the "Software"), to deal in the Software without 28 * restriction, including without limitati 28 * restriction, including without limitation the rights to use, 29 * copy, modify, merge, publish, distribut 29 * copy, modify, merge, publish, distribute, sublicense, and/or 30 * sell copies of the Software, and to per 30 * sell copies of the Software, and to permit persons to whom the 31 * Software is furnished to do so, subject 31 * Software is furnished to do so, subject to the following 32 * conditions: 32 * conditions: 33 * 33 * 34 * The above copyright notice and this per 34 * The above copyright notice and this permission notice shall be 35 * included in all copies or substantial p 35 * included in all copies or substantial portions of the Software. 36 * 36 * 37 * THE SOFTWARE IS PROVIDED "AS IS", WITHO 37 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT L 38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 39 * OF MERCHANTABILITY, FITNESS FOR A PARTI 39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 40 * NONINFRINGEMENT. IN NO EVENT SHALL THE 40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGE 41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 42 * WHETHER IN AN ACTION OF CONTRACT, TORT 42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 43 * FROM, OUT OF OR IN CONNECTION WITH THE 43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 44 * OTHER DEALINGS IN THE SOFTWARE. 44 * OTHER DEALINGS IN THE SOFTWARE. 45 */ 45 */ 46 46 47 /dts-v1/; 47 /dts-v1/; 48 #include "sun5i-a13.dtsi" 48 #include "sun5i-a13.dtsi" 49 #include "sunxi-common-regulators.dtsi" 49 #include "sunxi-common-regulators.dtsi" 50 50 51 #include <dt-bindings/gpio/gpio.h> 51 #include <dt-bindings/gpio/gpio.h> 52 #include <dt-bindings/input/input.h> 52 #include <dt-bindings/input/input.h> 53 53 54 / { 54 / { 55 model = "Lichee Pi One"; 55 model = "Lichee Pi One"; 56 compatible = "licheepi,licheepi-one", 56 compatible = "licheepi,licheepi-one", "allwinner,sun5i-a13"; 57 57 58 aliases { 58 aliases { 59 serial0 = &uart1; 59 serial0 = &uart1; 60 }; 60 }; 61 61 62 chosen { 62 chosen { 63 stdout-path = "serial0:115200n 63 stdout-path = "serial0:115200n8"; 64 }; 64 }; 65 65 66 leds { 66 leds { 67 compatible = "gpio-leds"; 67 compatible = "gpio-leds"; 68 68 69 led-0 { 69 led-0 { 70 label = "licheepi:red: 70 label = "licheepi:red:usr"; 71 gpios = <&pio 2 5 GPIO 71 gpios = <&pio 2 5 GPIO_ACTIVE_LOW>; 72 }; 72 }; 73 73 74 led-1 { 74 led-1 { 75 label = "licheepi:gree 75 label = "licheepi:green:usr"; 76 gpios = <&pio 2 19 GPI 76 gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; 77 default-state = "on"; 77 default-state = "on"; 78 }; 78 }; 79 79 80 led-2 { 80 led-2 { 81 label = "licheepi:blue 81 label = "licheepi:blue:usr"; 82 gpios = <&pio 2 4 GPIO 82 gpios = <&pio 2 4 GPIO_ACTIVE_LOW>; 83 }; 83 }; 84 84 85 }; 85 }; 86 }; 86 }; 87 87 88 &cpu0 { 88 &cpu0 { 89 cpu-supply = <®_dcdc2>; 89 cpu-supply = <®_dcdc2>; 90 }; 90 }; 91 91 92 &ehci0 { 92 &ehci0 { 93 status = "okay"; 93 status = "okay"; 94 }; 94 }; 95 95 96 &i2c0 { 96 &i2c0 { 97 status = "okay"; 97 status = "okay"; 98 98 99 axp209: pmic@34 { 99 axp209: pmic@34 { 100 compatible = "x-powers,axp209" 100 compatible = "x-powers,axp209"; 101 reg = <0x34>; 101 reg = <0x34>; 102 interrupts = <0>; 102 interrupts = <0>; 103 103 104 interrupt-controller; 104 interrupt-controller; 105 #interrupt-cells = <1>; 105 #interrupt-cells = <1>; 106 }; 106 }; 107 }; 107 }; 108 108 109 &i2c1 { 109 &i2c1 { 110 status = "disabled"; 110 status = "disabled"; 111 }; 111 }; 112 112 113 &i2c2 { 113 &i2c2 { 114 status = "disabled"; 114 status = "disabled"; 115 }; 115 }; 116 116 117 &lradc { 117 &lradc { 118 vref-supply = <®_ldo2>; 118 vref-supply = <®_ldo2>; 119 status = "okay"; 119 status = "okay"; 120 120 121 button-984 { 121 button-984 { 122 label = "Home"; 122 label = "Home"; 123 linux,code = <KEY_HOMEPAGE>; 123 linux,code = <KEY_HOMEPAGE>; 124 channel = <0>; 124 channel = <0>; 125 voltage = <984126>; 125 voltage = <984126>; 126 }; 126 }; 127 }; 127 }; 128 128 129 &mmc0 { 129 &mmc0 { 130 vmmc-supply = <®_vcc3v3>; 130 vmmc-supply = <®_vcc3v3>; 131 bus-width = <4>; 131 bus-width = <4>; 132 broken-cd; 132 broken-cd; 133 status = "okay"; 133 status = "okay"; 134 }; 134 }; 135 135 136 &mmc2 { 136 &mmc2 { 137 pinctrl-names = "default"; 137 pinctrl-names = "default"; 138 pinctrl-0 = <&mmc2_4bit_pc_pins>; 138 pinctrl-0 = <&mmc2_4bit_pc_pins>; 139 vmmc-supply = <®_vcc3v3>; 139 vmmc-supply = <®_vcc3v3>; 140 bus-width = <4>; 140 bus-width = <4>; 141 broken-cd; 141 broken-cd; 142 status = "okay"; 142 status = "okay"; 143 }; 143 }; 144 144 145 &ohci0 { 145 &ohci0 { 146 status = "okay"; 146 status = "okay"; 147 }; 147 }; 148 148 149 &otg_sram { 149 &otg_sram { 150 status = "okay"; 150 status = "okay"; 151 }; 151 }; 152 152 153 #include "axp209.dtsi" 153 #include "axp209.dtsi" 154 154 155 ®_dcdc2 { 155 ®_dcdc2 { 156 regulator-always-on; 156 regulator-always-on; 157 regulator-min-microvolt = <1000000>; 157 regulator-min-microvolt = <1000000>; 158 regulator-max-microvolt = <1500000>; 158 regulator-max-microvolt = <1500000>; 159 regulator-name = "vdd-cpu"; 159 regulator-name = "vdd-cpu"; 160 }; 160 }; 161 161 162 ®_dcdc3 { 162 ®_dcdc3 { 163 regulator-always-on; 163 regulator-always-on; 164 regulator-min-microvolt = <1000000>; 164 regulator-min-microvolt = <1000000>; 165 regulator-max-microvolt = <1400000>; 165 regulator-max-microvolt = <1400000>; 166 regulator-name = "vdd-int-dll"; 166 regulator-name = "vdd-int-dll"; 167 }; 167 }; 168 168 169 ®_ldo1 { 169 ®_ldo1 { 170 regulator-name = "vdd-rtc"; 170 regulator-name = "vdd-rtc"; 171 }; 171 }; 172 172 173 ®_ldo2 { 173 ®_ldo2 { 174 regulator-always-on; 174 regulator-always-on; 175 regulator-min-microvolt = <3000000>; 175 regulator-min-microvolt = <3000000>; 176 regulator-max-microvolt = <3000000>; 176 regulator-max-microvolt = <3000000>; 177 regulator-name = "avcc"; 177 regulator-name = "avcc"; 178 }; 178 }; 179 179 180 ®_ldo3 { 180 ®_ldo3 { 181 regulator-min-microvolt = <1800000>; 181 regulator-min-microvolt = <1800000>; 182 regulator-max-microvolt = <1800000>; 182 regulator-max-microvolt = <1800000>; 183 regulator-name = "csi-1.8v"; 183 regulator-name = "csi-1.8v"; 184 }; 184 }; 185 185 186 ®_ldo4 { 186 ®_ldo4 { 187 regulator-min-microvolt = <2800000>; 187 regulator-min-microvolt = <2800000>; 188 regulator-max-microvolt = <2800000>; 188 regulator-max-microvolt = <2800000>; 189 regulator-name = "csi-2.8v"; 189 regulator-name = "csi-2.8v"; 190 }; 190 }; 191 191 192 ®_usb0_vbus { 192 ®_usb0_vbus { 193 gpio = <&pio 2 12 GPIO_ACTIVE_HIGH>; / 193 gpio = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ 194 status = "okay"; 194 status = "okay"; 195 }; 195 }; 196 196 197 &uart1 { 197 &uart1 { 198 pinctrl-names = "default"; 198 pinctrl-names = "default"; 199 pinctrl-0 = <&uart1_pg_pins>; 199 pinctrl-0 = <&uart1_pg_pins>; 200 status = "okay"; 200 status = "okay"; 201 }; 201 }; 202 202 203 &usb_otg { 203 &usb_otg { 204 dr_mode = "otg"; 204 dr_mode = "otg"; 205 status = "okay"; 205 status = "okay"; 206 }; 206 }; 207 207 208 &usbphy { 208 &usbphy { 209 usb0_id_det-gpios = <&pio 6 2 GPIO_ACT 209 usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 210 usb0_vbus_det-gpios = <&pio 6 1 GPIO_A 210 usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 211 usb0_vbus-supply = <®_usb0_vbus>; 211 usb0_vbus-supply = <®_usb0_vbus>; 212 usb1_vbus-supply = <®_vcc5v0>; 212 usb1_vbus-supply = <®_vcc5v0>; 213 status = "okay"; 213 status = "okay"; 214 }; 214 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.