Merge branch 'master' of http://git.denx.de/u-boot-sunxi
commit
c6b968da78
@ -0,0 +1,53 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2015 Chen-Yu Tsai |
||||||
|
* |
||||||
|
* Chen-Yu Tsai <wens@csie.org> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/* |
||||||
|
* AXP809 Integrated Power Management Chip |
||||||
|
*/ |
||||||
|
|
||||||
|
&axp809 { |
||||||
|
compatible = "x-powers,axp809"; |
||||||
|
interrupt-controller; |
||||||
|
#interrupt-cells = <1>; |
||||||
|
}; |
@ -0,0 +1,51 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2016 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/dts-v1/; |
||||||
|
#include "sun5i-a13.dtsi" |
||||||
|
#include "sun5i-reference-design-tablet.dtsi" |
||||||
|
#include <dt-bindings/interrupt-controller/irq.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
model = "Empire Electronix M712 tablet"; |
||||||
|
compatible = "empire-electronix,m712", "allwinner,sun5i-a13"; |
||||||
|
}; |
@ -0,0 +1,210 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2015 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
#include "sunxi-reference-design-tablet.dtsi" |
||||||
|
|
||||||
|
#include <dt-bindings/pwm/pwm.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
aliases { |
||||||
|
serial0 = &uart1; |
||||||
|
}; |
||||||
|
|
||||||
|
backlight: backlight { |
||||||
|
compatible = "pwm-backlight"; |
||||||
|
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; |
||||||
|
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; |
||||||
|
default-brightness-level = <8>; |
||||||
|
/* TODO: backlight uses axp gpio1 as enable pin */ |
||||||
|
}; |
||||||
|
|
||||||
|
chosen { |
||||||
|
stdout-path = "serial0:115200n8"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&codec { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&codec_pa_pin>; |
||||||
|
allwinner,pa-gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */ |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&cpu0 { |
||||||
|
cpu-supply = <®_dcdc2>; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci0 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&i2c0 { |
||||||
|
axp209: pmic@34 { |
||||||
|
reg = <0x34>; |
||||||
|
interrupts = <0>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&i2c1 { |
||||||
|
pcf8563: rtc@51 { |
||||||
|
compatible = "nxp,pcf8563"; |
||||||
|
reg = <0x51>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
#include "axp209.dtsi" |
||||||
|
|
||||||
|
&lradc { |
||||||
|
vref-supply = <®_ldo2>; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; |
||||||
|
vmmc-supply = <®_vcc3v0>; |
||||||
|
bus-width = <4>; |
||||||
|
cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ |
||||||
|
cd-inverted; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&otg_sram { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&pio { |
||||||
|
codec_pa_pin: codec_pa_pin@0 { |
||||||
|
allwinner,pins = "PG10"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
mmc0_cd_pin: mmc0_cd_pin@0 { |
||||||
|
allwinner,pins = "PG0"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
|
||||||
|
usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { |
||||||
|
allwinner,pins = "PG1"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; |
||||||
|
}; |
||||||
|
|
||||||
|
usb0_id_detect_pin: usb0_id_detect_pin@0 { |
||||||
|
allwinner,pins = "PG2"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
|
||||||
|
usb0_vbus_pin_a: usb0_vbus_pin@0 { |
||||||
|
allwinner,pins = "PG12"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc2 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <1000000>; |
||||||
|
regulator-max-microvolt = <1500000>; |
||||||
|
regulator-name = "vdd-cpu"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc3 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <1000000>; |
||||||
|
regulator-max-microvolt = <1400000>; |
||||||
|
regulator-name = "vdd-int-pll"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_ldo1 { |
||||||
|
regulator-name = "vdd-rtc"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_ldo2 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <3000000>; |
||||||
|
regulator-max-microvolt = <3000000>; |
||||||
|
regulator-name = "avcc"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_ldo3 { |
||||||
|
regulator-min-microvolt = <3300000>; |
||||||
|
regulator-max-microvolt = <3300000>; |
||||||
|
regulator-name = "vcc-wifi"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_usb0_vbus { |
||||||
|
gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&uart1 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&uart1_pins_b>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usb_otg { |
||||||
|
dr_mode = "otg"; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usb_power_supply { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usbphy { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; |
||||||
|
usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ |
||||||
|
usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ |
||||||
|
usb0_vbus_power-supply = <&usb_power_supply>; |
||||||
|
usb0_vbus-supply = <®_usb0_vbus>; |
||||||
|
usb1_vbus-supply = <®_ldo3>; |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,100 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2016 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/dts-v1/; |
||||||
|
#include "sun6i-a31s.dtsi" |
||||||
|
#include "sun6i-reference-design-tablet.dtsi" |
||||||
|
|
||||||
|
/ { |
||||||
|
model = "iNet Q972 tablet"; |
||||||
|
compatible = "inet-tek,inet-q972", "allwinner,sun6i-a31s"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci1 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&i2c1 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&i2c1_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
ft5406ee8: touchscreen@38 { |
||||||
|
compatible = "edt,edt-ft5406"; |
||||||
|
reg = <0x38>; |
||||||
|
interrupt-parent = <&pio>; |
||||||
|
interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */ |
||||||
|
touchscreen-size-x = <768>; |
||||||
|
touchscreen-size-y = <1024>; |
||||||
|
touchscreen-swapped-x-y; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&lradc { |
||||||
|
vref-supply = <®_aldo3>; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
button@200 { |
||||||
|
label = "Volume Down"; |
||||||
|
linux,code = <KEY_VOLUMEDOWN>; |
||||||
|
channel = <0>; |
||||||
|
voltage = <200000>; |
||||||
|
}; |
||||||
|
|
||||||
|
button@900 { |
||||||
|
label = "Volume Up"; |
||||||
|
linux,code = <KEY_VOLUMEUP>; |
||||||
|
channel = <0>; |
||||||
|
voltage = <900000>; |
||||||
|
}; |
||||||
|
|
||||||
|
button@1200 { |
||||||
|
label = "Back"; |
||||||
|
linux,code = <KEY_BACK>; |
||||||
|
channel = <0>; |
||||||
|
voltage = <1200000>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&ohci1 { |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,193 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2016 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "sunxi-common-regulators.dtsi" |
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h> |
||||||
|
#include <dt-bindings/input/input.h> |
||||||
|
#include <dt-bindings/pinctrl/sun4i-a10.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
aliases { |
||||||
|
serial0 = &uart0; |
||||||
|
}; |
||||||
|
|
||||||
|
chosen { |
||||||
|
stdout-path = "serial0:115200n8"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&cpu0 { |
||||||
|
cpu-supply = <®_dcdc3>; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci0 { |
||||||
|
/* Wifi is connected here */ |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>; |
||||||
|
vmmc-supply = <®_dcdc1>; |
||||||
|
bus-width = <4>; |
||||||
|
cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ |
||||||
|
cd-inverted; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&pio { |
||||||
|
mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 { |
||||||
|
allwinner,pins = "PA8"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
|
||||||
|
usb0_id_detect_pin: usb0_id_detect_pin@0 { |
||||||
|
allwinner,pins = "PA15"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&p2wi { |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
axp22x: pmic@68 { |
||||||
|
compatible = "x-powers,axp221"; |
||||||
|
reg = <0x68>; |
||||||
|
interrupt-parent = <&nmi_intc>; |
||||||
|
interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
||||||
|
drivevbus-supply = <®_vcc5v0>; |
||||||
|
x-powers,drive-vbus-en; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
#include "axp22x.dtsi" |
||||||
|
|
||||||
|
®_aldo3 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <2700000>; |
||||||
|
regulator-max-microvolt = <3300000>; |
||||||
|
regulator-name = "avcc"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dc1sw { |
||||||
|
regulator-name = "vcc-lcd"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dc5ldo { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <700000>; |
||||||
|
regulator-max-microvolt = <1320000>; |
||||||
|
regulator-name = "vdd-cpus"; /* This is an educated guess */ |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc1 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <3000000>; |
||||||
|
regulator-max-microvolt = <3000000>; |
||||||
|
regulator-name = "vcc-3v0"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc2 { |
||||||
|
regulator-min-microvolt = <700000>; |
||||||
|
regulator-max-microvolt = <1320000>; |
||||||
|
regulator-name = "vdd-gpu"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc3 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <700000>; |
||||||
|
regulator-max-microvolt = <1320000>; |
||||||
|
regulator-name = "vdd-cpu"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc4 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <700000>; |
||||||
|
regulator-max-microvolt = <1320000>; |
||||||
|
regulator-name = "vdd-sys-dll"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc5 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <1500000>; |
||||||
|
regulator-max-microvolt = <1500000>; |
||||||
|
regulator-name = "vcc-dram"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dldo1 { |
||||||
|
regulator-min-microvolt = <3300000>; |
||||||
|
regulator-max-microvolt = <3300000>; |
||||||
|
regulator-name = "vcc-wifi"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_drivevbus { |
||||||
|
regulator-name = "usb0-vbus"; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&simplefb_lcd { |
||||||
|
vcc-lcd-supply = <®_dc1sw>; |
||||||
|
}; |
||||||
|
|
||||||
|
&usb_otg { |
||||||
|
dr_mode = "otg"; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usb_power_supply { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usbphy { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&usb0_id_detect_pin>; |
||||||
|
usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */ |
||||||
|
usb0_vbus_power-supply = <&usb_power_supply>; |
||||||
|
usb0_vbus-supply = <®_drivevbus>; |
||||||
|
usb1_vbus-supply = <®_dldo1>; |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,229 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2016 Luo Yi <luoyi.ly@gmail.com> |
||||||
|
* |
||||||
|
* Thanks to the original work by Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/dts-v1/; |
||||||
|
#include "sun7i-a20.dtsi" |
||||||
|
#include "sunxi-common-regulators.dtsi" |
||||||
|
#include <dt-bindings/gpio/gpio.h> |
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
model = "Banana Pi BPI-M1-Plus"; |
||||||
|
compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20"; |
||||||
|
|
||||||
|
aliases { |
||||||
|
serial0 = &uart0; |
||||||
|
}; |
||||||
|
|
||||||
|
chosen { |
||||||
|
stdout-path = "serial0:115200n8"; |
||||||
|
}; |
||||||
|
|
||||||
|
leds { |
||||||
|
compatible = "gpio-leds"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&led_pins_bpi_m1p>; |
||||||
|
|
||||||
|
green { |
||||||
|
label = "bananapi-m1-plus:green:usr"; |
||||||
|
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; |
||||||
|
}; |
||||||
|
|
||||||
|
pwr { |
||||||
|
label = "bananapi-m1-plus:pwr:usr"; |
||||||
|
gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; |
||||||
|
default-state = "on"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
mmc3_pwrseq: mmc3_pwrseq { |
||||||
|
compatible = "mmc-pwrseq-simple"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc3_pwrseq_pin_bpi_m1p>; |
||||||
|
reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */ |
||||||
|
}; |
||||||
|
|
||||||
|
reg_gmac_3v3: gmac-3v3 { |
||||||
|
compatible = "regulator-fixed"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&gmac_power_pin_bpi_m1p>; |
||||||
|
regulator-name = "gmac-3v3"; |
||||||
|
regulator-min-microvolt = <3300000>; |
||||||
|
regulator-max-microvolt = <3300000>; |
||||||
|
startup-delay-us = <100000>; |
||||||
|
enable-active-high; |
||||||
|
gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&ahci { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&codec { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci0 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci1 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&gmac { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&gmac_pins_rgmii_a>; |
||||||
|
phy = <&phy1>; |
||||||
|
phy-mode = "rgmii"; |
||||||
|
phy-supply = <®_gmac_3v3>; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
phy1: ethernet-phy@1 { |
||||||
|
reg = <1>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&i2c0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&i2c0_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
axp209: pmic@34 { |
||||||
|
compatible = "x-powers,axp209"; |
||||||
|
reg = <0x34>; |
||||||
|
interrupt-parent = <&nmi_intc>; |
||||||
|
interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
||||||
|
|
||||||
|
interrupt-controller; |
||||||
|
#interrupt-cells = <1>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&ir0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&ir0_rx_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bpi_m1p>; |
||||||
|
vmmc-supply = <®_vcc3v3>; |
||||||
|
bus-width = <4>; |
||||||
|
cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ |
||||||
|
cd-inverted; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc3 { |
||||||
|
#address-cells = <1>; |
||||||
|
#size-cells = <0>; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc3_pins_a>; |
||||||
|
vmmc-supply = <®_vcc3v3>; |
||||||
|
mmc-pwrseq = <&mmc3_pwrseq>; |
||||||
|
bus-width = <4>; |
||||||
|
non-removable; |
||||||
|
enable-sdio-wakeup; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
brcmf: bcrmf@1 { |
||||||
|
reg = <1>; |
||||||
|
compatible = "brcm,bcm4329-fmac"; |
||||||
|
interrupt-parent = <&pio>; |
||||||
|
interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; |
||||||
|
interrupt-names = "host-wake"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc3_pins_a { |
||||||
|
/* AP6210 requires pull-up */ |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
|
||||||
|
&ohci0 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ohci1 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&pio { |
||||||
|
gmac_power_pin_bpi_m1p: gmac_power_pin@0 { |
||||||
|
allwinner,pins = "PH23"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
led_pins_bpi_m1p: led_pins@0 { |
||||||
|
allwinner,pins = "PH24", "PH25"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
mmc0_cd_pin_bpi_m1p: mmc0_cd_pin@0 { |
||||||
|
allwinner,pins = "PH10"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
|
||||||
|
mmc3_pwrseq_pin_bpi_m1p: mmc3_pwrseq_pin@0 { |
||||||
|
allwinner,pins = "PH22"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&uart0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&uart0_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,82 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2015 - Ultimaker B.V. |
||||||
|
* Author Olliver Schinagl <oliver@schinagl.nl> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "sun7i-a20-olinuxino-lime2.dts" |
||||||
|
|
||||||
|
/ { |
||||||
|
model = "Olimex A20-OLinuXino-LIME2-eMMC"; |
||||||
|
compatible = "olimex,a20-olinuxino-lime2-emmc", "allwinner,sun7i-a20"; |
||||||
|
|
||||||
|
mmc2_pwrseq: pwrseq { |
||||||
|
pinctrl-0 = <&mmc2_pins_nrst>; |
||||||
|
pinctrl-names = "default"; |
||||||
|
compatible = "mmc-pwrseq-emmc"; |
||||||
|
reset-gpios = <&pio 2 16 GPIO_ACTIVE_LOW>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&pio { |
||||||
|
mmc2_pins_nrst: mmc2@0 { |
||||||
|
allwinner,pins = "PC16"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc2 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc2_pins_a>; |
||||||
|
vmmc-supply = <®_vcc3v3>; |
||||||
|
vqmmc-supply = <®_vcc3v3>; |
||||||
|
bus-width = <4>; |
||||||
|
non-removable; |
||||||
|
mmc-pwrseq = <&mmc2_pwrseq>; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
emmc: emmc@0 { |
||||||
|
reg = <0>; |
||||||
|
compatible = "mmc-card"; |
||||||
|
broken-hpi; |
||||||
|
}; |
||||||
|
}; |
@ -0,0 +1,195 @@ |
|||||||
|
/* |
||||||
|
* Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/dts-v1/; |
||||||
|
#include "sun8i-h3.dtsi" |
||||||
|
#include "sunxi-common-regulators.dtsi" |
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h> |
||||||
|
#include <dt-bindings/input/input.h> |
||||||
|
#include <dt-bindings/pinctrl/sun4i-a10.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
model = "Banana Pi BPI-M2-Plus"; |
||||||
|
compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; |
||||||
|
|
||||||
|
aliases { |
||||||
|
serial0 = &uart0; |
||||||
|
serial1 = &uart1; |
||||||
|
}; |
||||||
|
|
||||||
|
chosen { |
||||||
|
stdout-path = "serial0:115200n8"; |
||||||
|
}; |
||||||
|
|
||||||
|
leds { |
||||||
|
compatible = "gpio-leds"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&pwr_led_bpi_m2p>; |
||||||
|
|
||||||
|
pwr_led { |
||||||
|
label = "bananapi-m2-plus:red:pwr"; |
||||||
|
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ |
||||||
|
default-state = "on"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
gpio_keys { |
||||||
|
compatible = "gpio-keys"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&sw_r_bpi_m2p>; |
||||||
|
|
||||||
|
sw4 { |
||||||
|
label = "power"; |
||||||
|
linux,code = <BTN_0>; |
||||||
|
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
wifi_pwrseq: wifi_pwrseq { |
||||||
|
compatible = "mmc-pwrseq-simple"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&wifi_en_bpi_m2p>; |
||||||
|
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci1 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ehci2 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ir { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&ir_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; |
||||||
|
vmmc-supply = <®_vcc3v3>; |
||||||
|
bus-width = <4>; |
||||||
|
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ |
||||||
|
cd-inverted; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc1 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc1_pins_a>; |
||||||
|
vmmc-supply = <®_vcc3v3>; |
||||||
|
vqmmc-supply = <®_vcc3v3>; |
||||||
|
mmc-pwrseq = <&wifi_pwrseq>; |
||||||
|
bus-width = <4>; |
||||||
|
non-removable; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
brcmf: bcrmf@1 { |
||||||
|
reg = <1>; |
||||||
|
compatible = "brcm,bcm4329-fmac"; |
||||||
|
interrupt-parent = <&pio>; |
||||||
|
interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ |
||||||
|
interrupt-names = "host-wake"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc2 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc2_8bit_pins>; |
||||||
|
vmmc-supply = <®_vcc3v3>; |
||||||
|
vqmmc-supply = <®_vcc3v3>; |
||||||
|
bus-width = <8>; |
||||||
|
non-removable; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ohci1 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&ohci2 { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&r_pio { |
||||||
|
pwr_led_bpi_m2p: led_pins@0 { |
||||||
|
allwinner,pins = "PL10"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
sw_r_bpi_m2p: key_pins@0 { |
||||||
|
allwinner,pins = "PL3"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
wifi_en_bpi_m2p: wifi_en_pin { |
||||||
|
allwinner,pins = "PL7"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&uart0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&uart0_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&uart1 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&uart1_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usbphy { |
||||||
|
/* USB VBUS is on as long as VCC-IO is on */ |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,244 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2015 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
#include "sunxi-reference-design-tablet.dtsi" |
||||||
|
|
||||||
|
#include <dt-bindings/pwm/pwm.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
aliases { |
||||||
|
serial0 = &r_uart; |
||||||
|
}; |
||||||
|
|
||||||
|
backlight: backlight { |
||||||
|
compatible = "pwm-backlight"; |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&bl_en_pin>; |
||||||
|
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; |
||||||
|
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; |
||||||
|
default-brightness-level = <8>; |
||||||
|
enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ |
||||||
|
}; |
||||||
|
|
||||||
|
chosen { |
||||||
|
stdout-path = "serial0:115200n8"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&i2c0 { |
||||||
|
/* |
||||||
|
* The gsl1680 is rated at 400KHz and it will not work reliable at |
||||||
|
* 100KHz, this has been confirmed on multiple different q8 tablets. |
||||||
|
* The gsl1680 is the only device on this bus. |
||||||
|
*/ |
||||||
|
clock-frequency = <400000>; |
||||||
|
|
||||||
|
gsl1680: touchscreen@40 { |
||||||
|
compatible = "silead,gsl1680"; |
||||||
|
reg = <0x40>; |
||||||
|
interrupt-parent = <&pio>; |
||||||
|
interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */ |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&ts_power_pin>; |
||||||
|
power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ |
||||||
|
/* Most tablets use this touchscreen, but not all */ |
||||||
|
status = "disabled"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&mmc0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; |
||||||
|
vmmc-supply = <®_dcdc1>; |
||||||
|
bus-width = <4>; |
||||||
|
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ |
||||||
|
cd-inverted; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&pio { |
||||||
|
bl_en_pin: bl_en_pin@0 { |
||||||
|
allwinner,pins = "PH6"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
mmc0_cd_pin: mmc0_cd_pin@0 { |
||||||
|
allwinner,pins = "PB4"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
|
||||||
|
ts_power_pin: ts_power_pin@0 { |
||||||
|
allwinner,pins = "PH1"; |
||||||
|
allwinner,function = "gpio_out"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
||||||
|
}; |
||||||
|
|
||||||
|
usb0_id_detect_pin: usb0_id_detect_pin@0 { |
||||||
|
allwinner,pins = "PH8"; |
||||||
|
allwinner,function = "gpio_in"; |
||||||
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
||||||
|
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&r_rsb { |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
axp22x: pmic@3a3 { |
||||||
|
compatible = "x-powers,axp223"; |
||||||
|
reg = <0x3a3>; |
||||||
|
interrupt-parent = <&nmi_intc>; |
||||||
|
interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
||||||
|
eldoin-supply = <®_dcdc1>; |
||||||
|
drivevbus-supply = <®_vcc5v0>; |
||||||
|
x-powers,drive-vbus-en; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
#include "axp22x.dtsi" |
||||||
|
|
||||||
|
®_aldo1 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <3000000>; |
||||||
|
regulator-max-microvolt = <3000000>; |
||||||
|
regulator-name = "vcc-io"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_aldo2 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <2350000>; |
||||||
|
regulator-max-microvolt = <2650000>; |
||||||
|
regulator-name = "vdd-dll"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_aldo3 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <2700000>; |
||||||
|
regulator-max-microvolt = <3300000>; |
||||||
|
regulator-name = "vcc-pll-avcc"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dc1sw { |
||||||
|
regulator-name = "vcc-lcd"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dc5ldo { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <900000>; |
||||||
|
regulator-max-microvolt = <1400000>; |
||||||
|
regulator-name = "vdd-cpus"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc1 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <3000000>; |
||||||
|
regulator-max-microvolt = <3000000>; |
||||||
|
regulator-name = "vcc-3v0"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc2 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <900000>; |
||||||
|
regulator-max-microvolt = <1400000>; |
||||||
|
regulator-name = "vdd-sys"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc3 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <900000>; |
||||||
|
regulator-max-microvolt = <1400000>; |
||||||
|
regulator-name = "vdd-cpu"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dcdc5 { |
||||||
|
regulator-always-on; |
||||||
|
regulator-min-microvolt = <1500000>; |
||||||
|
regulator-max-microvolt = <1500000>; |
||||||
|
regulator-name = "vcc-dram"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_dldo1 { |
||||||
|
regulator-min-microvolt = <3300000>; |
||||||
|
regulator-max-microvolt = <3300000>; |
||||||
|
regulator-name = "vcc-wifi"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_drivevbus { |
||||||
|
regulator-name = "usb0-vbus"; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
®_rtc_ldo { |
||||||
|
regulator-name = "vcc-rtc"; |
||||||
|
}; |
||||||
|
|
||||||
|
&r_uart { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&r_uart_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&simplefb_lcd { |
||||||
|
vcc-lcd-supply = <®_dc1sw>; |
||||||
|
}; |
||||||
|
|
||||||
|
&usb_otg { |
||||||
|
dr_mode = "otg"; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usb_power_supply { |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&usbphy { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&usb0_id_detect_pin>; |
||||||
|
usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ |
||||||
|
usb0_vbus_power-supply = <&usb_power_supply>; |
||||||
|
usb0_vbus-supply = <®_drivevbus>; |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,83 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2015 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h> |
||||||
|
#include <dt-bindings/input/input.h> |
||||||
|
#include <dt-bindings/pinctrl/sun4i-a10.h> |
||||||
|
#include "sunxi-common-regulators.dtsi" |
||||||
|
|
||||||
|
&i2c0 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&i2c0_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&i2c1 { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&i2c1_pins_a>; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&lradc { |
||||||
|
vref-supply = <®_vcc3v0>; |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
button@200 { |
||||||
|
label = "Volume Up"; |
||||||
|
linux,code = <KEY_VOLUMEUP>; |
||||||
|
channel = <0>; |
||||||
|
voltage = <200000>; |
||||||
|
}; |
||||||
|
|
||||||
|
button@400 { |
||||||
|
label = "Volume Down"; |
||||||
|
linux,code = <KEY_VOLUMEDOWN>; |
||||||
|
channel = <0>; |
||||||
|
voltage = <400000>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&pwm { |
||||||
|
pinctrl-names = "default"; |
||||||
|
pinctrl-0 = <&pwm0_pins>; |
||||||
|
status = "okay"; |
||||||
|
}; |
@ -0,0 +1,34 @@ |
|||||||
|
/*
|
||||||
|
* (C) Copyright 2016 Hans de Goede <hdegoede@redhat.com> |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: GPL-2.0+ |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef _SUNXI_PWM_H |
||||||
|
#define _SUNXI_PWM_H |
||||||
|
|
||||||
|
#define SUNXI_PWM_CTRL_REG (SUNXI_PWM_BASE + 0) |
||||||
|
#define SUNXI_PWM_CH0_PERIOD (SUNXI_PWM_BASE + 4) |
||||||
|
|
||||||
|
#define SUNXI_PWM_CTRL_PRESCALE0(x) ((x) & 0xf) |
||||||
|
#define SUNXI_PWM_CTRL_ENABLE0 (0x5 << 4) |
||||||
|
#define SUNXI_PWM_CTRL_POLARITY0(x) ((x) << 5) |
||||||
|
|
||||||
|
#define SUNXI_PWM_PERIOD_80PCT 0x04af03c0 |
||||||
|
|
||||||
|
#if defined CONFIG_MACH_SUN4I || defined CONFIG_MACH_SUN5I |
||||||
|
#define SUNXI_PWM_PIN0 SUNXI_GPB(2) |
||||||
|
#define SUNXI_PWM_MUX SUN4I_GPB_PWM |
||||||
|
#endif |
||||||
|
|
||||||
|
#if defined CONFIG_MACH_SUN6I |
||||||
|
#define SUNXI_PWM_PIN0 SUNXI_GPH(13) |
||||||
|
#define SUNXI_PWM_MUX SUN6I_GPH_PWM |
||||||
|
#endif |
||||||
|
|
||||||
|
#if defined CONFIG_MACH_SUN8I_A23 || defined CONFIG_MACH_SUN8I_A33 |
||||||
|
#define SUNXI_PWM_PIN0 SUNXI_GPH(0) |
||||||
|
#define SUNXI_PWM_MUX SUN8I_GPH_PWM |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif |
@ -0,0 +1,22 @@ |
|||||||
|
CONFIG_ARM=y |
||||||
|
CONFIG_ARCH_SUNXI=y |
||||||
|
CONFIG_MACH_SUN5I=y |
||||||
|
CONFIG_DRAM_CLK=408 |
||||||
|
CONFIG_MMC0_CD_PIN="PG0" |
||||||
|
CONFIG_USB0_VBUS_PIN="PG12" |
||||||
|
CONFIG_USB0_VBUS_DET="PG1" |
||||||
|
CONFIG_USB0_ID_DET="PG2" |
||||||
|
CONFIG_AXP_GPIO=y |
||||||
|
# CONFIG_VIDEO_HDMI is not set |
||||||
|
CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:82,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0" |
||||||
|
CONFIG_VIDEO_LCD_POWER="AXP0-0" |
||||||
|
CONFIG_VIDEO_LCD_BL_EN="AXP0-1" |
||||||
|
CONFIG_VIDEO_LCD_BL_PWM="PB2" |
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-m712" |
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
||||||
|
CONFIG_SPL=y |
||||||
|
CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" |
||||||
|
# CONFIG_CMD_IMLS is not set |
||||||
|
# CONFIG_CMD_FLASH is not set |
||||||
|
# CONFIG_CMD_FPGA is not set |
||||||
|
CONFIG_USB_MUSB_HOST=y |
@ -0,0 +1,23 @@ |
|||||||
|
CONFIG_ARM=y |
||||||
|
CONFIG_ARCH_SUNXI=y |
||||||
|
CONFIG_MACH_SUN6I=y |
||||||
|
CONFIG_DRAM_CLK=384 |
||||||
|
CONFIG_DRAM_ZQ=251 |
||||||
|
CONFIG_MMC0_CD_PIN="PA8" |
||||||
|
CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE" |
||||||
|
CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT" |
||||||
|
CONFIG_USB0_ID_DET="PA15" |
||||||
|
CONFIG_AXP_GPIO=y |
||||||
|
CONFIG_VIDEO_LCD_MODE="x:1024,y:768,depth:18,pclk_khz:65000,le:280,ri:20,up:22,lo:8,hs:20,vs:8,sync:3,vmode:0" |
||||||
|
CONFIG_VIDEO_LCD_DCLK_PHASE=0 |
||||||
|
CONFIG_VIDEO_LCD_BL_EN="PA25" |
||||||
|
CONFIG_VIDEO_LCD_BL_PWM="PH13" |
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-inet-q972" |
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
||||||
|
CONFIG_SPL=y |
||||||
|
# CONFIG_CMD_IMLS is not set |
||||||
|
# CONFIG_CMD_FLASH is not set |
||||||
|
# CONFIG_CMD_FPGA is not set |
||||||
|
CONFIG_AXP_DLDO1_VOLT=3300 |
||||||
|
CONFIG_USB_MUSB_HOST=y |
||||||
|
CONFIG_USB_EHCI_HCD=y |
@ -0,0 +1,145 @@ |
|||||||
|
/*
|
||||||
|
* Copyright (C) 2016 Maxime Ripard <maxime.ripard@free-electrons.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef _DT_BINDINGS_CLK_SUN8I_H3_H_ |
||||||
|
#define _DT_BINDINGS_CLK_SUN8I_H3_H_ |
||||||
|
|
||||||
|
#define CLK_CPUX 14 |
||||||
|
|
||||||
|
#define CLK_BUS_CE 20 |
||||||
|
#define CLK_BUS_DMA 21 |
||||||
|
#define CLK_BUS_MMC0 22 |
||||||
|
#define CLK_BUS_MMC1 23 |
||||||
|
#define CLK_BUS_MMC2 24 |
||||||
|
#define CLK_BUS_NAND 25 |
||||||
|
#define CLK_BUS_DRAM 26 |
||||||
|
#define CLK_BUS_EMAC 27 |
||||||
|
#define CLK_BUS_TS 28 |
||||||
|
#define CLK_BUS_HSTIMER 29 |
||||||
|
#define CLK_BUS_SPI0 30 |
||||||
|
#define CLK_BUS_SPI1 31 |
||||||
|
#define CLK_BUS_OTG 32 |
||||||
|
#define CLK_BUS_EHCI0 33 |
||||||
|
#define CLK_BUS_EHCI1 34 |
||||||
|
#define CLK_BUS_EHCI2 35 |
||||||
|
#define CLK_BUS_EHCI3 36 |
||||||
|
#define CLK_BUS_OHCI0 37 |
||||||
|
#define CLK_BUS_OHCI1 38 |
||||||
|
#define CLK_BUS_OHCI2 39 |
||||||
|
#define CLK_BUS_OHCI3 40 |
||||||
|
#define CLK_BUS_VE 41 |
||||||
|
#define CLK_BUS_TCON0 42 |
||||||
|
#define CLK_BUS_TCON1 43 |
||||||
|
#define CLK_BUS_DEINTERLACE 44 |
||||||
|
#define CLK_BUS_CSI 45 |
||||||
|
#define CLK_BUS_TVE 46 |
||||||
|
#define CLK_BUS_HDMI 47 |
||||||
|
#define CLK_BUS_DE 48 |
||||||
|
#define CLK_BUS_GPU 49 |
||||||
|
#define CLK_BUS_MSGBOX 50 |
||||||
|
#define CLK_BUS_SPINLOCK 51 |
||||||
|
#define CLK_BUS_CODEC 52 |
||||||
|
#define CLK_BUS_SPDIF 53 |
||||||
|
#define CLK_BUS_PIO 54 |
||||||
|
#define CLK_BUS_THS 55 |
||||||
|
#define CLK_BUS_I2S0 56 |
||||||
|
#define CLK_BUS_I2S1 57 |
||||||
|
#define CLK_BUS_I2S2 58 |
||||||
|
#define CLK_BUS_I2C0 59 |
||||||
|
#define CLK_BUS_I2C1 60 |
||||||
|
#define CLK_BUS_I2C2 61 |
||||||
|
#define CLK_BUS_UART0 62 |
||||||
|
#define CLK_BUS_UART1 63 |
||||||
|
#define CLK_BUS_UART2 64 |
||||||
|
#define CLK_BUS_UART3 65 |
||||||
|
#define CLK_BUS_SCR 66 |
||||||
|
#define CLK_BUS_EPHY 67 |
||||||
|
#define CLK_BUS_DBG 68 |
||||||
|
|
||||||
|
#define CLK_THS 69 |
||||||
|
#define CLK_NAND 70 |
||||||
|
#define CLK_MMC0 71 |
||||||
|
#define CLK_MMC0_SAMPLE 72 |
||||||
|
#define CLK_MMC0_OUTPUT 73 |
||||||
|
#define CLK_MMC1 74 |
||||||
|
#define CLK_MMC1_SAMPLE 75 |
||||||
|
#define CLK_MMC1_OUTPUT 76 |
||||||
|
#define CLK_MMC2 77 |
||||||
|
#define CLK_MMC2_SAMPLE 78 |
||||||
|
#define CLK_MMC2_OUTPUT 79 |
||||||
|
#define CLK_TS 80 |
||||||
|
#define CLK_CE 81 |
||||||
|
#define CLK_SPI0 82 |
||||||
|
#define CLK_SPI1 83 |
||||||
|
#define CLK_I2S0 84 |
||||||
|
#define CLK_I2S1 85 |
||||||
|
#define CLK_I2S2 86 |
||||||
|
#define CLK_SPDIF 87 |
||||||
|
#define CLK_USB_PHY0 88 |
||||||
|
#define CLK_USB_PHY1 89 |
||||||
|
#define CLK_USB_PHY2 90 |
||||||
|
#define CLK_USB_PHY3 91 |
||||||
|
#define CLK_USB_OHCI0 92 |
||||||
|
#define CLK_USB_OHCI1 93 |
||||||
|
#define CLK_USB_OHCI2 94 |
||||||
|
#define CLK_USB_OHCI3 95 |
||||||
|
|
||||||
|
#define CLK_DRAM_VE 97 |
||||||
|
#define CLK_DRAM_CSI 98 |
||||||
|
#define CLK_DRAM_DEINTERLACE 99 |
||||||
|
#define CLK_DRAM_TS 100 |
||||||
|
#define CLK_DE 101 |
||||||
|
#define CLK_TCON0 102 |
||||||
|
#define CLK_TVE 103 |
||||||
|
#define CLK_DEINTERLACE 104 |
||||||
|
#define CLK_CSI_MISC 105 |
||||||
|
#define CLK_CSI_SCLK 106 |
||||||
|
#define CLK_CSI_MCLK 107 |
||||||
|
#define CLK_VE 108 |
||||||
|
#define CLK_AC_DIG 109 |
||||||
|
#define CLK_AVS 110 |
||||||
|
#define CLK_HDMI 111 |
||||||
|
#define CLK_HDMI_DDC 112 |
||||||
|
|
||||||
|
#define CLK_GPU 114 |
||||||
|
|
||||||
|
#endif /* _DT_BINDINGS_CLK_SUN8I_H3_H_ */ |
@ -0,0 +1,103 @@ |
|||||||
|
/*
|
||||||
|
* Copyright (C) 2016 Maxime Ripard <maxime.ripard@free-electrons.com> |
||||||
|
* |
||||||
|
* This file is dual-licensed: you can use it either under the terms |
||||||
|
* of the GPL or the X11 license, at your option. Note that this dual |
||||||
|
* licensing only applies to this file, and not this project as a |
||||||
|
* whole. |
||||||
|
* |
||||||
|
* a) This file is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of the |
||||||
|
* License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This file is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* Or, alternatively, |
||||||
|
* |
||||||
|
* b) Permission is hereby granted, free of charge, to any person |
||||||
|
* obtaining a copy of this software and associated documentation |
||||||
|
* files (the "Software"), to deal in the Software without |
||||||
|
* restriction, including without limitation the rights to use, |
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or |
||||||
|
* sell copies of the Software, and to permit persons to whom the |
||||||
|
* Software is furnished to do so, subject to the following |
||||||
|
* conditions: |
||||||
|
* |
||||||
|
* The above copyright notice and this permission notice shall be |
||||||
|
* included in all copies or substantial portions of the Software. |
||||||
|
* |
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||||||
|
* OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef _DT_BINDINGS_RST_SUN8I_H3_H_ |
||||||
|
#define _DT_BINDINGS_RST_SUN8I_H3_H_ |
||||||
|
|
||||||
|
#define RST_USB_PHY0 0 |
||||||
|
#define RST_USB_PHY1 1 |
||||||
|
#define RST_USB_PHY2 2 |
||||||
|
#define RST_USB_PHY3 3 |
||||||
|
|
||||||
|
#define RST_MBUS 4 |
||||||
|
|
||||||
|
#define RST_BUS_CE 5 |
||||||
|
#define RST_BUS_DMA 6 |
||||||
|
#define RST_BUS_MMC0 7 |
||||||
|
#define RST_BUS_MMC1 8 |
||||||
|
#define RST_BUS_MMC2 9 |
||||||
|
#define RST_BUS_NAND 10 |
||||||
|
#define RST_BUS_DRAM 11 |
||||||
|
#define RST_BUS_EMAC 12 |
||||||
|
#define RST_BUS_TS 13 |
||||||
|
#define RST_BUS_HSTIMER 14 |
||||||
|
#define RST_BUS_SPI0 15 |
||||||
|
#define RST_BUS_SPI1 16 |
||||||
|
#define RST_BUS_OTG 17 |
||||||
|
#define RST_BUS_EHCI0 18 |
||||||
|
#define RST_BUS_EHCI1 19 |
||||||
|
#define RST_BUS_EHCI2 20 |
||||||
|
#define RST_BUS_EHCI3 21 |
||||||
|
#define RST_BUS_OHCI0 22 |
||||||
|
#define RST_BUS_OHCI1 23 |
||||||
|
#define RST_BUS_OHCI2 24 |
||||||
|
#define RST_BUS_OHCI3 25 |
||||||
|
#define RST_BUS_VE 26 |
||||||
|
#define RST_BUS_TCON0 27 |
||||||
|
#define RST_BUS_TCON1 28 |
||||||
|
#define RST_BUS_DEINTERLACE 29 |
||||||
|
#define RST_BUS_CSI 30 |
||||||
|
#define RST_BUS_TVE 31 |
||||||
|
#define RST_BUS_HDMI0 32 |
||||||
|
#define RST_BUS_HDMI1 33 |
||||||
|
#define RST_BUS_DE 34 |
||||||
|
#define RST_BUS_GPU 35 |
||||||
|
#define RST_BUS_MSGBOX 36 |
||||||
|
#define RST_BUS_SPINLOCK 37 |
||||||
|
#define RST_BUS_DBG 38 |
||||||
|
#define RST_BUS_EPHY 39 |
||||||
|
#define RST_BUS_CODEC 40 |
||||||
|
#define RST_BUS_SPDIF 41 |
||||||
|
#define RST_BUS_THS 42 |
||||||
|
#define RST_BUS_I2S0 43 |
||||||
|
#define RST_BUS_I2S1 44 |
||||||
|
#define RST_BUS_I2S2 45 |
||||||
|
#define RST_BUS_I2C0 46 |
||||||
|
#define RST_BUS_I2C1 47 |
||||||
|
#define RST_BUS_I2C2 48 |
||||||
|
#define RST_BUS_UART0 49 |
||||||
|
#define RST_BUS_UART1 50 |
||||||
|
#define RST_BUS_UART2 51 |
||||||
|
#define RST_BUS_UART3 52 |
||||||
|
#define RST_BUS_SCR 53 |
||||||
|
|
||||||
|
#endif /* _DT_BINDINGS_RST_SUN8I_H3_H_ */ |
Loading…
Reference in new issue