mirror of
https://github.com/Fishwaldo/build.git
synced 2025-05-31 03:12:56 +00:00
Trash some not needed patches
This commit is contained in:
parent
5365760e02
commit
ccb4a7dd5e
46 changed files with 0 additions and 22552 deletions
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* Copyright 2014 Maxime Ripard
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this file; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*
|
||||
* 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_PINCTRL_SUN4I_A10_H_
|
||||
#define __DT_BINDINGS_PINCTRL_SUN4I_A10_H_
|
||||
|
||||
#define SUN4I_PINCTRL_10_MA 0
|
||||
#define SUN4I_PINCTRL_20_MA 1
|
||||
#define SUN4I_PINCTRL_30_MA 2
|
||||
#define SUN4I_PINCTRL_40_MA 3
|
||||
|
||||
#define SUN4I_PINCTRL_NO_PULL 0
|
||||
#define SUN4I_PINCTRL_PULL_UP 1
|
||||
#define SUN4I_PINCTRL_PULL_DOWN 2
|
||||
|
||||
#endif /* __DT_BINDINGS_PINCTRL_SUN4I_A10_H_ */
|
|
@ -1,244 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun6i-a31.dtsi"
|
||||
#include "sunxi-common-regulators.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
|
||||
/ {
|
||||
model = "Banana Pi BPI-M2";
|
||||
compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_bananapi>;
|
||||
green {
|
||||
label = "bananapi:green:usr";
|
||||
gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
blue {
|
||||
label = "bananapi:blue:usr";
|
||||
gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc0";
|
||||
};
|
||||
red {
|
||||
label = "bananapi:red:usr";
|
||||
gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
};
|
||||
};
|
||||
|
||||
g40_leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&g40_pins_bananapi>;
|
||||
pm2 {
|
||||
label = "bananapi:pm2:usr";
|
||||
gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
reg_vmmc2: vmmc2 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vmmc2_pin_bananapi>;
|
||||
regulator-name = "vmmc2";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
// gpio = <&r_pio 1 0 GPIO_ACTIVE_HIGH>; /* PM0 */
|
||||
};
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_pins_rgmii_a>;
|
||||
phy = <&phy1>;
|
||||
phy-mode = "rgmii";
|
||||
snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
|
||||
snps,reset-active-low;
|
||||
snps,reset-delays-us = <0 10000 30000>;
|
||||
status = "okay";
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
/* pull-ups and devices require AXP221 DLDO3 */
|
||||
status = "failed";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
|
||||
vmmc-supply = <®_vcc3v0>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_pins_a>;
|
||||
vmmc-supply = <®_vmmc2>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
enable-sdio-wakeup;
|
||||
status = "okay";
|
||||
|
||||
/*
|
||||
brcmf: bcrmf@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <5 0>;
|
||||
interrupt-names = "host-wake";
|
||||
status = "okay";
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
&mmc0_pins_a {
|
||||
/* external pull-ups missing for some pins */
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
&mmc2_pins_a {
|
||||
/* external pull-ups missing for some pins */
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
&pio {
|
||||
led_pins_bananapi: led_pins@0 {
|
||||
allwinner,pins = "PG10", "PG5", "PG11";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PA4";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
mmc2_pins_a: mmc2@0 {
|
||||
allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11";
|
||||
allwinner,function = "mmc2";
|
||||
allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
&r_pio {
|
||||
g40_pins_bananapi: g40_pins@0 {
|
||||
allwinner,pins = "PM2";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
vmmc2_pin_bananapi: vmmc2_pin@0 {
|
||||
allwinner,pins = "PL8";
|
||||
// allwinner,pins = "PM0";
|
||||
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";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
status = "okay";
|
||||
};
|
|
@ -1,294 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/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;
|
||||
serial1 = &uart2;
|
||||
serial2 = &uart3;
|
||||
serial3 = &uart7;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_bananapi>;
|
||||
|
||||
red {
|
||||
label = "bananapi:red:usr";
|
||||
gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
};
|
||||
|
||||
green {
|
||||
label = "bananapi:green:usr";
|
||||
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_power_pin_bananapi>;
|
||||
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>;
|
||||
};
|
||||
|
||||
reg_vmmc3: vmmc3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vmmc3_pin_bananapi>;
|
||||
regulator-name = "vmmc3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&ahci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ir0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ir0_rx_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
|
||||
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 = <®_vmmc3>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
enable-sdio-wakeup;
|
||||
status = "okay";
|
||||
|
||||
/*
|
||||
brcmf: bcrmf@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <15 8>;
|
||||
interrupt-names = "host-wake";
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
&pio {
|
||||
gmac_power_pin_bananapi: 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_bananapi: led_pins@0 {
|
||||
allwinner,pins = "PH24", "PG2";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PH10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
usb1_vbus_pin_bananapi: usb1_vbus_pin@0 {
|
||||
allwinner,pins = "PH0";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb2_vbus_pin_bananapi: usb2_vbus_pin@0 {
|
||||
allwinner,pins = "PH1";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
vmmc3_pin_bananapi: vmmc3_pin@0 {
|
||||
allwinner,pins = "PH22";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
pinctrl-0 = <&usb1_vbus_pin_bananapi>;
|
||||
gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb2_vbus {
|
||||
pinctrl-0 = <&usb2_vbus_pin_bananapi>;
|
||||
gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins_a>,
|
||||
<&spi0_cs0_pins_a>,
|
||||
<&spi0_cs1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart7 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart7_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
|
@ -1,229 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun7i-a20.dtsi"
|
||||
#include "sunxi-common-regulators.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
|
||||
/ {
|
||||
model = "Banana Pi BPI-R1";
|
||||
compatible = "sinovoip,bpi-r1", "allwinner,sun7i-a20";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart2;
|
||||
serial2 = &uart3;
|
||||
serial3 = &uart7;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_bananapi>;
|
||||
|
||||
green {
|
||||
label = "bananapi:green:usr";
|
||||
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_power_pin_bananapi>;
|
||||
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";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ir0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ir0_rx_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PH10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
gmac_power_pin_bananapi: 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_bananapi: led_pins@0 {
|
||||
allwinner,pins = "PH24";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb2_vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins_a>,
|
||||
<&spi0_cs0_pins_a>,
|
||||
<&spi0_cs1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart7 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart7_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
|
@ -1,238 +0,0 @@
|
|||
/*
|
||||
* Copyright 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this file; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*
|
||||
* 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/irq.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
|
||||
/ {
|
||||
model = "Lamobo R1";
|
||||
compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart3;
|
||||
serial2 = &uart7;
|
||||
};
|
||||
|
||||
soc@01c00000 {
|
||||
spi0: spi@01c05000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
mmc0: mmc@01c0f000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 10 0>; /* PH10 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usbphy: phy@01c13400 {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ehci0: usb@01c14000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ohci0: usb@01c14400 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ahci: sata@01c18000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ehci1: usb@01c1c000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ohci1: usb@01c1c400 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pinctrl@01c20800 {
|
||||
mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PH10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
gmac_power_pin_bananapi: gmac_power_pin@0 {
|
||||
allwinner,pins = "PH23";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
led_pins_bananapi: led_pins@0 {
|
||||
allwinner,pins = "PH24";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
ahci_pwr_pin_a: ahci_pwr_pin@0 {
|
||||
allwinner,pins = "PB3";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
uart0: serial@01c28000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uart3: serial@01c28c00 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uart7: serial@01c29c00 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart7_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
i2c0: i2c@01c2ac00 {
|
||||
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 8>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c2: i2c@01c2b400 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gmac: ethernet@01c50000 {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_bananapi>;
|
||||
|
||||
green {
|
||||
label = "bananapi:green:usr";
|
||||
gpios = <&pio 7 24 0>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_usb1_vbus: usb1-vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
reg_usb2_vbus: usb2-vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_power_pin_bananapi>;
|
||||
regulator-name = "gmac-3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <100000>;
|
||||
enable-active-high;
|
||||
gpio = <&pio 7 23 0>;
|
||||
};
|
||||
|
||||
reg_ahci_5v: ahci-5v {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ahci_pwr_pin_a>;
|
||||
regulator-name = "ahci-5v";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
gpio = <&pio 1 3 0>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
|
@ -1,244 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
|
||||
*
|
||||
* 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/irq.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
|
||||
/ {
|
||||
model = "Orange Pi Mini";
|
||||
compatible = "xunlong,orangepi-mini", "allwinner,sun7i-a20";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_orangepi>;
|
||||
|
||||
green {
|
||||
label = "orangepi:green:usr";
|
||||
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
|
||||
};
|
||||
|
||||
blue {
|
||||
label = "orangepi:blue:usr";
|
||||
gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
|
||||
};
|
||||
};
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_power_pin_orangepi>;
|
||||
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>; /* PH23 */
|
||||
};
|
||||
};
|
||||
|
||||
&ahci {
|
||||
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 {
|
||||
reg = <0x34>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp209.dtsi"
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_orangepi>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_orangepi>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PH10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
mmc3_cd_pin_orangepi: mmc3_cd_pin@0 {
|
||||
allwinner,pins = "PH11";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
usb2_vbus_pin_bananapro: usb2_vbus_pin@0 {
|
||||
allwinner,pins = "PH22";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
gmac_power_pin_orangepi: 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_orangepi: led_pins@0 {
|
||||
allwinner,pins = "PH24", "PH25";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb1_vbus_pin_bananapro: usb1_vbus_pin@0 {
|
||||
allwinner,pins = "PH26";
|
||||
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";
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
pinctrl-0 = <&usb1_vbus_pin_bananapro>;
|
||||
gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb2_vbus {
|
||||
pinctrl-0 = <&usb2_vbus_pin_bananapro>;
|
||||
gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
|
@ -1,225 +0,0 @@
|
|||
/*
|
||||
* Copyright 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this file; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*
|
||||
* 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/irq.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
|
||||
/ {
|
||||
model = "Orange PI";
|
||||
compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart3;
|
||||
serial2 = &uart7;
|
||||
};
|
||||
|
||||
soc@01c00000 {
|
||||
spi0: spi@01c05000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
mmc0: mmc@01c0f000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 10 0>; /* PH10 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usbphy: phy@01c13400 {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ehci0: usb@01c14000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ohci0: usb@01c14400 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ahci: sata@01c18000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ehci1: usb@01c1c000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ohci1: usb@01c1c400 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pinctrl@01c20800 {
|
||||
mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PH10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <1>;
|
||||
};
|
||||
|
||||
gmac_power_pin_bananapi: gmac_power_pin@0 {
|
||||
allwinner,pins = "PH23";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
led_pins_bananapi: led_pins@0 {
|
||||
allwinner,pins = "PH24";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <0>;
|
||||
allwinner,pull = <0>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
ir0: ir@01c21800 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ir0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uart0: serial@01c28000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uart3: serial@01c28c00 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uart7: serial@01c29c00 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart7_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
i2c0: i2c@01c2ac00 {
|
||||
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 8>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c2: i2c@01c2b400 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gmac: ethernet@01c50000 {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_bananapi>;
|
||||
|
||||
green {
|
||||
label = "bananapi:green:usr";
|
||||
gpios = <&pio 7 24 0>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_usb1_vbus: usb1-vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
reg_usb2_vbus: usb2-vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_power_pin_bananapi>;
|
||||
regulator-name = "gmac-3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <100000>;
|
||||
enable-active-high;
|
||||
gpio = <&pio 7 22 23 0>;
|
||||
};
|
||||
};
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Adam Sampson <ats@xxxxxxxxx>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this file; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*
|
||||
* 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 = "LinkSprite pcDuino3 Nano";
|
||||
compatible = "linksprite,pcduino3-nano", "allwinner,sun7i-a20";
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_pcduino3_nano>;
|
||||
|
||||
/* Marked "LED3" on the PCB. */
|
||||
usr1 {
|
||||
label = "pcduino3-nano:green:usr1";
|
||||
gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; /* PH16 */
|
||||
};
|
||||
|
||||
/* Marked "LED4" on the PCB. */
|
||||
usr2 {
|
||||
label = "pcduino3-nano:green:usr2";
|
||||
gpios = <&pio 7 15 GPIO_ACTIVE_LOW>; /* PH15 */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ahci {
|
||||
target-supply = <®_ahci_5v>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_pins_rgmii_a>;
|
||||
phy = <&phy1>;
|
||||
phy-mode = "rgmii";
|
||||
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_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 {
|
||||
allwinner,pins = "PH2";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
led_pins_pcduino3_nano: led_pins@0 {
|
||||
allwinner,pins = "PH16", "PH15";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 {
|
||||
allwinner,pins = "PH11";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
®_ahci_5v {
|
||||
pinctrl-0 = <&ahci_pwr_pin_pcduino3_nano>;
|
||||
gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
|
||||
gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb2_vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
|
@ -1,38 +0,0 @@
|
|||
From 15eb60db598930b0a653d056c13bffb614ab2db7 Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Wed, 22 Apr 2015 14:33:29 +0200
|
||||
Subject: [PATCH 1/8] ARM: sun5i: dt: Add Security System to A10s SoC DTS
|
||||
|
||||
The Security System is a hardware cryptographic accelerator that support
|
||||
AES/MD5/SHA1/DES/3DES/PRNG algorithms.
|
||||
It could be found on many Allwinner SoC.
|
||||
|
||||
This patch enable the Security System on Allwinner A10s SoC Device-tree.
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/sun5i-a10s.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
|
||||
index 2fd8988..dbe8704 100644
|
||||
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
|
||||
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
|
||||
@@ -448,6 +448,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ crypto: crypto-engine@01c15000 {
|
||||
+ compatible = "allwinner,sun4i-a10-crypto";
|
||||
+ reg = <0x01c15000 0x1000>;
|
||||
+ interrupts = <86>;
|
||||
+ clocks = <&ahb_gates 5>, <&ss_clk>;
|
||||
+ clock-names = "ahb", "mod";
|
||||
+ };
|
||||
+
|
||||
spi2: spi@01c17000 {
|
||||
compatible = "allwinner,sun4i-a10-spi";
|
||||
reg = <0x01c17000 0x1000>;
|
||||
--
|
||||
2.3.6
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,53 +0,0 @@
|
|||
From 4c4c51f19c975948b3a43d10606e075ca2254f74 Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Fri, 17 Apr 2015 13:25:34 +0200
|
||||
Subject: [PATCH 2/8] ARM: sun6i: dt: Add Security System to A31 SoC DTS
|
||||
|
||||
The Security System is a hardware cryptographic accelerator that support
|
||||
AES/MD5/SHA1/DES/3DES/PRNG algorithms.
|
||||
It could be found on many Allwinner SoC.
|
||||
|
||||
This patch enable the Security System on the Allwinner A31 SoC Device-tree.
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/sun6i-a31.dtsi | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
|
||||
index fa2f403..6b300f4 100644
|
||||
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
|
||||
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
|
||||
@@ -296,6 +296,14 @@
|
||||
"mmc3_sample";
|
||||
};
|
||||
|
||||
+ ss_clk: clk@01c2009c {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-mod0-clk";
|
||||
+ reg = <0x01c2009c 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
|
||||
+ clock-output-names = "ss";
|
||||
+ };
|
||||
+
|
||||
spi0_clk: clk@01c200a0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-mod0-clk";
|
||||
@@ -455,6 +463,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ crypto: crypto-engine@01c15000 {
|
||||
+ compatible = "allwinner,sun4i-a10-crypto";
|
||||
+ reg = <0x01c15000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ahb_gates 5>, <&ss_clk>;
|
||||
+ clock-names = "ahb", "mod";
|
||||
+ };
|
||||
+
|
||||
usbphy: phy@01c19400 {
|
||||
compatible = "allwinner,sun6i-a31-usb-phy";
|
||||
reg = <0x01c19400 0x10>,
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From d2a3003bba47ebab67252992f533f1f957666f2a Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Wed, 22 Apr 2015 14:16:08 +0200
|
||||
Subject: [PATCH 3/8] ARM: sun4i: dt: Add Security System to A10 SoC DTS
|
||||
|
||||
The Security System is a hardware cryptographic accelerator that support
|
||||
AES/MD5/SHA1/DES/3DES/PRNG algorithms.
|
||||
It could be found on many Allwinner SoC.
|
||||
|
||||
This patch enable the Security System on the Allwinner A10 SoC Device-tree.
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/sun4i-a10.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
|
||||
index eebb785..bd7cdeb 100644
|
||||
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
|
||||
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
|
||||
@@ -564,6 +564,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ crypto: crypto-engine@01c15000 {
|
||||
+ compatible = "allwinner,sun4i-a10-crypto";
|
||||
+ reg = <0x01c15000 0x1000>;
|
||||
+ interrupts = <86>;
|
||||
+ clocks = <&ahb_gates 5>, <&ss_clk>;
|
||||
+ clock-names = "ahb", "mod";
|
||||
+ };
|
||||
+
|
||||
spi2: spi@01c17000 {
|
||||
compatible = "allwinner,sun4i-a10-spi";
|
||||
reg = <0x01c17000 0x1000>;
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From bc67b1914525bd0ea236255bc05598e2acf3ef59 Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Sat, 4 Oct 2014 14:18:07 +0200
|
||||
Subject: [PATCH 4/8] ARM: sun7i: dt: Add Security System to A20 SoC DTS
|
||||
|
||||
The Security System is a hardware cryptographic accelerator that support
|
||||
AES/MD5/SHA1/DES/3DES/PRNG algorithms.
|
||||
It could be found on many Allwinner SoC.
|
||||
|
||||
This patch enable the Security System on the Allwinner A20 SoC Device-tree.
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
|
||||
index fdd1817..e840d76 100644
|
||||
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
|
||||
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
|
||||
@@ -679,6 +679,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ crypto: crypto-engine@01c15000 {
|
||||
+ compatible = "allwinner,sun4i-a10-crypto";
|
||||
+ reg = <0x01c15000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ahb_gates 5>, <&ss_clk>;
|
||||
+ clock-names = "ahb", "mod";
|
||||
+ };
|
||||
+
|
||||
spi2: spi@01c17000 {
|
||||
compatible = "allwinner,sun4i-a10-spi";
|
||||
reg = <0x01c17000 0x1000>;
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From bda35d07f7fc2f755b1b8c44cd762391be60b44f Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Sat, 4 Oct 2014 14:19:41 +0200
|
||||
Subject: [PATCH 5/8] ARM: sun4i: dt: Add DT bindings documentation for SUN4I
|
||||
Security System
|
||||
|
||||
This patch adds documentation for Device-Tree bindings for the Security System
|
||||
cryptographic accelerator driver.
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/crypto/sun4i-ss.txt | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/crypto/sun4i-ss.txt
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/crypto/sun4i-ss.txt b/Documentation/devicetree/bindings/crypto/sun4i-ss.txt
|
||||
new file mode 100644
|
||||
index 0000000..1e02d17
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/crypto/sun4i-ss.txt
|
||||
@@ -0,0 +1,19 @@
|
||||
+* Allwinner Security System found on A20 SoC
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible : Should be "allwinner,sun4i-a10-crypto".
|
||||
+- reg: Should contain the Security System register location and length.
|
||||
+- interrupts: Should contain the IRQ line for the Security System.
|
||||
+- clocks : List of clock specifiers, corresponding to ahb and ss.
|
||||
+- clock-names : Name of the functional clock, should be
|
||||
+ * "ahb" : AHB gating clock
|
||||
+ * "mod" : SS controller clock
|
||||
+
|
||||
+Example:
|
||||
+ crypto: crypto-engine@01c15000 {
|
||||
+ compatible = "allwinner,sun4i-a10-crypto";
|
||||
+ reg = <0x01c15000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ahb_gates 5>, <&ss_clk>;
|
||||
+ clock-names = "ahb", "mod";
|
||||
+ };
|
||||
--
|
||||
2.3.6
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,31 +0,0 @@
|
|||
From 086a380119420becff42d04f01e71b84332221c6 Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Sun, 19 Oct 2014 14:50:22 +0200
|
||||
Subject: [PATCH 7/8] MAINTAINERS: Add myself as maintainer of Allwinner
|
||||
Security System
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
MAINTAINERS | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 474bcb6..754b569 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -555,6 +555,12 @@ S: Maintained
|
||||
F: Documentation/i2c/busses/i2c-ali1563
|
||||
F: drivers/i2c/busses/i2c-ali1563.c
|
||||
|
||||
+ALLWINNER SECURITY SYSTEM
|
||||
+M: Corentin Labbe <clabbe.montjoie@gmail.com>
|
||||
+L: linux-crypto@vger.kernel.org
|
||||
+S: Maintained
|
||||
+F: drivers/crypto/sunxi-ss/
|
||||
+
|
||||
ALPHA PORT
|
||||
M: Richard Henderson <rth@twiddle.net>
|
||||
M: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -1,183 +0,0 @@
|
|||
From faf8cb104cdae9dd88303fd2788128f8460bd4ca Mon Sep 17 00:00:00 2001
|
||||
From: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
Date: Fri, 27 Mar 2015 10:05:19 +0100
|
||||
Subject: [PATCH 8/8] crypto: sun4i-ss: support the Security System PRNG
|
||||
|
||||
The Security System have a PRNG.
|
||||
This patch add support for it as an hwrng.
|
||||
|
||||
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
|
||||
---
|
||||
drivers/crypto/Kconfig | 1 +
|
||||
drivers/crypto/sunxi-ss/Makefile | 2 +-
|
||||
drivers/crypto/sunxi-ss/sun4i-ss-core.c | 5 +++
|
||||
drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c | 77 ++++++++++++++++++++++++++++++++
|
||||
drivers/crypto/sunxi-ss/sun4i-ss.h | 7 +++
|
||||
5 files changed, 91 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c
|
||||
|
||||
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
|
||||
index 2a5598e..979bc2a 100644
|
||||
--- a/drivers/crypto/Kconfig
|
||||
+++ b/drivers/crypto/Kconfig
|
||||
@@ -467,6 +467,7 @@ config CRYPTO_DEV_SUN4I_SS
|
||||
select CRYPTO_AES
|
||||
select CRYPTO_DES
|
||||
select CRYPTO_BLKCIPHER
|
||||
+ select HW_RANDOM
|
||||
help
|
||||
Some Allwinner SoC have a crypto accelerator named
|
||||
Security System. Select this if you want to use it.
|
||||
diff --git a/drivers/crypto/sunxi-ss/Makefile b/drivers/crypto/sunxi-ss/Makefile
|
||||
index 8f4c7a2..e846fe8 100644
|
||||
--- a/drivers/crypto/sunxi-ss/Makefile
|
||||
+++ b/drivers/crypto/sunxi-ss/Makefile
|
||||
@@ -1,2 +1,2 @@
|
||||
obj-$(CONFIG_CRYPTO_DEV_SUN4I_SS) += sun4i-ss.o
|
||||
-sun4i-ss-y += sun4i-ss-core.o sun4i-ss-hash.o sun4i-ss-cipher.o
|
||||
+sun4i-ss-y += sun4i-ss-core.o sun4i-ss-hash.o sun4i-ss-cipher.o sun4i-ss-hwrng.o
|
||||
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
|
||||
index fcb4c01..f3a410a 100644
|
||||
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
|
||||
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
|
||||
@@ -331,6 +331,9 @@ static int sun4i_ss_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
platform_set_drvdata(pdev, ss);
|
||||
+
|
||||
+ sun4i_ss_hwrng_register(&ss->hwrng);
|
||||
+
|
||||
return 0;
|
||||
error_alg:
|
||||
i--;
|
||||
@@ -356,6 +359,8 @@ static int sun4i_ss_remove(struct platform_device *pdev)
|
||||
int i;
|
||||
struct sun4i_ss_ctx *ss = platform_get_drvdata(pdev);
|
||||
|
||||
+ sun4i_ss_hwrng_remove(&ss->hwrng);
|
||||
+
|
||||
for (i = 0; i < ARRAY_SIZE(driver_algs); i++) {
|
||||
switch (driver_algs[i].type) {
|
||||
case CRYPTO_ALG_TYPE_ABLKCIPHER:
|
||||
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c
|
||||
new file mode 100644
|
||||
index 0000000..0af67a8a1
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c
|
||||
@@ -0,0 +1,77 @@
|
||||
+#include "sun4i-ss.h"
|
||||
+
|
||||
+static int sun4i_ss_hwrng_init(struct hwrng *hwrng)
|
||||
+{
|
||||
+ struct sun4i_ss_ctx *ss;
|
||||
+
|
||||
+ ss = container_of(hwrng, struct sun4i_ss_ctx, hwrng);
|
||||
+ get_random_bytes(ss->seed, SS_SEED_LEN);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun4i_ss_hwrng_read(struct hwrng *hwrng, void *buf,
|
||||
+ size_t max, bool wait)
|
||||
+{
|
||||
+ int i;
|
||||
+ u32 v;
|
||||
+ u32 *data = buf;
|
||||
+ u32 mode = SS_OP_PRNG | SS_PRNG_ONESHOT | SS_ENABLED;
|
||||
+ size_t len;
|
||||
+ struct sun4i_ss_ctx *ss;
|
||||
+
|
||||
+ ss = container_of(hwrng, struct sun4i_ss_ctx, hwrng);
|
||||
+ len = min_t(size_t, SS_DATA_LEN, max);
|
||||
+
|
||||
+ spin_lock_bh(&ss->slock);
|
||||
+
|
||||
+ writel(mode, ss->base + SS_CTL);
|
||||
+ for (i = 0; i < SS_SEED_LEN / 4; i++)
|
||||
+ writel(ss->seed[i], ss->base + SS_KEY0 + i * 4);
|
||||
+ writel(mode | SS_PRNG_START, ss->base + SS_CTL);
|
||||
+
|
||||
+#define SS_HWRNG_TIMEOUT 30
|
||||
+ /* if we are in SS_PRNG_ONESHOT mode, wait for completion */
|
||||
+ if ((mode & SS_PRNG_CONTINUE) == 0) {
|
||||
+ i = 0;
|
||||
+ do {
|
||||
+ v = readl(ss->base + SS_CTL);
|
||||
+ i++;
|
||||
+ } while (v != mode && i < SS_HWRNG_TIMEOUT);
|
||||
+ if (v != mode) {
|
||||
+ dev_err(ss->dev,
|
||||
+ "ERROR: hwrng end timeout %d>%d ctl=%x\n",
|
||||
+ i, SS_HWRNG_TIMEOUT, v);
|
||||
+ len = -EFAULT;
|
||||
+ goto release_ss;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < len; i += 4) {
|
||||
+ v = readl(ss->base + SS_MD0 + i);
|
||||
+ *(data + i / 4) = v;
|
||||
+ }
|
||||
+ for (i = 0; i < SS_SEED_LEN / 4; i++) {
|
||||
+ v = readl(ss->base + SS_KEY0 + i * 4);
|
||||
+ ss->seed[i] = v;
|
||||
+ }
|
||||
+release_ss:
|
||||
+ writel(0, ss->base + SS_CTL);
|
||||
+ spin_unlock_bh(&ss->slock);
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+int sun4i_ss_hwrng_register(struct hwrng *hwrng)
|
||||
+{
|
||||
+ hwrng->name = "sunxi Security System";
|
||||
+ hwrng->init = sun4i_ss_hwrng_init;
|
||||
+ hwrng->read = sun4i_ss_hwrng_read;
|
||||
+
|
||||
+ /*sun4i_ss_hwrng_init(hwrng);*/
|
||||
+ return hwrng_register(hwrng);
|
||||
+}
|
||||
+
|
||||
+void sun4i_ss_hwrng_remove(struct hwrng *hwrng)
|
||||
+{
|
||||
+ hwrng_unregister(hwrng);
|
||||
+}
|
||||
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss.h b/drivers/crypto/sunxi-ss/sun4i-ss.h
|
||||
index 6bb0ba8..2185a05 100644
|
||||
--- a/drivers/crypto/sunxi-ss/sun4i-ss.h
|
||||
+++ b/drivers/crypto/sunxi-ss/sun4i-ss.h
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <linux/hw_random.h>
|
||||
#include <crypto/md5.h>
|
||||
#include <crypto/sha.h>
|
||||
#include <crypto/hash.h>
|
||||
@@ -120,6 +121,8 @@
|
||||
#define SS_RXFIFO_EMP_INT_ENABLE (1 << 2)
|
||||
#define SS_TXFIFO_AVA_INT_ENABLE (1 << 0)
|
||||
|
||||
+#define SS_SEED_LEN (160/8)
|
||||
+#define SS_DATA_LEN (160 / 8)
|
||||
|
||||
struct sun4i_ss_ctx {
|
||||
void __iomem *base;
|
||||
@@ -129,6 +132,8 @@ struct sun4i_ss_ctx {
|
||||
struct device *dev;
|
||||
struct resource *res;
|
||||
spinlock_t slock; /* control the use of the device */
|
||||
+ struct hwrng hwrng;
|
||||
+ u32 seed[SS_SEED_LEN / 4];
|
||||
};
|
||||
|
||||
struct sun4i_ss_alg_template {
|
||||
@@ -193,3 +198,5 @@ int sun4i_ss_des_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
int sun4i_ss_des3_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
+int sun4i_ss_hwrng_register(struct hwrng *hwrng);
|
||||
+void sun4i_ss_hwrng_remove(struct hwrng *hwrng);
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -541,12 +541,12 @@
|
||||
sun5i-a13-hsg-h702.dtb \
|
||||
sun5i-a13-olinuxino.dtb \
|
||||
sun5i-a13-olinuxino-micro.dtb
|
||||
-dtb-$(CONFIG_MACH_SUN6I) += \
|
||||
- sun6i-a31-app4-evb1.dtb \
|
||||
- sun6i-a31-colombus.dtb \
|
||||
- sun6i-a31-hummingbird.dtb \
|
||||
- sun6i-a31-m9.dtb \
|
||||
- sun6i-a31s-cs908.dtb
|
||||
+#dtb-$(CONFIG_MACH_SUN6I) += \
|
||||
+# sun6i-a31-app4-evb1.dtb \
|
||||
+# sun6i-a31-colombus.dtb \
|
||||
+# sun6i-a31-hummingbird.dtb \
|
||||
+# sun6i-a31-m9.dtb \
|
||||
+# sun6i-a31s-cs908.dtb
|
||||
dtb-$(CONFIG_MACH_SUN7I) += \
|
||||
sun7i-a20-bananapi.dtb \
|
||||
sun7i-a20-pcduino3-nano.dtb \
|
File diff suppressed because it is too large
Load diff
|
@ -1,70 +0,0 @@
|
|||
aufs3.4 base patch
|
||||
|
||||
diff --git a/fs/namei.c b/fs/namei.c
|
||||
index c427919..7ff959b 100644
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1831,7 +1831,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
|
||||
* needs parent already locked. Doesn't follow mounts.
|
||||
* SMP-safe.
|
||||
*/
|
||||
-static struct dentry *lookup_hash(struct nameidata *nd)
|
||||
+struct dentry *lookup_hash(struct nameidata *nd)
|
||||
{
|
||||
return __lookup_hash(&nd->last, nd->path.dentry, nd);
|
||||
}
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index f847684..f871233 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -1084,8 +1084,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
|
||||
/*
|
||||
* Attempt to initiate a splice from pipe to file.
|
||||
*/
|
||||
-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
- loff_t *ppos, size_t len, unsigned int flags)
|
||||
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
+ loff_t *ppos, size_t len, unsigned int flags)
|
||||
{
|
||||
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
|
||||
loff_t *, size_t, unsigned int);
|
||||
@@ -1112,9 +1112,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
*/
|
||||
-static long do_splice_to(struct file *in, loff_t *ppos,
|
||||
- struct pipe_inode_info *pipe, size_t len,
|
||||
- unsigned int flags)
|
||||
+long do_splice_to(struct file *in, loff_t *ppos,
|
||||
+ struct pipe_inode_info *pipe, size_t len,
|
||||
+ unsigned int flags)
|
||||
{
|
||||
ssize_t (*splice_read)(struct file *, loff_t *,
|
||||
struct pipe_inode_info *, size_t, unsigned int);
|
||||
diff --git a/include/linux/namei.h b/include/linux/namei.h
|
||||
index ffc0213..ef35a31 100644
|
||||
--- a/include/linux/namei.h
|
||||
+++ b/include/linux/namei.h
|
||||
@@ -85,6 +85,7 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
|
||||
extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
|
||||
int (*open)(struct inode *, struct file *));
|
||||
|
||||
+extern struct dentry *lookup_hash(struct nameidata *nd);
|
||||
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
|
||||
|
||||
extern int follow_down_one(struct path *);
|
||||
diff --git a/include/linux/splice.h b/include/linux/splice.h
|
||||
index 26e5b61..3ffef2f 100644
|
||||
--- a/include/linux/splice.h
|
||||
+++ b/include/linux/splice.h
|
||||
@@ -91,4 +91,10 @@ extern void splice_shrink_spd(struct pipe_inode_info *,
|
||||
extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
|
||||
|
||||
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
|
||||
+
|
||||
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
+ loff_t *ppos, size_t len, unsigned int flags);
|
||||
+extern long do_splice_to(struct file *in, loff_t *ppos,
|
||||
+ struct pipe_inode_info *pipe, size_t len,
|
||||
+ unsigned int flags);
|
||||
#endif
|
|
@ -1,38 +0,0 @@
|
|||
aufs3.4 kbuild patch
|
||||
|
||||
diff --git a/fs/Kconfig b/fs/Kconfig
|
||||
index f95ae3a..6d8a9a5 100644
|
||||
--- a/fs/Kconfig
|
||||
+++ b/fs/Kconfig
|
||||
@@ -220,6 +220,7 @@ source "fs/pstore/Kconfig"
|
||||
source "fs/sysv/Kconfig"
|
||||
source "fs/ufs/Kconfig"
|
||||
source "fs/exofs/Kconfig"
|
||||
+source "fs/aufs/Kconfig"
|
||||
|
||||
endif # MISC_FILESYSTEMS
|
||||
|
||||
diff --git a/fs/Makefile b/fs/Makefile
|
||||
index 2fb9779..abefac5 100644
|
||||
--- a/fs/Makefile
|
||||
+++ b/fs/Makefile
|
||||
@@ -125,6 +125,6 @@
|
||||
obj-y += exofs/ # Multiple modules
|
||||
obj-$(CONFIG_CEPH_FS) += ceph/
|
||||
obj-$(CONFIG_PSTORE) += pstore/
|
||||
-
|
||||
+obj-$(CONFIG_AUFS_FS) += aufs/
|
||||
# Patched by YAFFS
|
||||
obj-$(CONFIG_YAFFS_FS) += yaffs2/
|
||||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
|
||||
index 3c9b616..8704efa 100644
|
||||
--- a/include/linux/Kbuild
|
||||
+++ b/include/linux/Kbuild
|
||||
@@ -66,6 +66,7 @@ header-y += atmppp.h
|
||||
header-y += atmsap.h
|
||||
header-y += atmsvc.h
|
||||
header-y += audit.h
|
||||
+header-y += aufs_type.h
|
||||
header-y += auto_fs.h
|
||||
header-y += auto_fs4.h
|
||||
header-y += auxvec.h
|
|
@ -1,349 +0,0 @@
|
|||
aufs3.4 mmap patch
|
||||
|
||||
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
|
||||
index b1822dd..d8518aa 100644
|
||||
--- a/fs/proc/nommu.c
|
||||
+++ b/fs/proc/nommu.c
|
||||
@@ -45,7 +45,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
|
||||
file = region->vm_file;
|
||||
|
||||
if (file) {
|
||||
- struct inode *inode = region->vm_file->f_path.dentry->d_inode;
|
||||
+ struct inode *inode;
|
||||
+ file = vmr_pr_or_file(region);
|
||||
+ inode = file->f_path.dentry->d_inode;
|
||||
dev = inode->i_sb->s_dev;
|
||||
ino = inode->i_ino;
|
||||
}
|
||||
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
|
||||
index 1030a71..748aa74 100644
|
||||
--- a/fs/proc/task_mmu.c
|
||||
+++ b/fs/proc/task_mmu.c
|
||||
@@ -225,7 +225,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
|
||||
const char *name = NULL;
|
||||
|
||||
if (file) {
|
||||
- struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
|
||||
+ struct inode *inode;
|
||||
+ file = vma_pr_or_file(vma);
|
||||
+ inode = file->f_path.dentry->d_inode;
|
||||
dev = inode->i_sb->s_dev;
|
||||
ino = inode->i_ino;
|
||||
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
|
||||
@@ -1158,6 +1160,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
|
||||
seq_printf(m, "%08lx %s", vma->vm_start, buffer);
|
||||
|
||||
if (file) {
|
||||
+ file = vma_pr_or_file(vma);
|
||||
seq_printf(m, " file=");
|
||||
seq_path(m, &file->f_path, "\n\t= ");
|
||||
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
|
||||
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
|
||||
index 74fe164..ff3ef72 100644
|
||||
--- a/fs/proc/task_nommu.c
|
||||
+++ b/fs/proc/task_nommu.c
|
||||
@@ -149,7 +149,9 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
|
||||
file = vma->vm_file;
|
||||
|
||||
if (file) {
|
||||
- struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
|
||||
+ struct inode *inode;
|
||||
+ file = vma_pr_or_file(file);
|
||||
+ inode = file->f_path.dentry->d_inode;
|
||||
dev = inode->i_sb->s_dev;
|
||||
ino = inode->i_ino;
|
||||
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index 74aa71b..f4aabab9 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <linux/pfn.h>
|
||||
#include <linux/bit_spinlock.h>
|
||||
#include <linux/shrinker.h>
|
||||
+#include <linux/dcache.h>
|
||||
+#include <linux/file.h>
|
||||
+#include <linux/fs.h>
|
||||
|
||||
struct mempolicy;
|
||||
struct anon_vma;
|
||||
@@ -984,6 +987,87 @@ static inline int fixup_user_fault(struct task_struct *tsk,
|
||||
}
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
|
||||
+ * in /proc/PID/maps.
|
||||
+ */
|
||||
+/* #define AUFS_DEBUG_MMAP */
|
||||
+static inline void aufs_trace(struct file *f, struct file *pr,
|
||||
+ const char func[], int line, const char func2[])
|
||||
+{
|
||||
+#ifdef AUFS_DEBUG_MMAP
|
||||
+ if (pr)
|
||||
+ pr_info("%s:%d: %s, %p\n", func, line, func2,
|
||||
+ f ? (char *)f->f_dentry->d_name.name : "(null)");
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static inline struct file *vmr_do_pr_or_file(struct vm_region *region,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+static inline void vmr_do_fput(struct vm_region *region,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+
|
||||
+static inline void vma_do_file_update_time(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ file_update_time(f);
|
||||
+ if (f && pr)
|
||||
+ file_update_time(pr);
|
||||
+}
|
||||
+
|
||||
+static inline struct file *vma_do_pr_or_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+static inline void vma_do_get_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ get_file(f);
|
||||
+ if (f && pr)
|
||||
+ get_file(pr);
|
||||
+}
|
||||
+
|
||||
+static inline void vma_do_fput(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+
|
||||
+#define vmr_pr_or_file(region) vmr_do_pr_or_file(region, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__)
|
||||
+#define vma_file_update_time(vma) vma_do_file_update_time(vma, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vma_pr_or_file(vma) vma_do_pr_or_file(vma, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vma_get_file(vma) vma_do_get_file(vma, __func__, __LINE__)
|
||||
+#define vma_fput(vma) vma_do_fput(vma, __func__, __LINE__)
|
||||
+
|
||||
extern int make_pages_present(unsigned long addr, unsigned long end);
|
||||
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
|
||||
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
|
||||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
|
||||
index 3cc3062..9742239 100644
|
||||
--- a/include/linux/mm_types.h
|
||||
+++ b/include/linux/mm_types.h
|
||||
@@ -185,6 +185,7 @@ struct vm_region {
|
||||
unsigned long vm_top; /* region allocated to here */
|
||||
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
|
||||
struct file *vm_file; /* the backing file or NULL */
|
||||
+ struct file *vm_prfile; /* the virtual backing file or NULL */
|
||||
|
||||
int vm_usage; /* region usage count (access under nommu_region_sem) */
|
||||
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
|
||||
@@ -244,6 +245,7 @@ struct vm_area_struct {
|
||||
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
|
||||
units, *not* PAGE_CACHE_SIZE */
|
||||
struct file * vm_file; /* File we map to (can be NULL). */
|
||||
+ struct file *vm_prfile; /* shadow of vm_file */
|
||||
void * vm_private_data; /* was vm_pte (shared mem) */
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
diff --git a/kernel/fork.c b/kernel/fork.c
|
||||
index 687a15d..fe47fd0 100644
|
||||
--- a/kernel/fork.c
|
||||
+++ b/kernel/fork.c
|
||||
@@ -381,7 +381,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
||||
- get_file(file);
|
||||
+ vma_get_file(tmp);
|
||||
if (tmp->vm_flags & VM_DENYWRITE)
|
||||
atomic_dec(&inode->i_writecount);
|
||||
mutex_lock(&mapping->i_mmap_mutex);
|
||||
diff --git a/mm/fremap.c b/mm/fremap.c
|
||||
index 9ed4fd4..00ee66b 100644
|
||||
--- a/mm/fremap.c
|
||||
+++ b/mm/fremap.c
|
||||
@@ -198,10 +198,10 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
|
||||
struct file *file = vma->vm_file;
|
||||
|
||||
flags &= MAP_NONBLOCK;
|
||||
- get_file(file);
|
||||
+ vma_get_file(vma);
|
||||
addr = mmap_region(file, start, size,
|
||||
flags, vma->vm_flags, pgoff);
|
||||
- fput(file);
|
||||
+ vma_fput(vma);
|
||||
if (IS_ERR_VALUE(addr)) {
|
||||
err = addr;
|
||||
} else {
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index 6105f47..9bdc45d 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -2652,7 +2652,7 @@ reuse:
|
||||
|
||||
/* file_update_time outside page_lock */
|
||||
if (vma->vm_file)
|
||||
- file_update_time(vma->vm_file);
|
||||
+ vma_file_update_time(vma);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3337,7 +3337,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
|
||||
/* file_update_time outside page_lock */
|
||||
if (vma->vm_file)
|
||||
- file_update_time(vma->vm_file);
|
||||
+ vma_file_update_time(vma);
|
||||
} else {
|
||||
unlock_page(vmf.page);
|
||||
if (anon)
|
||||
diff --git a/mm/mmap.c b/mm/mmap.c
|
||||
index 848ef52..423d68f 100644
|
||||
--- a/mm/mmap.c
|
||||
+++ b/mm/mmap.c
|
||||
@@ -231,7 +231,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
|
||||
if (vma->vm_ops && vma->vm_ops->close)
|
||||
vma->vm_ops->close(vma);
|
||||
if (vma->vm_file) {
|
||||
- fput(vma->vm_file);
|
||||
+ vma_fput(vma);
|
||||
if (vma->vm_flags & VM_EXECUTABLE)
|
||||
removed_exe_file_vma(vma->vm_mm);
|
||||
}
|
||||
@@ -619,7 +619,7 @@ again: remove_next = 1 + (end > next->vm_end);
|
||||
|
||||
if (remove_next) {
|
||||
if (file) {
|
||||
- fput(file);
|
||||
+ vma_fput(vma);
|
||||
if (next->vm_flags & VM_EXECUTABLE)
|
||||
removed_exe_file_vma(mm);
|
||||
}
|
||||
@@ -1376,8 +1376,8 @@ out:
|
||||
unmap_and_free_vma:
|
||||
if (correct_wcount)
|
||||
atomic_inc(&inode->i_writecount);
|
||||
+ vma_fput(vma);
|
||||
vma->vm_file = NULL;
|
||||
- fput(file);
|
||||
|
||||
/* Undo any partial mapping done by a device driver. */
|
||||
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
|
||||
@@ -1998,7 +1998,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
||||
goto out_free_mpol;
|
||||
|
||||
if (new->vm_file) {
|
||||
- get_file(new->vm_file);
|
||||
+ vma_get_file(new);
|
||||
if (vma->vm_flags & VM_EXECUTABLE)
|
||||
added_exe_file_vma(mm);
|
||||
}
|
||||
@@ -2022,7 +2022,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
||||
if (new->vm_file) {
|
||||
if (vma->vm_flags & VM_EXECUTABLE)
|
||||
removed_exe_file_vma(mm);
|
||||
- fput(new->vm_file);
|
||||
+ vma_fput(new);
|
||||
}
|
||||
unlink_anon_vmas(new);
|
||||
out_free_mpol:
|
||||
@@ -2420,7 +2420,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
|
||||
new_vma->vm_end = addr + len;
|
||||
new_vma->vm_pgoff = pgoff;
|
||||
if (new_vma->vm_file) {
|
||||
- get_file(new_vma->vm_file);
|
||||
+ vma_get_file(new_vma);
|
||||
if (vma->vm_flags & VM_EXECUTABLE)
|
||||
added_exe_file_vma(mm);
|
||||
}
|
||||
diff --git a/mm/msync.c b/mm/msync.c
|
||||
index 632df45..02d770e 100644
|
||||
--- a/mm/msync.c
|
||||
+++ b/mm/msync.c
|
||||
@@ -80,10 +80,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
|
||||
start = vma->vm_end;
|
||||
if ((flags & MS_SYNC) && file &&
|
||||
(vma->vm_flags & VM_SHARED)) {
|
||||
- get_file(file);
|
||||
+ vma_get_file(vma);
|
||||
up_read(&mm->mmap_sem);
|
||||
error = vfs_fsync(file, 0);
|
||||
- fput(file);
|
||||
+ vma_fput(vma);
|
||||
if (error || start >= end)
|
||||
goto out;
|
||||
down_read(&mm->mmap_sem);
|
||||
diff --git a/mm/nommu.c b/mm/nommu.c
|
||||
index bb8f4f0..2bc7252 100644
|
||||
--- a/mm/nommu.c
|
||||
+++ b/mm/nommu.c
|
||||
@@ -632,7 +632,7 @@ static void __put_nommu_region(struct vm_region *region)
|
||||
up_write(&nommu_region_sem);
|
||||
|
||||
if (region->vm_file)
|
||||
- fput(region->vm_file);
|
||||
+ vmr_fput(region);
|
||||
|
||||
/* IO memory and memory shared directly out of the pagecache
|
||||
* from ramfs/tmpfs mustn't be released here */
|
||||
@@ -790,7 +790,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
|
||||
if (vma->vm_ops && vma->vm_ops->close)
|
||||
vma->vm_ops->close(vma);
|
||||
if (vma->vm_file) {
|
||||
- fput(vma->vm_file);
|
||||
+ vma_fput(vma);
|
||||
if (vma->vm_flags & VM_EXECUTABLE)
|
||||
removed_exe_file_vma(mm);
|
||||
}
|
||||
@@ -1363,7 +1363,7 @@ static unsigned long do_mmap_pgoff(struct file *file,
|
||||
goto error_just_free;
|
||||
}
|
||||
}
|
||||
- fput(region->vm_file);
|
||||
+ vmr_fput(region);
|
||||
kmem_cache_free(vm_region_jar, region);
|
||||
region = pregion;
|
||||
result = start;
|
||||
@@ -1439,10 +1439,10 @@ error_just_free:
|
||||
up_write(&nommu_region_sem);
|
||||
error:
|
||||
if (region->vm_file)
|
||||
- fput(region->vm_file);
|
||||
+ vmr_fput(region);
|
||||
kmem_cache_free(vm_region_jar, region);
|
||||
if (vma->vm_file)
|
||||
- fput(vma->vm_file);
|
||||
+ vma_fput(vma);
|
||||
if (vma->vm_flags & VM_EXECUTABLE)
|
||||
removed_exe_file_vma(vma->vm_mm);
|
||||
kmem_cache_free(vm_area_cachep, vma);
|
|
@ -1,257 +0,0 @@
|
|||
aufs3.4 standalone patch
|
||||
|
||||
diff --git a/fs/file_table.c b/fs/file_table.c
|
||||
index 70f2a0f..146a3d7 100644
|
||||
--- a/fs/file_table.c
|
||||
+++ b/fs/file_table.c
|
||||
@@ -442,6 +442,8 @@ void file_sb_list_del(struct file *file)
|
||||
}
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(file_sb_list_del);
|
||||
+
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
/*
|
||||
diff --git a/fs/inode.c b/fs/inode.c
|
||||
index 9f4f5fe..bb0f3ba 100644
|
||||
--- a/fs/inode.c
|
||||
+++ b/fs/inode.c
|
||||
@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
|
||||
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
|
||||
|
||||
__cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
|
||||
+EXPORT_SYMBOL(inode_sb_list_lock);
|
||||
|
||||
/*
|
||||
* Empty aops. Can be used for the cases where the user does not
|
||||
diff --git a/fs/namei.c b/fs/namei.c
|
||||
index 7ff959b..b170167 100644
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1835,6 +1835,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
|
||||
{
|
||||
return __lookup_hash(&nd->last, nd->path.dentry, nd);
|
||||
}
|
||||
+EXPORT_SYMBOL(lookup_hash);
|
||||
|
||||
/**
|
||||
* lookup_one_len - filesystem helper to lookup single pathname component
|
||||
diff --git a/fs/namespace.c b/fs/namespace.c
|
||||
index e608199..38fcc2e 100644
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -1339,6 +1339,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(iterate_mounts);
|
||||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff --git a/fs/notify/group.c b/fs/notify/group.c
|
||||
index 63fc294..6f4adca 100644
|
||||
--- a/fs/notify/group.c
|
||||
+++ b/fs/notify/group.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/wait.h>
|
||||
+#include <linux/module.h>
|
||||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -70,6 +71,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
|
||||
if (atomic_dec_and_test(&group->refcnt))
|
||||
fsnotify_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_put_group);
|
||||
|
||||
/*
|
||||
* Create a new fsnotify_group and hold a reference for the group returned.
|
||||
@@ -102,3 +104,4 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
|
||||
|
||||
return group;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_alloc_group);
|
||||
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
|
||||
index f104d56..54f36db 100644
|
||||
--- a/fs/notify/mark.c
|
||||
+++ b/fs/notify/mark.c
|
||||
@@ -112,6 +112,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
|
||||
if (atomic_dec_and_test(&mark->refcnt))
|
||||
mark->free_mark(mark);
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_put_mark);
|
||||
|
||||
/*
|
||||
* Any time a mark is getting freed we end up here.
|
||||
@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
|
||||
if (unlikely(atomic_dec_and_test(&group->num_marks)))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_destroy_mark);
|
||||
|
||||
void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
|
||||
{
|
||||
@@ -278,6 +280,7 @@ err:
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_add_mark);
|
||||
|
||||
/*
|
||||
* clear any marks in a group in which mark->flags & flags is true
|
||||
@@ -333,6 +336,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
|
||||
atomic_set(&mark->refcnt, 1);
|
||||
mark->free_mark = free_mark;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_init_mark);
|
||||
|
||||
static int fsnotify_mark_destroy(void *ignored)
|
||||
{
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index 5720854..ec59242 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(do_truncate);
|
||||
|
||||
static long do_sys_truncate(const char __user *pathname, loff_t length)
|
||||
{
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index f871233..70f5481 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -1108,6 +1108,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL(do_splice_from);
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -1134,6 +1135,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL(do_splice_to);
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff --git a/security/commoncap.c b/security/commoncap.c
|
||||
index 71a166a..5d63aac 100644
|
||||
--- a/security/commoncap.c
|
||||
+++ b/security/commoncap.c
|
||||
@@ -972,3 +972,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(cap_file_mmap);
|
||||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
|
||||
index c43a332..0c37289 100644
|
||||
--- a/security/device_cgroup.c
|
||||
+++ b/security/device_cgroup.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/device_cgroup.h>
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/ctype.h>
|
||||
+#include <linux/export.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -499,6 +500,7 @@ found:
|
||||
|
||||
return -EPERM;
|
||||
}
|
||||
+EXPORT_SYMBOL(__devcgroup_inode_permission);
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index bf619ff..60b996a 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -380,6 +380,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
|
||||
return 0;
|
||||
return security_ops->path_rmdir(dir, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_rmdir);
|
||||
|
||||
int security_path_unlink(struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -396,6 +397,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
|
||||
return 0;
|
||||
return security_ops->path_symlink(dir, dentry, old_name);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_symlink);
|
||||
|
||||
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -404,6 +406,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
|
||||
return 0;
|
||||
return security_ops->path_link(old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_link);
|
||||
|
||||
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
|
||||
struct path *new_dir, struct dentry *new_dentry)
|
||||
@@ -422,6 +425,7 @@ int security_path_truncate(struct path *path)
|
||||
return 0;
|
||||
return security_ops->path_truncate(path);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_truncate);
|
||||
|
||||
int security_path_chmod(struct path *path, umode_t mode)
|
||||
{
|
||||
@@ -429,6 +433,7 @@ int security_path_chmod(struct path *path, umode_t mode)
|
||||
return 0;
|
||||
return security_ops->path_chmod(path, mode);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_chmod);
|
||||
|
||||
int security_path_chown(struct path *path, uid_t uid, gid_t gid)
|
||||
{
|
||||
@@ -436,6 +441,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid)
|
||||
return 0;
|
||||
return security_ops->path_chown(path, uid, gid);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_chown);
|
||||
|
||||
int security_path_chroot(struct path *path)
|
||||
{
|
||||
@@ -512,6 +518,7 @@ int security_inode_readlink(struct dentry *dentry)
|
||||
return 0;
|
||||
return security_ops->inode_readlink(dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_inode_readlink);
|
||||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
|
||||
{
|
||||
@@ -526,6 +533,7 @@ int security_inode_permission(struct inode *inode, int mask)
|
||||
return 0;
|
||||
return security_ops->inode_permission(inode, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_inode_permission);
|
||||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -641,6 +649,7 @@ int security_file_permission(struct file *file, int mask)
|
||||
|
||||
return fsnotify_perm(file, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_file_permission);
|
||||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -668,6 +677,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot,
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_file_mmap);
|
||||
|
||||
int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,
|
||||
unsigned long prot)
|
|
@ -1,119 +0,0 @@
|
|||
From patchwork Tue Oct 27 16:50:21 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v4,
|
||||
1/6] clk: sunxi: Let divs clocks read the base factor clock name from
|
||||
devicetree
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7498741
|
||||
Message-Id: <1445964626-6484-2-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 27 Oct 2015 17:50:21 +0100
|
||||
|
||||
Currently, the sunxi clock driver gets the name for the base factor clock
|
||||
of divs clocks from the name field in factors_data. This prevents reusing
|
||||
of the factor clock for clocks with same properties, but different name.
|
||||
|
||||
This commit makes the divs setup function try to get a name from
|
||||
clock-output-names in the devicetree. It also removes the name field where
|
||||
possible and merges the sun4i PLL5 and PLL6 clocks.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
drivers/clk/sunxi/clk-sunxi.c | 38 +++++++++++++++++++++++++++-----------
|
||||
1 file changed, 27 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
|
||||
index 9c79af0c..270de42 100644
|
||||
--- a/drivers/clk/sunxi/clk-sunxi.c
|
||||
+++ b/drivers/clk/sunxi/clk-sunxi.c
|
||||
@@ -704,21 +704,12 @@ static const struct factors_data sun4i_pll5_data __initconst = {
|
||||
.enable = 31,
|
||||
.table = &sun4i_pll5_config,
|
||||
.getter = sun4i_get_pll5_factors,
|
||||
- .name = "pll5",
|
||||
-};
|
||||
-
|
||||
-static const struct factors_data sun4i_pll6_data __initconst = {
|
||||
- .enable = 31,
|
||||
- .table = &sun4i_pll5_config,
|
||||
- .getter = sun4i_get_pll5_factors,
|
||||
- .name = "pll6",
|
||||
};
|
||||
|
||||
static const struct factors_data sun6i_a31_pll6_data __initconst = {
|
||||
.enable = 31,
|
||||
.table = &sun6i_a31_pll6_config,
|
||||
.getter = sun6i_a31_get_pll6_factors,
|
||||
- .name = "pll6x2",
|
||||
};
|
||||
|
||||
static const struct factors_data sun5i_a13_ahb_data __initconst = {
|
||||
@@ -902,6 +893,7 @@ struct gates_data {
|
||||
|
||||
#define SUNXI_DIVS_MAX_QTY 4
|
||||
#define SUNXI_DIVISOR_WIDTH 2
|
||||
+#define SUNXI_DIVS_BASE_NAME_MAX_LEN 8
|
||||
|
||||
struct divs_data {
|
||||
const struct factors_data *factors; /* data for the factor clock */
|
||||
@@ -941,7 +933,7 @@ static const struct divs_data pll5_divs_data __initconst = {
|
||||
};
|
||||
|
||||
static const struct divs_data pll6_divs_data __initconst = {
|
||||
- .factors = &sun4i_pll6_data,
|
||||
+ .factors = &sun4i_pll5_data,
|
||||
.ndivs = 4,
|
||||
.div = {
|
||||
{ .shift = 0, .table = pll6_sata_tbl, .gate = 14 }, /* M, SATA */
|
||||
@@ -983,6 +975,8 @@ static void __init sunxi_divs_clk_setup(struct device_node *node,
|
||||
struct clk_gate *gate = NULL;
|
||||
struct clk_fixed_factor *fix_factor;
|
||||
struct clk_divider *divider;
|
||||
+ struct factors_data factors = *data->factors;
|
||||
+ char base_name[SUNXI_DIVS_BASE_NAME_MAX_LEN];
|
||||
void __iomem *reg;
|
||||
int ndivs = SUNXI_DIVS_MAX_QTY, i = 0;
|
||||
int flags, clkflags;
|
||||
@@ -991,8 +985,30 @@ static void __init sunxi_divs_clk_setup(struct device_node *node,
|
||||
if (data->ndivs)
|
||||
ndivs = data->ndivs;
|
||||
|
||||
+ /* Try to find a name for base factor clock */
|
||||
+ for (i = 0; i < ndivs; i++) {
|
||||
+ if (data->div[i].self) {
|
||||
+ of_property_read_string_index(node, "clock-output-names",
|
||||
+ i, &factors.name);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ /* If we don't have a .self clk use the first output-name up to '_' */
|
||||
+ if (factors.name == NULL) {
|
||||
+ of_property_read_string_index(node, "clock-output-names",
|
||||
+ 0, &clk_name);
|
||||
+
|
||||
+ for (i = 0; i < SUNXI_DIVS_BASE_NAME_MAX_LEN - 1 &&
|
||||
+ clk_name[i] != '_' &&
|
||||
+ clk_name[i] != '\0'; i++)
|
||||
+ base_name[i] = clk_name[i];
|
||||
+
|
||||
+ base_name[i] = '\0';
|
||||
+ factors.name = base_name;
|
||||
+ }
|
||||
+
|
||||
/* Set up factor clock that we will be dividing */
|
||||
- pclk = sunxi_factors_clk_setup(node, data->factors);
|
||||
+ pclk = sunxi_factors_clk_setup(node, &factors);
|
||||
parent = __clk_get_name(pclk);
|
||||
|
||||
reg = of_iomap(node, 0);
|
|
@ -1,232 +0,0 @@
|
|||
From patchwork Tue Oct 27 16:50:22 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v4,2/6] clk: sunxi: Add H3 clocks support
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7498751
|
||||
Message-Id: <1445964626-6484-3-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 27 Oct 2015 17:50:22 +0100
|
||||
|
||||
The H3 clock control unit is similar to the those of other sun8i family
|
||||
members like the A23.
|
||||
|
||||
It adds a new bus gates clock similar to the simple gates, but with a
|
||||
different parent clock for each single gate.
|
||||
Some of the gates use the new AHB2 clock as parent, whose clock source
|
||||
is muxable between AHB1 and PLL6/2. The documentation isn't totally clear
|
||||
about which devices belong to AHB2 now, especially USB EHIC/OHIC, so it
|
||||
is mostly based on Allwinner kernel source code.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
Documentation/devicetree/bindings/clock/sunxi.txt | 2 +
|
||||
drivers/clk/sunxi/Makefile | 1 +
|
||||
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 111 ++++++++++++++++++++++
|
||||
drivers/clk/sunxi/clk-sunxi.c | 9 +-
|
||||
4 files changed, 122 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/clk/sunxi/clk-sun8i-bus-gates.c
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
|
||||
index 8a47b77..d303dec 100644
|
||||
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
|
||||
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
|
||||
@@ -28,6 +28,7 @@ Required properties:
|
||||
"allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20
|
||||
"allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31
|
||||
"allwinner,sun6i-a31-ahb1-clk" - for the AHB1 clock on A31
|
||||
+ "allwinner,sun8i-h3-ahb2-clk" - for the AHB2 clock on H3
|
||||
"allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31
|
||||
"allwinner,sun8i-a23-ahb1-gates-clk" - for the AHB1 gates on A23
|
||||
"allwinner,sun9i-a80-ahb0-gates-clk" - for the AHB0 gates on A80
|
||||
@@ -55,6 +56,7 @@ Required properties:
|
||||
"allwinner,sun9i-a80-apb1-gates-clk" - for the APB1 gates on A80
|
||||
"allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31
|
||||
"allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23
|
||||
+ "allwinner,sun8i-h3-bus-gates-clk" - for the bus gates on H3
|
||||
"allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13
|
||||
"allwinner,sun4i-a10-mmc-clk" - for the MMC clock
|
||||
"allwinner,sun9i-a80-mmc-clk" - for mmc module clocks on A80
|
||||
diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
|
||||
index cb4c299..f520af6 100644
|
||||
--- a/drivers/clk/sunxi/Makefile
|
||||
+++ b/drivers/clk/sunxi/Makefile
|
||||
@@ -10,6 +10,7 @@ obj-y += clk-a10-pll2.o
|
||||
obj-y += clk-a20-gmac.o
|
||||
obj-y += clk-mod0.o
|
||||
obj-y += clk-simple-gates.o
|
||||
+obj-y += clk-sun8i-bus-gates.o
|
||||
obj-y += clk-sun8i-mbus.o
|
||||
obj-y += clk-sun9i-core.o
|
||||
obj-y += clk-sun9i-mmc.o
|
||||
diff --git a/drivers/clk/sunxi/clk-sun8i-bus-gates.c b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
|
||||
new file mode 100644
|
||||
index 0000000..ad605fa
|
||||
--- /dev/null
|
||||
+++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
|
||||
@@ -0,0 +1,111 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
|
||||
+ *
|
||||
+ * Based on clk-simple-gates.c, which is:
|
||||
+ * Copyright 2015 Maxime Ripard
|
||||
+ *
|
||||
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
+ *
|
||||
+ * This program 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 program 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.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/clk-provider.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/spinlock.h>
|
||||
+
|
||||
+static DEFINE_SPINLOCK(gates_lock);
|
||||
+
|
||||
+static void __init sun8i_h3_bus_gates_init(struct device_node *node)
|
||||
+{
|
||||
+ const char *clocks[] = { "ahb1", "ahb2", "apb1", "apb2" };
|
||||
+ enum { AHB1, AHB2, APB1, APB2 } clk_parent;
|
||||
+ struct clk_onecell_data *clk_data;
|
||||
+ const char *clk_name;
|
||||
+ struct property *prop;
|
||||
+ struct resource res;
|
||||
+ void __iomem *clk_reg;
|
||||
+ void __iomem *reg;
|
||||
+ const __be32 *p;
|
||||
+ int number, i;
|
||||
+ u8 clk_bit;
|
||||
+ u32 index;
|
||||
+
|
||||
+ reg = of_io_request_and_map(node, 0, of_node_full_name(node));
|
||||
+ if (IS_ERR(reg))
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(clocks); i++) {
|
||||
+ index = of_property_match_string(node, "clock-names", clocks[i]);
|
||||
+ if (index < 0)
|
||||
+ return;
|
||||
+
|
||||
+ clocks[i] = of_clk_get_parent_name(node, index);
|
||||
+ }
|
||||
+
|
||||
+ clk_data = kmalloc(sizeof(struct clk_onecell_data), GFP_KERNEL);
|
||||
+ if (!clk_data)
|
||||
+ goto err_unmap;
|
||||
+
|
||||
+ number = of_property_count_u32_elems(node, "clock-indices");
|
||||
+ of_property_read_u32_index(node, "clock-indices", number - 1, &number);
|
||||
+
|
||||
+ clk_data->clks = kcalloc(number + 1, sizeof(struct clk *), GFP_KERNEL);
|
||||
+ if (!clk_data->clks)
|
||||
+ goto err_free_data;
|
||||
+
|
||||
+ i = 0;
|
||||
+ of_property_for_each_u32(node, "clock-indices", prop, p, index) {
|
||||
+ of_property_read_string_index(node, "clock-output-names",
|
||||
+ i, &clk_name);
|
||||
+
|
||||
+ if (index == 17 || (index >= 29 && index <= 31))
|
||||
+ clk_parent = AHB2;
|
||||
+ else if (index <= 63 || index >= 128)
|
||||
+ clk_parent = AHB1;
|
||||
+ else if (index >= 64 && index <= 95)
|
||||
+ clk_parent = APB1;
|
||||
+ else if (index >= 96 && index <= 127)
|
||||
+ clk_parent = APB2;
|
||||
+
|
||||
+ clk_reg = reg + 4 * (index / 32);
|
||||
+ clk_bit = index % 32;
|
||||
+
|
||||
+ clk_data->clks[index] = clk_register_gate(NULL, clk_name,
|
||||
+ clocks[clk_parent], 0,
|
||||
+ clk_reg,
|
||||
+ clk_bit,
|
||||
+ 0, &gates_lock);
|
||||
+ i++;
|
||||
+
|
||||
+ if (IS_ERR(clk_data->clks[index])) {
|
||||
+ WARN_ON(true);
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ clk_data->clk_num = number + 1;
|
||||
+ of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+err_free_data:
|
||||
+ kfree(clk_data);
|
||||
+err_unmap:
|
||||
+ iounmap(reg);
|
||||
+ of_address_to_resource(node, 0, &res);
|
||||
+ release_mem_region(res.start, resource_size(&res));
|
||||
+}
|
||||
+
|
||||
+CLK_OF_DECLARE(sun8i_h3_bus_gates, "allwinner,sun8i-h3-bus-gates-clk",
|
||||
+ sun8i_h3_bus_gates_init);
|
||||
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
|
||||
index 270de42..6293c65 100644
|
||||
--- a/drivers/clk/sunxi/clk-sunxi.c
|
||||
+++ b/drivers/clk/sunxi/clk-sunxi.c
|
||||
@@ -769,6 +769,10 @@ static const struct mux_data sun6i_a31_ahb1_mux_data __initconst = {
|
||||
.shift = 12,
|
||||
};
|
||||
|
||||
+static const struct mux_data sun8i_h3_ahb2_mux_data __initconst = {
|
||||
+ .shift = 0,
|
||||
+};
|
||||
+
|
||||
static void __init sunxi_mux_clk_setup(struct device_node *node,
|
||||
struct mux_data *data)
|
||||
{
|
||||
@@ -945,10 +949,11 @@ static const struct divs_data pll6_divs_data __initconst = {
|
||||
|
||||
static const struct divs_data sun6i_a31_pll6_divs_data __initconst = {
|
||||
.factors = &sun6i_a31_pll6_data,
|
||||
- .ndivs = 2,
|
||||
+ .ndivs = 3,
|
||||
.div = {
|
||||
{ .fixed = 2 }, /* normal output */
|
||||
{ .self = 1 }, /* base factor clock, 2x */
|
||||
+ { .fixed = 4 }, /* divided output, /2 */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1146,6 +1151,7 @@ static const struct of_device_id clk_divs_match[] __initconst = {
|
||||
static const struct of_device_id clk_mux_match[] __initconst = {
|
||||
{.compatible = "allwinner,sun4i-a10-cpu-clk", .data = &sun4i_cpu_mux_data,},
|
||||
{.compatible = "allwinner,sun6i-a31-ahb1-mux-clk", .data = &sun6i_a31_ahb1_mux_data,},
|
||||
+ {.compatible = "allwinner,sun8i-h3-ahb2-clk", .data = &sun8i_h3_ahb2_mux_data,},
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -1228,6 +1234,7 @@ CLK_OF_DECLARE(sun6i_a31_clk_init, "allwinner,sun6i-a31", sun6i_init_clocks);
|
||||
CLK_OF_DECLARE(sun6i_a31s_clk_init, "allwinner,sun6i-a31s", sun6i_init_clocks);
|
||||
CLK_OF_DECLARE(sun8i_a23_clk_init, "allwinner,sun8i-a23", sun6i_init_clocks);
|
||||
CLK_OF_DECLARE(sun8i_a33_clk_init, "allwinner,sun8i-a33", sun6i_init_clocks);
|
||||
+CLK_OF_DECLARE(sun8i_h3_clk_init, "allwinner,sun8i-h3", sun6i_init_clocks);
|
||||
|
||||
static void __init sun9i_init_clocks(struct device_node *node)
|
||||
{
|
|
@ -1,110 +0,0 @@
|
|||
From patchwork Tue Oct 27 16:50:24 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v4,4/6] reset: sunxi: Add Allwinner H3 bus resets
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7498761
|
||||
Message-Id: <1445964626-6484-5-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 27 Oct 2015 17:50:24 +0100
|
||||
|
||||
The H3 bus resets have some holes between the registers, so we add
|
||||
an of_xlate() function to skip them according to the datasheet.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
.../bindings/reset/allwinner,sunxi-clock-reset.txt | 1 +
|
||||
drivers/reset/reset-sunxi.c | 30 +++++++++++++++++++---
|
||||
2 files changed, 28 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
|
||||
index c8f7757..e11f023 100644
|
||||
--- a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
|
||||
+++ b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
|
||||
@@ -8,6 +8,7 @@ Required properties:
|
||||
- compatible: Should be one of the following:
|
||||
"allwinner,sun6i-a31-ahb1-reset"
|
||||
"allwinner,sun6i-a31-clock-reset"
|
||||
+ "allwinner,sun8i-h3-bus-reset"
|
||||
- reg: should be register base and length as documented in the
|
||||
datasheet
|
||||
- #reset-cells: 1, see below
|
||||
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
|
||||
index 3d95c87..c91e146 100644
|
||||
--- a/drivers/reset/reset-sunxi.c
|
||||
+++ b/drivers/reset/reset-sunxi.c
|
||||
@@ -75,7 +75,9 @@ static struct reset_control_ops sunxi_reset_ops = {
|
||||
.deassert = sunxi_reset_deassert,
|
||||
};
|
||||
|
||||
-static int sunxi_reset_init(struct device_node *np)
|
||||
+static int sunxi_reset_init(struct device_node *np,
|
||||
+ int (*of_xlate)(struct reset_controller_dev *rcdev,
|
||||
+ const struct of_phandle_args *reset_spec))
|
||||
{
|
||||
struct sunxi_reset_data *data;
|
||||
struct resource res;
|
||||
@@ -108,6 +110,7 @@ static int sunxi_reset_init(struct device_node *np)
|
||||
data->rcdev.nr_resets = size * 32;
|
||||
data->rcdev.ops = &sunxi_reset_ops;
|
||||
data->rcdev.of_node = np;
|
||||
+ data->rcdev.of_xlate = of_xlate;
|
||||
reset_controller_register(&data->rcdev);
|
||||
|
||||
return 0;
|
||||
@@ -117,6 +120,21 @@ err_alloc:
|
||||
return ret;
|
||||
};
|
||||
|
||||
+static int sun8i_h3_bus_reset_xlate(struct reset_controller_dev *rcdev,
|
||||
+ const struct of_phandle_args *reset_spec)
|
||||
+{
|
||||
+ unsigned int index = reset_spec->args[0];
|
||||
+
|
||||
+ if (index < 96)
|
||||
+ return index;
|
||||
+ else if (index < 128)
|
||||
+ return index + 32;
|
||||
+ else if (index < 160)
|
||||
+ return index + 64;
|
||||
+ else
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* These are the reset controller we need to initialize early on in
|
||||
* our system, before we can even think of using a regular device
|
||||
@@ -124,15 +142,21 @@ err_alloc:
|
||||
*/
|
||||
static const struct of_device_id sunxi_early_reset_dt_ids[] __initdata = {
|
||||
{ .compatible = "allwinner,sun6i-a31-ahb1-reset", },
|
||||
+ { .compatible = "allwinner,sun8i-h3-bus-reset", .data = sun8i_h3_bus_reset_xlate, },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
||||
void __init sun6i_reset_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
+ const struct of_device_id *match;
|
||||
+ int (*of_xlate)(struct reset_controller_dev *rcdev,
|
||||
+ const struct of_phandle_args *reset_spec);
|
||||
|
||||
- for_each_matching_node(np, sunxi_early_reset_dt_ids)
|
||||
- sunxi_reset_init(np);
|
||||
+ for_each_matching_node_and_match(np, sunxi_early_reset_dt_ids, &match) {
|
||||
+ of_xlate = match->data;
|
||||
+ sunxi_reset_init(np, of_xlate);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
|
@ -1,130 +0,0 @@
|
|||
From patchwork Tue Oct 27 16:50:26 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v4,6/6] ARM: dts: sun8i: Add Orange Pi Plus support
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7498771
|
||||
Message-Id: <1445964626-6484-7-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 27 Oct 2015 17:50:26 +0100
|
||||
|
||||
The Orange Pi Plus is a SBC based on the Allwinner H3 SoC
|
||||
with 8GB eMMC, multiple USB ports through a USB hub chip, SATA through
|
||||
a USB-SATA bridge, one uSD slot, a 10/100/1000M ethernet port,
|
||||
WiFi, HDMI, headphone jack, IR receiver, a microphone, a CSI connector
|
||||
and a 40-pin GPIO header.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 77 ++++++++++++++++++++++++++++
|
||||
2 files changed, 79 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 78ade1a..476658d 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -645,7 +645,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
sun8i-a33-ga10h-v1.1.dtb \
|
||||
sun8i-a33-ippo-q8h-v1.2.dtb \
|
||||
sun8i-a33-q8-tablet.dtb \
|
||||
- sun8i-a33-sinlinx-sina33.dtb
|
||||
+ sun8i-a33-sinlinx-sina33.dtb \
|
||||
+ sun8i-h3-orangepi-plus.dtb
|
||||
dtb-$(CONFIG_MACH_SUN9I) += \
|
||||
sun9i-a80-optimus.dtb \
|
||||
sun9i-a80-cubieboard4.dtb
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
|
||||
new file mode 100644
|
||||
index 0000000..e67df59
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.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 "sun8i-h3.dtsi"
|
||||
+#include "sunxi-common-regulators.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi Plus";
|
||||
+ compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -1,592 +0,0 @@
|
|||
From patchwork Tue Oct 27 16:50:23 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v4,3/6] pinctrl: sunxi: Add H3 PIO controller support
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7498831
|
||||
Message-Id: <1445964626-6484-4-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 27 Oct 2015 17:50:23 +0100
|
||||
|
||||
The H3 uses the same pin controller as previous SoC's from Allwinner.
|
||||
Add support for the pins controlled by the main PIO controller.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
|
||||
---
|
||||
.../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 +
|
||||
drivers/pinctrl/sunxi/Kconfig | 4 +
|
||||
drivers/pinctrl/sunxi/Makefile | 1 +
|
||||
drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 516 +++++++++++++++++++++
|
||||
4 files changed, 522 insertions(+)
|
||||
create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
|
||||
index b321b26..e6ba602 100644
|
||||
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
|
||||
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
|
||||
@@ -18,6 +18,7 @@ Required properties:
|
||||
"allwinner,sun8i-a23-r-pinctrl"
|
||||
"allwinner,sun8i-a33-pinctrl"
|
||||
"allwinner,sun8i-a83t-pinctrl"
|
||||
+ "allwinner,sun8i-h3-pinctrl"
|
||||
|
||||
- reg: Should contain the register physical address and length for the
|
||||
pin controller.
|
||||
diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
|
||||
index e68fd95..89ab7f5 100644
|
||||
--- a/drivers/pinctrl/sunxi/Kconfig
|
||||
+++ b/drivers/pinctrl/sunxi/Kconfig
|
||||
@@ -51,6 +51,10 @@ config PINCTRL_SUN8I_A23_R
|
||||
depends on RESET_CONTROLLER
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
+config PINCTRL_SUN8I_H3
|
||||
+ def_bool MACH_SUN8I
|
||||
+ select PINCTRL_SUNXI_COMMON
|
||||
+
|
||||
config PINCTRL_SUN9I_A80
|
||||
def_bool MACH_SUN9I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
diff --git a/drivers/pinctrl/sunxi/Makefile b/drivers/pinctrl/sunxi/Makefile
|
||||
index e080290..6bd818e 100644
|
||||
--- a/drivers/pinctrl/sunxi/Makefile
|
||||
+++ b/drivers/pinctrl/sunxi/Makefile
|
||||
@@ -13,4 +13,5 @@ obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinctrl-sun8i-a23.o
|
||||
obj-$(CONFIG_PINCTRL_SUN8I_A23_R) += pinctrl-sun8i-a23-r.o
|
||||
obj-$(CONFIG_PINCTRL_SUN8I_A33) += pinctrl-sun8i-a33.o
|
||||
obj-$(CONFIG_PINCTRL_SUN8I_A83T) += pinctrl-sun8i-a83t.o
|
||||
+obj-$(CONFIG_PINCTRL_SUN8I_H3) += pinctrl-sun8i-h3.o
|
||||
obj-$(CONFIG_PINCTRL_SUN9I_A80) += pinctrl-sun9i-a80.o
|
||||
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
|
||||
new file mode 100644
|
||||
index 0000000..98d465d
|
||||
--- /dev/null
|
||||
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
|
||||
@@ -0,0 +1,516 @@
|
||||
+/*
|
||||
+ * Allwinner H3 SoCs pinctrl driver.
|
||||
+ *
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
|
||||
+ *
|
||||
+ * Based on pinctrl-sun8i-a23.c, which is:
|
||||
+ * Copyright (C) 2014 Chen-Yu Tsai <wens@csie.org>
|
||||
+ * Copyright (C) 2014 Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
+ *
|
||||
+ * This file is licensed under the terms of the GNU General Public
|
||||
+ * License version 2. This program is licensed "as is" without any
|
||||
+ * warranty of any kind, whether express or implied.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/pinctrl/pinctrl.h>
|
||||
+
|
||||
+#include "pinctrl-sunxi.h"
|
||||
+
|
||||
+static const struct sunxi_desc_pin sun8i_h3_pins[] = {
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* TX */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* MS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* RX */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* CK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* RTS */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* DO */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* CTS */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* DI */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart0"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart0"), /* RX */
|
||||
+ SUNXI_FUNCTION(0x3, "pwm0"),
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)), /* PA_EINT5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* PWREN */
|
||||
+ SUNXI_FUNCTION(0x3, "pwm1"),
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* CLK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* DATA */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)), /* PA_EINT8 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* RST */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)), /* PA_EINT9 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* DET */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)), /* PA_EINT10 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2c0"), /* SCK */
|
||||
+ SUNXI_FUNCTION(0x3, "di"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 11)), /* PA_EINT11 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2c0"), /* SDA */
|
||||
+ SUNXI_FUNCTION(0x3, "di"), /* RX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 12)), /* PA_EINT12 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* CS */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 13)), /* PA_EINT13 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* RX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PA_EINT14 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* CTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spdif"), /* OUT */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* SYNC */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c1"), /* SCK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)), /* PA_EINT18 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* CLK */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c1"), /* SDA */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 19)), /* PA_EINT19 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 20),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* DOUT */
|
||||
+ SUNXI_FUNCTION(0x3, "sim"), /* VPPEN */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 20)), /* PA_EINT20 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 21),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* DIN */
|
||||
+ SUNXI_FUNCTION(0x3, "sim"), /* VPPPP */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 21)), /* PA_EINT21 */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* WE */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* ALE */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* CLE */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* CLK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* CE1 */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* CS */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* RE */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0")), /* RB1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand"), /* DQ6 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand"), /* DQ7 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand"), /* DQS */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* RST */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXCK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXCTL/RCDV */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXERR */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD2L */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* CRS */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXCK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXCTL/TXEN */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXERR */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* CLKIN/COL */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* MDC */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* MDIO */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* PCLK */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* CLK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* MCLK */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* ERR */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* SYNC */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* DVLD */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D0 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D1 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D2 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D3 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D4 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D5 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D6 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D7 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* SCK */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c2")), /* SCK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* SDA */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c2")), /* SDA */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* MS */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* DI */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
|
||||
+ SUNXI_FUNCTION(0x3, "uart0")), /* TX */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* DO */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
|
||||
+ SUNXI_FUNCTION(0x3, "uart0")), /* RX */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* CK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0")), /* DET */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 0)), /* PG_EINT0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 1)), /* PG_EINT1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 2)), /* PG_EINT2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 3)), /* PG_EINT3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 4)), /* PG_EINT4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 5)), /* PG_EINT5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 6)), /* PG_EINT6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* RX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 7)), /* PG_EINT7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* RTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 8)), /* PG_EINT8 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* CTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 9)), /* PG_EINT9 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* SYNC */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 10)), /* PG_EINT10 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* CLK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 11)), /* PG_EINT11 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* DOUT */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 12)), /* PG_EINT12 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* DIN */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 13)), /* PG_EINT13 */
|
||||
+};
|
||||
+
|
||||
+static const struct sunxi_pinctrl_desc sun8i_h3_pinctrl_data = {
|
||||
+ .pins = sun8i_h3_pins,
|
||||
+ .npins = ARRAY_SIZE(sun8i_h3_pins),
|
||||
+ .irq_banks = 2,
|
||||
+};
|
||||
+
|
||||
+static int sun8i_h3_pinctrl_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ return sunxi_pinctrl_init(pdev,
|
||||
+ &sun8i_h3_pinctrl_data);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id sun8i_h3_pinctrl_match[] = {
|
||||
+ { .compatible = "allwinner,sun8i-h3-pinctrl", },
|
||||
+ {}
|
||||
+};
|
||||
+
|
||||
+static struct platform_driver sun8i_h3_pinctrl_driver = {
|
||||
+ .probe = sun8i_h3_pinctrl_probe,
|
||||
+ .driver = {
|
||||
+ .name = "sun8i-h3-pinctrl",
|
||||
+ .of_match_table = sun8i_h3_pinctrl_match,
|
||||
+ },
|
||||
+};
|
||||
+builtin_platform_driver(sun8i_h3_pinctrl_driver);
|
|
@ -1,517 +0,0 @@
|
|||
From patchwork Tue Oct 27 16:50:25 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v4,5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7498891
|
||||
Message-Id: <1445964626-6484-6-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 27 Oct 2015 17:50:25 +0100
|
||||
|
||||
The Allwinner H3 is a home entertainment system oriented SoC with
|
||||
four Cortex-A7 cores and a Mali-400MP2 GPU.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/sun8i-h3.dtsi | 482 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 482 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..c18b5f7
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
@@ -0,0 +1,482 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.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 "skeleton.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+
|
||||
+/ {
|
||||
+ interrupt-parent = <&gic>;
|
||||
+
|
||||
+ cpus {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ cpu@0 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ cpu@1 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+
|
||||
+ cpu@2 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <2>;
|
||||
+ };
|
||||
+
|
||||
+ cpu@3 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <3>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ timer {
|
||||
+ compatible = "arm,armv7-timer";
|
||||
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
+ clock-frequency = <24000000>;
|
||||
+ arm,cpu-registers-not-fw-configured;
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x40000000 0x80000000>;
|
||||
+ };
|
||||
+
|
||||
+ clocks {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+
|
||||
+ osc24M: osc24M_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <24000000>;
|
||||
+ clock-output-names = "osc24M";
|
||||
+ };
|
||||
+
|
||||
+ osc32k: osc32k_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <32768>;
|
||||
+ clock-output-names = "osc32k";
|
||||
+ };
|
||||
+
|
||||
+ pll1: clk@01c20000 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-a23-pll1-clk";
|
||||
+ reg = <0x01c20000 0x4>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ clock-output-names = "pll1";
|
||||
+ };
|
||||
+
|
||||
+ /* dummy clock until actually implemented */
|
||||
+ pll5: pll5_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <0>;
|
||||
+ clock-output-names = "pll5";
|
||||
+ };
|
||||
+
|
||||
+ pll6: clk@01c20028 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun6i-a31-pll6-clk";
|
||||
+ reg = <0x01c20028 0x4>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ clock-output-names = "pll6", "pll6x2", "pll6d2";
|
||||
+ };
|
||||
+
|
||||
+ pll8: clk@01c20044 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun6i-a31-pll6-clk";
|
||||
+ reg = <0x01c20044 0x4>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ clock-output-names = "pll8", "pll8x2";
|
||||
+ };
|
||||
+
|
||||
+ cpu: cpu_clk@01c20050 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-cpu-clk";
|
||||
+ reg = <0x01c20050 0x4>;
|
||||
+ clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
|
||||
+ clock-output-names = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ axi: axi_clk@01c20050 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-axi-clk";
|
||||
+ reg = <0x01c20050 0x4>;
|
||||
+ clocks = <&cpu>;
|
||||
+ clock-output-names = "axi";
|
||||
+ };
|
||||
+
|
||||
+ ahb1: ahb1_clk@01c20054 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun6i-a31-ahb1-clk";
|
||||
+ reg = <0x01c20054 0x4>;
|
||||
+ clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
|
||||
+ clock-output-names = "ahb1";
|
||||
+ };
|
||||
+
|
||||
+ ahb2: ahb2_clk@01c2005c {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-h3-ahb2-clk";
|
||||
+ reg = <0x01c2005c 0x4>;
|
||||
+ clocks = <&ahb1>, <&pll6 2>;
|
||||
+ clock-output-names = "ahb2";
|
||||
+ };
|
||||
+
|
||||
+ apb1: apb1_clk@01c20054 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-apb0-clk";
|
||||
+ reg = <0x01c20054 0x4>;
|
||||
+ clocks = <&ahb1>;
|
||||
+ clock-output-names = "apb1";
|
||||
+ };
|
||||
+
|
||||
+ apb2: apb2_clk@01c20058 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-apb1-clk";
|
||||
+ reg = <0x01c20058 0x4>;
|
||||
+ clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
|
||||
+ clock-output-names = "apb2";
|
||||
+ };
|
||||
+
|
||||
+ bus_gates: clk@01c20060 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun8i-h3-bus-gates-clk";
|
||||
+ reg = <0x01c20060 0x14>;
|
||||
+ clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
|
||||
+ clock-names = "ahb1", "ahb2", "apb1", "apb2";
|
||||
+ clock-indices = <5>, <6>, <8>,
|
||||
+ <9>, <10>, <13>,
|
||||
+ <14>, <17>, <18>,
|
||||
+ <19>, <20>,
|
||||
+ <21>, <23>,
|
||||
+ <24>, <25>,
|
||||
+ <26>, <27>,
|
||||
+ <28>, <29>,
|
||||
+ <30>, <31>, <32>,
|
||||
+ <35>, <36>, <37>,
|
||||
+ <40>, <41>, <43>,
|
||||
+ <44>, <52>, <53>,
|
||||
+ <54>, <64>,
|
||||
+ <65>, <69>, <72>,
|
||||
+ <76>, <77>, <78>,
|
||||
+ <96>, <97>, <98>,
|
||||
+ <112>, <113>,
|
||||
+ <114>, <115>, <116>,
|
||||
+ <128>, <135>;
|
||||
+ clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
|
||||
+ "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
|
||||
+ "ahb1_sdram", "ahb2_gmac", "ahb1_ts",
|
||||
+ "ahb1_hstimer", "ahb1_spi0",
|
||||
+ "ahb1_spi1", "ahb1_otg",
|
||||
+ "ahb1_otg_ehci0", "ahb1_ehic1",
|
||||
+ "ahb1_ehic2", "ahb1_ehic3",
|
||||
+ "ahb1_otg_ohci0", "ahb2_ohic1",
|
||||
+ "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
|
||||
+ "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
|
||||
+ "ahb1_csi", "ahb1_tve", "ahb1_hdmi",
|
||||
+ "ahb1_de", "ahb1_gpu", "ahb1_msgbox",
|
||||
+ "ahb1_spinlock", "apb1_codec",
|
||||
+ "apb1_spdif", "apb1_pio", "apb1_ths",
|
||||
+ "apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
|
||||
+ "apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
|
||||
+ "apb2_uart0", "apb2_uart1",
|
||||
+ "apb2_uart2", "apb2_uart3", "apb2_scr",
|
||||
+ "ahb1_ephy", "ahb1_dbg";
|
||||
+ };
|
||||
+
|
||||
+ mmc0_clk: clk@01c20088 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun4i-a10-mmc-clk";
|
||||
+ reg = <0x01c20088 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
|
||||
+ clock-output-names = "mmc0",
|
||||
+ "mmc0_output",
|
||||
+ "mmc0_sample";
|
||||
+ };
|
||||
+
|
||||
+ mmc1_clk: clk@01c2008c {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun4i-a10-mmc-clk";
|
||||
+ reg = <0x01c2008c 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
|
||||
+ clock-output-names = "mmc1",
|
||||
+ "mmc1_output",
|
||||
+ "mmc1_sample";
|
||||
+ };
|
||||
+
|
||||
+ mmc2_clk: clk@01c20090 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun4i-a10-mmc-clk";
|
||||
+ reg = <0x01c20090 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
|
||||
+ clock-output-names = "mmc2",
|
||||
+ "mmc2_output",
|
||||
+ "mmc2_sample";
|
||||
+ };
|
||||
+
|
||||
+ mbus_clk: clk@01c2015c {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-a23-mbus-clk";
|
||||
+ reg = <0x01c2015c 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 1>, <&pll5>;
|
||||
+ clock-output-names = "mbus";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ soc {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+
|
||||
+ dma: dma-controller@01c02000 {
|
||||
+ compatible = "allwinner,sun8i-h3-dma";
|
||||
+ reg = <0x01c02000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&bus_gates 6>;
|
||||
+ resets = <&bus_rst 6>;
|
||||
+ #dma-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0: mmc@01c0f000 {
|
||||
+ compatible = "allwinner,sun5i-a13-mmc";
|
||||
+ reg = <0x01c0f000 0x1000>;
|
||||
+ clocks = <&bus_gates 8>,
|
||||
+ <&mmc0_clk 0>,
|
||||
+ <&mmc0_clk 1>,
|
||||
+ <&mmc0_clk 2>;
|
||||
+ clock-names = "ahb",
|
||||
+ "mmc",
|
||||
+ "output",
|
||||
+ "sample";
|
||||
+ resets = <&bus_rst 8>;
|
||||
+ reset-names = "ahb";
|
||||
+ interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ status = "disabled";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ mmc1: mmc@01c10000 {
|
||||
+ compatible = "allwinner,sun5i-a13-mmc";
|
||||
+ reg = <0x01c10000 0x1000>;
|
||||
+ clocks = <&bus_gates 9>,
|
||||
+ <&mmc1_clk 0>,
|
||||
+ <&mmc1_clk 1>,
|
||||
+ <&mmc1_clk 2>;
|
||||
+ clock-names = "ahb",
|
||||
+ "mmc",
|
||||
+ "output",
|
||||
+ "sample";
|
||||
+ resets = <&bus_rst 9>;
|
||||
+ reset-names = "ahb";
|
||||
+ interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ status = "disabled";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ mmc2: mmc@01c11000 {
|
||||
+ compatible = "allwinner,sun5i-a13-mmc";
|
||||
+ reg = <0x01c11000 0x1000>;
|
||||
+ clocks = <&bus_gates 10>,
|
||||
+ <&mmc2_clk 0>,
|
||||
+ <&mmc2_clk 1>,
|
||||
+ <&mmc2_clk 2>;
|
||||
+ clock-names = "ahb",
|
||||
+ "mmc",
|
||||
+ "output",
|
||||
+ "sample";
|
||||
+ resets = <&bus_rst 10>;
|
||||
+ reset-names = "ahb";
|
||||
+ interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ status = "disabled";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ pio: pinctrl@01c20800 {
|
||||
+ compatible = "allwinner,sun8i-h3-pinctrl";
|
||||
+ reg = <0x01c20800 0x400>;
|
||||
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&bus_gates 69>;
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <3>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+
|
||||
+ uart0_pins_a: uart0@0 {
|
||||
+ allwinner,pins = "PA4", "PA5";
|
||||
+ allwinner,function = "uart0";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0_pins_a: mmc0@0 {
|
||||
+ allwinner,pins = "PF0", "PF1", "PF2", "PF3",
|
||||
+ "PF4", "PF5";
|
||||
+ allwinner,function = "mmc0";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0_cd_pin: mmc0_cd_pin@0 {
|
||||
+ allwinner,pins = "PF6";
|
||||
+ allwinner,function = "gpio_in";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
+ };
|
||||
+
|
||||
+ mmc1_pins_a: mmc1@0 {
|
||||
+ allwinner,pins = "PG0", "PG1", "PG2", "PG3",
|
||||
+ "PG4", "PG5";
|
||||
+ allwinner,function = "mmc1";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ bus_rst: reset@01c202c0 {
|
||||
+ #reset-cells = <1>;
|
||||
+ compatible = "allwinner,sun8i-h3-bus-reset";
|
||||
+ reg = <0x01c202c0 0x1c>;
|
||||
+ };
|
||||
+
|
||||
+ timer@01c20c00 {
|
||||
+ compatible = "allwinner,sun4i-a10-timer";
|
||||
+ reg = <0x01c20c00 0xa0>;
|
||||
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ };
|
||||
+
|
||||
+ wdt0: watchdog@01c20ca0 {
|
||||
+ compatible = "allwinner,sun6i-a31-wdt";
|
||||
+ reg = <0x01c20ca0 0x20>;
|
||||
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ uart0: serial@01c28000 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28000 0x400>;
|
||||
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 112>;
|
||||
+ resets = <&bus_rst 144>;
|
||||
+ dmas = <&dma 6>, <&dma 6>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ uart1: serial@01c28400 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28400 0x400>;
|
||||
+ interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 113>;
|
||||
+ resets = <&bus_rst 145>;
|
||||
+ dmas = <&dma 7>, <&dma 7>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ uart2: serial@01c28800 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28800 0x400>;
|
||||
+ interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 114>;
|
||||
+ resets = <&bus_rst 146>;
|
||||
+ dmas = <&dma 8>, <&dma 8>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ uart3: serial@01c28c00 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28c00 0x400>;
|
||||
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 115>;
|
||||
+ resets = <&bus_rst 147>;
|
||||
+ dmas = <&dma 9>, <&dma 9>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ gic: interrupt-controller@01c81000 {
|
||||
+ compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
|
||||
+ reg = <0x01c81000 0x1000>,
|
||||
+ <0x01c82000 0x1000>,
|
||||
+ <0x01c84000 0x2000>,
|
||||
+ <0x01c86000 0x2000>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <3>;
|
||||
+ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
+ };
|
||||
+
|
||||
+ rtc: rtc@01f00000 {
|
||||
+ compatible = "allwinner,sun6i-a31-rtc";
|
||||
+ reg = <0x01f00000 0x54>;
|
||||
+ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,226 +0,0 @@
|
|||
From patchwork Wed Oct 21 16:13:23 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [2/6] clk: sunxi: Add H3 clocks support
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7458441
|
||||
Message-Id: <1445444007-4260-3-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Mike Turquette <mturquette@linaro.org>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 21 Oct 2015 18:13:23 +0200
|
||||
|
||||
The H3 clock control unit is similar to the those of other sun8i family
|
||||
members like the A23.
|
||||
|
||||
It adds a new bus gates clock similar to the simple gates, but with a
|
||||
different parent clock for each single gate.
|
||||
Some of the gates use the new AHB2 clock as parent, whose clock source
|
||||
is muxable between AHB1 and PLL6/2. The documentation isn't totally clear
|
||||
about which devices belong to AHB2 now, especially USB EHIC/OHIC, so it
|
||||
is mostly based on Allwinner kernel source code.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
Documentation/devicetree/bindings/clock/sunxi.txt | 2 +
|
||||
drivers/clk/sunxi/Makefile | 1 +
|
||||
drivers/clk/sunxi/clk-bus-gates.c | 105 ++++++++++++++++++++++
|
||||
drivers/clk/sunxi/clk-sunxi.c | 12 ++-
|
||||
4 files changed, 117 insertions(+), 3 deletions(-)
|
||||
create mode 100644 drivers/clk/sunxi/clk-bus-gates.c
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
|
||||
index 8a47b77..d303dec 100644
|
||||
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
|
||||
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
|
||||
@@ -28,6 +28,7 @@ Required properties:
|
||||
"allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20
|
||||
"allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31
|
||||
"allwinner,sun6i-a31-ahb1-clk" - for the AHB1 clock on A31
|
||||
+ "allwinner,sun8i-h3-ahb2-clk" - for the AHB2 clock on H3
|
||||
"allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31
|
||||
"allwinner,sun8i-a23-ahb1-gates-clk" - for the AHB1 gates on A23
|
||||
"allwinner,sun9i-a80-ahb0-gates-clk" - for the AHB0 gates on A80
|
||||
@@ -55,6 +56,7 @@ Required properties:
|
||||
"allwinner,sun9i-a80-apb1-gates-clk" - for the APB1 gates on A80
|
||||
"allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31
|
||||
"allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23
|
||||
+ "allwinner,sun8i-h3-bus-gates-clk" - for the bus gates on H3
|
||||
"allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13
|
||||
"allwinner,sun4i-a10-mmc-clk" - for the MMC clock
|
||||
"allwinner,sun9i-a80-mmc-clk" - for mmc module clocks on A80
|
||||
diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
|
||||
index f5a35b8..ecaff7f 100644
|
||||
--- a/drivers/clk/sunxi/Makefile
|
||||
+++ b/drivers/clk/sunxi/Makefile
|
||||
@@ -5,6 +5,7 @@
|
||||
obj-y += clk-sunxi.o clk-factors.o
|
||||
obj-y += clk-a10-hosc.o
|
||||
obj-y += clk-a20-gmac.o
|
||||
+obj-y += clk-bus-gates.o
|
||||
obj-y += clk-mod0.o
|
||||
obj-y += clk-simple-gates.o
|
||||
obj-y += clk-sun8i-mbus.o
|
||||
diff --git a/drivers/clk/sunxi/clk-bus-gates.c b/drivers/clk/sunxi/clk-bus-gates.c
|
||||
new file mode 100644
|
||||
index 0000000..5bba0b9
|
||||
--- /dev/null
|
||||
+++ b/drivers/clk/sunxi/clk-bus-gates.c
|
||||
@@ -0,0 +1,105 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
|
||||
+ *
|
||||
+ * Based on clk-simple-gates.c, which is:
|
||||
+ * Copyright 2015 Maxime Ripard
|
||||
+ *
|
||||
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
+ *
|
||||
+ * This program 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 program 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.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/clk-provider.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/spinlock.h>
|
||||
+
|
||||
+static DEFINE_SPINLOCK(gates_lock);
|
||||
+
|
||||
+static void __init sunxi_bus_gates_setup(struct device_node *node,
|
||||
+ const int protected[],
|
||||
+ int nprotected)
|
||||
+{
|
||||
+ struct clk_onecell_data *clk_data;
|
||||
+ const char *clk_parent, *clk_name;
|
||||
+ struct property *prop;
|
||||
+ struct resource res;
|
||||
+ void __iomem *clk_reg;
|
||||
+ void __iomem *reg;
|
||||
+ const __be32 *p;
|
||||
+ int number, i = 0, j;
|
||||
+ u8 clk_bit;
|
||||
+ u32 index;
|
||||
+
|
||||
+ reg = of_io_request_and_map(node, 0, of_node_full_name(node));
|
||||
+ if (IS_ERR(reg))
|
||||
+ return;
|
||||
+
|
||||
+ clk_data = kmalloc(sizeof(struct clk_onecell_data), GFP_KERNEL);
|
||||
+ if (!clk_data)
|
||||
+ goto err_unmap;
|
||||
+
|
||||
+ number = of_property_count_u32_elems(node, "clock-indices");
|
||||
+ of_property_read_u32_index(node, "clock-indices", number - 1, &number);
|
||||
+
|
||||
+ clk_data->clks = kcalloc(number + 1, sizeof(struct clk *), GFP_KERNEL);
|
||||
+ if (!clk_data->clks)
|
||||
+ goto err_free_data;
|
||||
+
|
||||
+ of_property_for_each_u32(node, "clock-indices", prop, p, index) {
|
||||
+ of_property_read_string_index(node, "clock-output-names",
|
||||
+ i, &clk_name);
|
||||
+
|
||||
+ clk_parent = of_clk_get_parent_name(node, i);
|
||||
+
|
||||
+ clk_reg = reg + 4 * (index / 32);
|
||||
+ clk_bit = index % 32;
|
||||
+
|
||||
+ clk_data->clks[index] = clk_register_gate(NULL, clk_name,
|
||||
+ clk_parent, 0,
|
||||
+ clk_reg,
|
||||
+ clk_bit,
|
||||
+ 0, &gates_lock);
|
||||
+ i++;
|
||||
+
|
||||
+ if (IS_ERR(clk_data->clks[index])) {
|
||||
+ WARN_ON(true);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ for (j = 0; j < nprotected; j++)
|
||||
+ if (protected[j] == index)
|
||||
+ clk_prepare_enable(clk_data->clks[index]);
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ clk_data->clk_num = number + 1;
|
||||
+ of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+err_free_data:
|
||||
+ kfree(clk_data);
|
||||
+err_unmap:
|
||||
+ iounmap(reg);
|
||||
+ of_address_to_resource(node, 0, &res);
|
||||
+ release_mem_region(res.start, resource_size(&res));
|
||||
+}
|
||||
+
|
||||
+static void __init sunxi_bus_gates_init(struct device_node *node)
|
||||
+{
|
||||
+ sunxi_bus_gates_setup(node, NULL, 0);
|
||||
+}
|
||||
+
|
||||
+CLK_OF_DECLARE(sun8i_h3_bus_gates, "allwinner,sun8i-h3-bus-gates-clk",
|
||||
+ sunxi_bus_gates_init);
|
||||
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
|
||||
index 7c4aee0..6293c65 100644
|
||||
--- a/drivers/clk/sunxi/clk-sunxi.c
|
||||
+++ b/drivers/clk/sunxi/clk-sunxi.c
|
||||
@@ -769,6 +769,10 @@ static const struct mux_data sun6i_a31_ahb1_mux_data __initconst = {
|
||||
.shift = 12,
|
||||
};
|
||||
|
||||
+static const struct mux_data sun8i_h3_ahb2_mux_data __initconst = {
|
||||
+ .shift = 0,
|
||||
+};
|
||||
+
|
||||
static void __init sunxi_mux_clk_setup(struct device_node *node,
|
||||
struct mux_data *data)
|
||||
{
|
||||
@@ -945,10 +949,11 @@ static const struct divs_data pll6_divs_data __initconst = {
|
||||
|
||||
static const struct divs_data sun6i_a31_pll6_divs_data __initconst = {
|
||||
.factors = &sun6i_a31_pll6_data,
|
||||
- .ndivs = 2,
|
||||
+ .ndivs = 3,
|
||||
.div = {
|
||||
{ .fixed = 2 }, /* normal output */
|
||||
{ .self = 1 }, /* base factor clock, 2x */
|
||||
+ { .fixed = 4 }, /* divided output, /2 */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1147,6 +1151,7 @@ static const struct of_device_id clk_divs_match[] __initconst = {
|
||||
static const struct of_device_id clk_mux_match[] __initconst = {
|
||||
{.compatible = "allwinner,sun4i-a10-cpu-clk", .data = &sun4i_cpu_mux_data,},
|
||||
{.compatible = "allwinner,sun6i-a31-ahb1-mux-clk", .data = &sun6i_a31_ahb1_mux_data,},
|
||||
+ {.compatible = "allwinner,sun8i-h3-ahb2-clk", .data = &sun8i_h3_ahb2_mux_data,},
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -1229,6 +1234,7 @@ CLK_OF_DECLARE(sun6i_a31_clk_init, "allwinner,sun6i-a31", sun6i_init_clocks);
|
||||
CLK_OF_DECLARE(sun6i_a31s_clk_init, "allwinner,sun6i-a31s", sun6i_init_clocks);
|
||||
CLK_OF_DECLARE(sun8i_a23_clk_init, "allwinner,sun8i-a23", sun6i_init_clocks);
|
||||
CLK_OF_DECLARE(sun8i_a33_clk_init, "allwinner,sun8i-a33", sun6i_init_clocks);
|
||||
+CLK_OF_DECLARE(sun8i_h3_clk_init, "allwinner,sun8i-h3", sun6i_init_clocks);
|
||||
|
||||
static void __init sun9i_init_clocks(struct device_node *node)
|
||||
{
|
|
@ -1,119 +0,0 @@
|
|||
From patchwork Wed Oct 21 16:13:22 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [1/6] clk: sunxi: Let divs clocks read the base factor clock name
|
||||
from devicetree
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7458451
|
||||
Message-Id: <1445444007-4260-2-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Mike Turquette <mturquette@linaro.org>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 21 Oct 2015 18:13:22 +0200
|
||||
|
||||
Currently, the sunxi clock driver gets the name for the base factor clock
|
||||
of divs clocks from the name field in factors_data. This prevents reusing
|
||||
of the factor clock for clocks with same properties, but different name.
|
||||
|
||||
This commit makes the divs setup function try to get a name from
|
||||
clock-output-names in the devicetree. It also removes the name field where
|
||||
possible and merges the sun4i PLL5 and PLL6 clocks.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
drivers/clk/sunxi/clk-sunxi.c | 39 ++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 28 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
|
||||
index 9c79af0c..7c4aee0 100644
|
||||
--- a/drivers/clk/sunxi/clk-sunxi.c
|
||||
+++ b/drivers/clk/sunxi/clk-sunxi.c
|
||||
@@ -704,21 +704,12 @@ static const struct factors_data sun4i_pll5_data __initconst = {
|
||||
.enable = 31,
|
||||
.table = &sun4i_pll5_config,
|
||||
.getter = sun4i_get_pll5_factors,
|
||||
- .name = "pll5",
|
||||
-};
|
||||
-
|
||||
-static const struct factors_data sun4i_pll6_data __initconst = {
|
||||
- .enable = 31,
|
||||
- .table = &sun4i_pll5_config,
|
||||
- .getter = sun4i_get_pll5_factors,
|
||||
- .name = "pll6",
|
||||
};
|
||||
|
||||
static const struct factors_data sun6i_a31_pll6_data __initconst = {
|
||||
.enable = 31,
|
||||
.table = &sun6i_a31_pll6_config,
|
||||
.getter = sun6i_a31_get_pll6_factors,
|
||||
- .name = "pll6x2",
|
||||
};
|
||||
|
||||
static const struct factors_data sun5i_a13_ahb_data __initconst = {
|
||||
@@ -902,6 +893,7 @@ struct gates_data {
|
||||
|
||||
#define SUNXI_DIVS_MAX_QTY 4
|
||||
#define SUNXI_DIVISOR_WIDTH 2
|
||||
+#define SUNXI_DIVS_BASE_NAME_MAX_LEN 8
|
||||
|
||||
struct divs_data {
|
||||
const struct factors_data *factors; /* data for the factor clock */
|
||||
@@ -941,7 +933,7 @@ static const struct divs_data pll5_divs_data __initconst = {
|
||||
};
|
||||
|
||||
static const struct divs_data pll6_divs_data __initconst = {
|
||||
- .factors = &sun4i_pll6_data,
|
||||
+ .factors = &sun4i_pll5_data,
|
||||
.ndivs = 4,
|
||||
.div = {
|
||||
{ .shift = 0, .table = pll6_sata_tbl, .gate = 14 }, /* M, SATA */
|
||||
@@ -983,6 +975,8 @@ static void __init sunxi_divs_clk_setup(struct device_node *node,
|
||||
struct clk_gate *gate = NULL;
|
||||
struct clk_fixed_factor *fix_factor;
|
||||
struct clk_divider *divider;
|
||||
+ struct factors_data factors = *data->factors;
|
||||
+ char base_name[SUNXI_DIVS_BASE_NAME_MAX_LEN];
|
||||
void __iomem *reg;
|
||||
int ndivs = SUNXI_DIVS_MAX_QTY, i = 0;
|
||||
int flags, clkflags;
|
||||
@@ -991,8 +985,31 @@ static void __init sunxi_divs_clk_setup(struct device_node *node,
|
||||
if (data->ndivs)
|
||||
ndivs = data->ndivs;
|
||||
|
||||
+ /* Try to find a name for base factor clock */
|
||||
+ for (i = 0; i < ndivs; i++) {
|
||||
+ if (data->div[i].self) {
|
||||
+ of_property_read_string_index(node, "clock-output-names",
|
||||
+ i, &factors.name);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ /* If we don't have a .self clk use the first output-name up to '_' */
|
||||
+ if (factors.name == NULL) {
|
||||
+ of_property_read_string_index(node, "clock-output-names",
|
||||
+ 0, &clk_name);
|
||||
+
|
||||
+ for (i = 0; i < SUNXI_DIVS_BASE_NAME_MAX_LEN - 1 &&
|
||||
+ clk_name[i] != '_' &&
|
||||
+ clk_name[i] != '\0'; i++) {
|
||||
+ base_name[i] = clk_name[i];
|
||||
+ }
|
||||
+
|
||||
+ base_name[i] = '\0';
|
||||
+ factors.name = base_name;
|
||||
+ }
|
||||
+
|
||||
/* Set up factor clock that we will be dividing */
|
||||
- pclk = sunxi_factors_clk_setup(node, data->factors);
|
||||
+ pclk = sunxi_factors_clk_setup(node, &factors);
|
||||
parent = __clk_get_name(pclk);
|
||||
|
||||
reg = of_iomap(node, 0);
|
|
@ -1,55 +0,0 @@
|
|||
From patchwork Wed Oct 21 16:20:26 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [4/6] reset: sunxi: Add compatible for Allwinner H3 bus resets
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7458631
|
||||
Message-Id: <1445444428-4652-1-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 21 Oct 2015 18:20:26 +0200
|
||||
|
||||
Adding a new compatible allows us to define SoC specific behaviour
|
||||
if necessary, for example forcing a particular device out of reset
|
||||
even if no driver is actually using it.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
|
||||
---
|
||||
Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt | 1 +
|
||||
drivers/reset/reset-sunxi.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
|
||||
index c8f7757..e11f023 100644
|
||||
--- a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
|
||||
+++ b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
|
||||
@@ -8,6 +8,7 @@ Required properties:
|
||||
- compatible: Should be one of the following:
|
||||
"allwinner,sun6i-a31-ahb1-reset"
|
||||
"allwinner,sun6i-a31-clock-reset"
|
||||
+ "allwinner,sun8i-h3-bus-reset"
|
||||
- reg: should be register base and length as documented in the
|
||||
datasheet
|
||||
- #reset-cells: 1, see below
|
||||
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
|
||||
index 3d95c87..6f12b5c 100644
|
||||
--- a/drivers/reset/reset-sunxi.c
|
||||
+++ b/drivers/reset/reset-sunxi.c
|
||||
@@ -124,6 +124,7 @@ err_alloc:
|
||||
*/
|
||||
static const struct of_device_id sunxi_early_reset_dt_ids[] __initdata = {
|
||||
{ .compatible = "allwinner,sun6i-a31-ahb1-reset", },
|
||||
+ { .compatible = "allwinner,sun8i-h3-bus-reset", },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
|
@ -1,534 +0,0 @@
|
|||
From patchwork Wed Oct 21 16:20:27 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7458651
|
||||
Message-Id: <1445444428-4652-2-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 21 Oct 2015 18:20:27 +0200
|
||||
|
||||
The Allwinner H3 is a home entertainment system oriented SoC with
|
||||
four Cortex-A7 cores and a Mali-400MP2 GPU.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/sun8i-h3.dtsi | 499 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 499 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..4114e17
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
@@ -0,0 +1,499 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.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 "skeleton.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+
|
||||
+/ {
|
||||
+ interrupt-parent = <&gic>;
|
||||
+
|
||||
+ cpus {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ cpu@0 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ cpu@1 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+
|
||||
+ cpu@2 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <2>;
|
||||
+ };
|
||||
+
|
||||
+ cpu@3 {
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <3>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ timer {
|
||||
+ compatible = "arm,armv7-timer";
|
||||
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
+ clock-frequency = <24000000>;
|
||||
+ arm,cpu-registers-not-fw-configured;
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x40000000 0x80000000>;
|
||||
+ };
|
||||
+
|
||||
+ clocks {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+
|
||||
+ osc24M: osc24M_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <24000000>;
|
||||
+ clock-output-names = "osc24M";
|
||||
+ };
|
||||
+
|
||||
+ osc32k: osc32k_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <32768>;
|
||||
+ clock-output-names = "osc32k";
|
||||
+ };
|
||||
+
|
||||
+ pll1: clk@01c20000 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-a23-pll1-clk";
|
||||
+ reg = <0x01c20000 0x4>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ clock-output-names = "pll1";
|
||||
+ };
|
||||
+
|
||||
+ /* dummy clock until actually implemented */
|
||||
+ pll5: pll5_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <0>;
|
||||
+ clock-output-names = "pll5";
|
||||
+ };
|
||||
+
|
||||
+ pll6: clk@01c20028 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun6i-a31-pll6-clk";
|
||||
+ reg = <0x01c20028 0x4>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ clock-output-names = "pll6", "pll6x2", "pll6d2";
|
||||
+ };
|
||||
+
|
||||
+ pll8: clk@01c20044 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun6i-a31-pll6-clk";
|
||||
+ reg = <0x01c20044 0x4>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ clock-output-names = "pll8", "pll8x2";
|
||||
+ };
|
||||
+
|
||||
+ cpu: cpu_clk@01c20050 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-cpu-clk";
|
||||
+ reg = <0x01c20050 0x4>;
|
||||
+ clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
|
||||
+ clock-output-names = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ axi: axi_clk@01c20050 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-axi-clk";
|
||||
+ reg = <0x01c20050 0x4>;
|
||||
+ clocks = <&cpu>;
|
||||
+ clock-output-names = "axi";
|
||||
+ };
|
||||
+
|
||||
+ ahb1: ahb1_clk@01c20054 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun6i-a31-ahb1-clk";
|
||||
+ reg = <0x01c20054 0x4>;
|
||||
+ clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
|
||||
+ clock-output-names = "ahb1";
|
||||
+ };
|
||||
+
|
||||
+ ahb2: ahb2_clk@01c2005c {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-h3-ahb2-clk";
|
||||
+ reg = <0x01c2005c 0x4>;
|
||||
+ clocks = <&ahb1>, <&pll6 2>;
|
||||
+ clock-output-names = "ahb2";
|
||||
+ };
|
||||
+
|
||||
+ apb1: apb1_clk@01c20054 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-apb0-clk";
|
||||
+ reg = <0x01c20054 0x4>;
|
||||
+ clocks = <&ahb1>;
|
||||
+ clock-output-names = "apb1";
|
||||
+ };
|
||||
+
|
||||
+ apb2: apb2_clk@01c20058 {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun4i-a10-apb1-clk";
|
||||
+ reg = <0x01c20058 0x4>;
|
||||
+ clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
|
||||
+ clock-output-names = "apb2";
|
||||
+ };
|
||||
+
|
||||
+ bus_gates: clk@01c20060 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun8i-h3-bus-gates-clk";
|
||||
+ reg = <0x01c20060 0x14>;
|
||||
+ clock-indices = <5>, <6>, <8>,
|
||||
+ <9>, <10>, <13>,
|
||||
+ <14>, <17>, <18>,
|
||||
+ <19>, <20>,
|
||||
+ <21>, <23>,
|
||||
+ <24>, <25>,
|
||||
+ <26>, <27>,
|
||||
+ <28>, <29>,
|
||||
+ <30>, <31>, <32>,
|
||||
+ <35>, <36>, <37>,
|
||||
+ <40>, <41>, <43>,
|
||||
+ <44>, <52>, <53>,
|
||||
+ <54>, <64>,
|
||||
+ <65>, <69>, <72>,
|
||||
+ <76>, <77>, <78>,
|
||||
+ <96>, <97>, <98>,
|
||||
+ <112>, <113>,
|
||||
+ <114>, <115>, <116>,
|
||||
+ <128>, <135>;
|
||||
+ clocks = <&ahb1>, <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb2>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb2>,
|
||||
+ <&ahb2>, <&ahb2>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&ahb1>, <&ahb1>,
|
||||
+ <&ahb1>, <&apb1>,
|
||||
+ <&apb1>, <&apb1>, <&apb1>,
|
||||
+ <&apb1>, <&apb1>, <&apb1>,
|
||||
+ <&apb2>, <&apb2>, <&apb2>,
|
||||
+ <&apb2>, <&apb2>,
|
||||
+ <&apb2>, <&apb2>, <&apb2>,
|
||||
+ <&ahb1>, <&ahb1>;
|
||||
+ clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
|
||||
+ "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
|
||||
+ "ahb1_sdram", "ahb2_gmac", "ahb1_ts",
|
||||
+ "ahb1_hstimer", "ahb1_spi0",
|
||||
+ "ahb1_spi1", "ahb1_otg",
|
||||
+ "ahb1_otg_ehci0", "ahb1_ehic1",
|
||||
+ "ahb1_ehic2", "ahb1_ehic3",
|
||||
+ "ahb1_otg_ohci0", "ahb2_ohic1",
|
||||
+ "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
|
||||
+ "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
|
||||
+ "ahb1_csi", "ahb1_tve", "ahb1_hdmi",
|
||||
+ "ahb1_de", "ahb1_gpu", "ahb1_msgbox",
|
||||
+ "ahb1_spinlock", "apb1_codec",
|
||||
+ "apb1_spdif", "apb1_pio", "apb1_ths",
|
||||
+ "apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
|
||||
+ "apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
|
||||
+ "apb2_uart0", "apb2_uart1",
|
||||
+ "apb2_uart2", "apb2_uart3", "apb2_scr",
|
||||
+ "ahb1_ephy", "ahb1_dbg";
|
||||
+ };
|
||||
+
|
||||
+ mmc0_clk: clk@01c20088 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun4i-a10-mmc-clk";
|
||||
+ reg = <0x01c20088 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
|
||||
+ clock-output-names = "mmc0",
|
||||
+ "mmc0_output",
|
||||
+ "mmc0_sample";
|
||||
+ };
|
||||
+
|
||||
+ mmc1_clk: clk@01c2008c {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun4i-a10-mmc-clk";
|
||||
+ reg = <0x01c2008c 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
|
||||
+ clock-output-names = "mmc1",
|
||||
+ "mmc1_output",
|
||||
+ "mmc1_sample";
|
||||
+ };
|
||||
+
|
||||
+ mmc2_clk: clk@01c20090 {
|
||||
+ #clock-cells = <1>;
|
||||
+ compatible = "allwinner,sun4i-a10-mmc-clk";
|
||||
+ reg = <0x01c20090 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
|
||||
+ clock-output-names = "mmc2",
|
||||
+ "mmc2_output",
|
||||
+ "mmc2_sample";
|
||||
+ };
|
||||
+
|
||||
+ mbus_clk: clk@01c2015c {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-a23-mbus-clk";
|
||||
+ reg = <0x01c2015c 0x4>;
|
||||
+ clocks = <&osc24M>, <&pll6 1>, <&pll5>;
|
||||
+ clock-output-names = "mbus";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ soc@01c00000 {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+
|
||||
+ dma: dma-controller@01c02000 {
|
||||
+ compatible = "allwinner,sun8i-h3-dma";
|
||||
+ reg = <0x01c02000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&bus_gates 6>;
|
||||
+ resets = <&bus_rst 6>;
|
||||
+ #dma-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0: mmc@01c0f000 {
|
||||
+ compatible = "allwinner,sun5i-a13-mmc";
|
||||
+ reg = <0x01c0f000 0x1000>;
|
||||
+ clocks = <&bus_gates 8>,
|
||||
+ <&mmc0_clk 0>,
|
||||
+ <&mmc0_clk 1>,
|
||||
+ <&mmc0_clk 2>;
|
||||
+ clock-names = "ahb",
|
||||
+ "mmc",
|
||||
+ "output",
|
||||
+ "sample";
|
||||
+ resets = <&bus_rst 8>;
|
||||
+ reset-names = "ahb";
|
||||
+ interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ status = "disabled";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ mmc1: mmc@01c10000 {
|
||||
+ compatible = "allwinner,sun5i-a13-mmc";
|
||||
+ reg = <0x01c10000 0x1000>;
|
||||
+ clocks = <&bus_gates 9>,
|
||||
+ <&mmc1_clk 0>,
|
||||
+ <&mmc1_clk 1>,
|
||||
+ <&mmc1_clk 2>;
|
||||
+ clock-names = "ahb",
|
||||
+ "mmc",
|
||||
+ "output",
|
||||
+ "sample";
|
||||
+ resets = <&bus_rst 9>;
|
||||
+ reset-names = "ahb";
|
||||
+ interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ status = "disabled";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ mmc2: mmc@01c11000 {
|
||||
+ compatible = "allwinner,sun5i-a13-mmc";
|
||||
+ reg = <0x01c11000 0x1000>;
|
||||
+ clocks = <&bus_gates 10>,
|
||||
+ <&mmc2_clk 0>,
|
||||
+ <&mmc2_clk 1>,
|
||||
+ <&mmc2_clk 2>;
|
||||
+ clock-names = "ahb",
|
||||
+ "mmc",
|
||||
+ "output",
|
||||
+ "sample";
|
||||
+ resets = <&bus_rst 10>;
|
||||
+ reset-names = "ahb";
|
||||
+ interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ status = "disabled";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ pio: pinctrl@01c20800 {
|
||||
+ compatible = "allwinner,sun8i-h3-pinctrl";
|
||||
+ reg = <0x01c20800 0x400>;
|
||||
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&bus_gates 69>;
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <3>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+
|
||||
+ uart0_pins_a: uart0@0 {
|
||||
+ allwinner,pins = "PA4", "PA5";
|
||||
+ allwinner,function = "uart0";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0_pins_a: mmc0@0 {
|
||||
+ allwinner,pins = "PF0", "PF1", "PF2", "PF3",
|
||||
+ "PF4", "PF5";
|
||||
+ allwinner,function = "mmc0";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0_cd_pin: mmc0_cd_pin@0 {
|
||||
+ allwinner,pins = "PF6";
|
||||
+ allwinner,function = "gpio_in";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
+ };
|
||||
+
|
||||
+ mmc1_pins_a: mmc1@0 {
|
||||
+ allwinner,pins = "PG0", "PG1", "PG2", "PG3",
|
||||
+ "PG4", "PG5";
|
||||
+ allwinner,function = "mmc1";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ bus_rst: reset@01c202c0 {
|
||||
+ #reset-cells = <1>;
|
||||
+ compatible = "allwinner,sun8i-h3-bus-reset";
|
||||
+ reg = <0x01c202c0 0x1c>;
|
||||
+ };
|
||||
+
|
||||
+ timer@01c20c00 {
|
||||
+ compatible = "allwinner,sun4i-a10-timer";
|
||||
+ reg = <0x01c20c00 0xa0>;
|
||||
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&osc24M>;
|
||||
+ };
|
||||
+
|
||||
+ wdt0: watchdog@01c20ca0 {
|
||||
+ compatible = "allwinner,sun6i-a31-wdt";
|
||||
+ reg = <0x01c20ca0 0x20>;
|
||||
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ uart0: serial@01c28000 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28000 0x400>;
|
||||
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 112>;
|
||||
+ resets = <&bus_rst 208>;
|
||||
+ dmas = <&dma 6>, <&dma 6>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ uart1: serial@01c28400 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28400 0x400>;
|
||||
+ interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 113>;
|
||||
+ resets = <&bus_rst 209>;
|
||||
+ dmas = <&dma 7>, <&dma 7>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ uart2: serial@01c28800 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28800 0x400>;
|
||||
+ interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 114>;
|
||||
+ resets = <&bus_rst 210>;
|
||||
+ dmas = <&dma 8>, <&dma 8>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ uart3: serial@01c28c00 {
|
||||
+ compatible = "snps,dw-apb-uart";
|
||||
+ reg = <0x01c28c00 0x400>;
|
||||
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ reg-shift = <2>;
|
||||
+ reg-io-width = <4>;
|
||||
+ clocks = <&bus_gates 115>;
|
||||
+ resets = <&bus_rst 211>;
|
||||
+ dmas = <&dma 9>, <&dma 9>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ gic: interrupt-controller@01c81000 {
|
||||
+ compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
|
||||
+ reg = <0x01c81000 0x1000>,
|
||||
+ <0x01c82000 0x1000>,
|
||||
+ <0x01c84000 0x2000>,
|
||||
+ <0x01c86000 0x2000>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <3>;
|
||||
+ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
+ };
|
||||
+
|
||||
+ rtc: rtc@01f00000 {
|
||||
+ compatible = "allwinner,sun6i-a31-rtc";
|
||||
+ reg = <0x01f00000 0x54>;
|
||||
+ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
|
@ -1,127 +0,0 @@
|
|||
From patchwork Wed Oct 21 16:20:28 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [6/6] ARM: dts: sun8i: Add Orange Pi Plus support
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7458661
|
||||
Message-Id: <1445444428-4652-3-git-send-email-jenskuske@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
|
||||
=?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi@googlegroups.com, Jens Kuske <jenskuske@gmail.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 21 Oct 2015 18:20:28 +0200
|
||||
|
||||
The Orange Pi Plus is a SBC based on the Allwinner H3 SoC
|
||||
with 8GB eMMC, multiple USB ports through a USB hub chip, SATA through
|
||||
a USB-SATA bridge, one uSD slot, a 10/100/1000M ethernet port,
|
||||
WiFi, HDMI, headphone jack, IR receiver, a microphone, a CSI connector
|
||||
and a 40-pin GPIO header.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 77 ++++++++++++++++++++++++++++
|
||||
2 files changed, 79 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 35a3cf4..bedf51b 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -643,3 +643,4 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
- sun8i-a33-sinlinx-sina33.dtb
|
||||
+ sun8i-a33-sinlinx-sina33.dtb \
|
||||
+ sun8i-h3-orangepi-plus.dtb
|
||||
dtb-$(CONFIG_MACH_SUN9I) += \
|
||||
sun9i-a80-optimus.dtb \
|
||||
sun9i-a80-cubieboard4.dtb
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
|
||||
new file mode 100644
|
||||
index 0000000..e67df59
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.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 "sun8i-h3.dtsi"
|
||||
+#include "sunxi-common-regulators.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi Plus";
|
||||
+ compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -1,593 +0,0 @@
|
|||
From patchwork Wed Oct 21 16:30:46 2015
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [3/6] pinctrl: sunxi: Add H3 PIO controller support
|
||||
From: Jens Kuske <jenskuske@gmail.com>
|
||||
X-Patchwork-Id: 7458701
|
||||
Message-Id: <5627BDB6.6020501@gmail.com>
|
||||
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
|
||||
Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
Rob Herring <robh+dt@kernel.org>,
|
||||
Philipp Zabel <p.zabel@pengutronix.de>, =?UTF-8?Q?Emilio_L=c3=b3pez?=
|
||||
<emilio@elopez.com.ar>
|
||||
Cc: devicetree@vger.kernel.org, Vishnu Patekar <vishnupatekar0510@gmail.com>,
|
||||
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
|
||||
linux-sunxi <linux-sunxi@googlegroups.com>,
|
||||
Jens Kuske <jenskuske@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 21 Oct 2015 18:30:46 +0200
|
||||
|
||||
The H3 uses the same pin controller as previous SoC's from Allwinner.
|
||||
Add support for the pins controlled by the main PIO controller.
|
||||
|
||||
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
|
||||
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
|
||||
---
|
||||
.../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 +
|
||||
drivers/pinctrl/sunxi/Kconfig | 4 +
|
||||
drivers/pinctrl/sunxi/Makefile | 1 +
|
||||
drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 516 +++++++++++++++++++++
|
||||
4 files changed, 522 insertions(+)
|
||||
create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
|
||||
index 3c821cd..094451c 100644
|
||||
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
|
||||
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
|
||||
@@ -17,6 +17,7 @@ Required properties:
|
||||
"allwinner,sun8i-a23-pinctrl"
|
||||
"allwinner,sun8i-a23-r-pinctrl"
|
||||
"allwinner,sun8i-a33-pinctrl"
|
||||
+ "allwinner,sun8i-h3-pinctrl"
|
||||
|
||||
- reg: Should contain the register physical address and length for the
|
||||
pin controller.
|
||||
diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
|
||||
index ae27872..f161e4c 100644
|
||||
--- a/drivers/pinctrl/sunxi/Kconfig
|
||||
+++ b/drivers/pinctrl/sunxi/Kconfig
|
||||
@@ -47,6 +47,10 @@ config PINCTRL_SUN8I_A23_R
|
||||
depends on RESET_CONTROLLER
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
|
||||
+config PINCTRL_SUN8I_H3
|
||||
+ def_bool MACH_SUN8I
|
||||
+ select PINCTRL_SUNXI_COMMON
|
||||
+
|
||||
config PINCTRL_SUN9I_A80
|
||||
def_bool MACH_SUN9I
|
||||
select PINCTRL_SUNXI_COMMON
|
||||
diff --git a/drivers/pinctrl/sunxi/Makefile b/drivers/pinctrl/sunxi/Makefile
|
||||
index 227a121..ca19592 100644
|
||||
--- a/drivers/pinctrl/sunxi/Makefile
|
||||
+++ b/drivers/pinctrl/sunxi/Makefile
|
||||
@@ -12,4 +12,5 @@ obj-$(CONFIG_PINCTRL_SUN7I_A20) += pinctrl-sun7i-a20.o
|
||||
obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinctrl-sun8i-a23.o
|
||||
obj-$(CONFIG_PINCTRL_SUN8I_A23_R) += pinctrl-sun8i-a23-r.o
|
||||
obj-$(CONFIG_PINCTRL_SUN8I_A33) += pinctrl-sun8i-a33.o
|
||||
+obj-$(CONFIG_PINCTRL_SUN8I_H3) += pinctrl-sun8i-h3.o
|
||||
obj-$(CONFIG_PINCTRL_SUN9I_A80) += pinctrl-sun9i-a80.o
|
||||
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
|
||||
new file mode 100644
|
||||
index 0000000..98d465d
|
||||
--- /dev/null
|
||||
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
|
||||
@@ -0,0 +1,516 @@
|
||||
+/*
|
||||
+ * Allwinner H3 SoCs pinctrl driver.
|
||||
+ *
|
||||
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
|
||||
+ *
|
||||
+ * Based on pinctrl-sun8i-a23.c, which is:
|
||||
+ * Copyright (C) 2014 Chen-Yu Tsai <wens@csie.org>
|
||||
+ * Copyright (C) 2014 Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
+ *
|
||||
+ * This file is licensed under the terms of the GNU General Public
|
||||
+ * License version 2. This program is licensed "as is" without any
|
||||
+ * warranty of any kind, whether express or implied.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/pinctrl/pinctrl.h>
|
||||
+
|
||||
+#include "pinctrl-sunxi.h"
|
||||
+
|
||||
+static const struct sunxi_desc_pin sun8i_h3_pins[] = {
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* TX */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* MS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* RX */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* CK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* RTS */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* DO */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart2"), /* CTS */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag"), /* DI */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart0"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart0"), /* RX */
|
||||
+ SUNXI_FUNCTION(0x3, "pwm0"),
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)), /* PA_EINT5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* PWREN */
|
||||
+ SUNXI_FUNCTION(0x3, "pwm1"),
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* CLK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* DATA */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)), /* PA_EINT8 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* RST */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)), /* PA_EINT9 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "sim"), /* DET */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)), /* PA_EINT10 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2c0"), /* SCK */
|
||||
+ SUNXI_FUNCTION(0x3, "di"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 11)), /* PA_EINT11 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2c0"), /* SDA */
|
||||
+ SUNXI_FUNCTION(0x3, "di"), /* RX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 12)), /* PA_EINT12 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* CS */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 13)), /* PA_EINT13 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* RX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PA_EINT14 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
|
||||
+ SUNXI_FUNCTION(0x3, "uart3"), /* CTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "spdif"), /* OUT */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* SYNC */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c1"), /* SCK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)), /* PA_EINT18 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* CLK */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c1"), /* SDA */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 19)), /* PA_EINT19 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 20),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* DOUT */
|
||||
+ SUNXI_FUNCTION(0x3, "sim"), /* VPPEN */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 20)), /* PA_EINT20 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 21),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s0"), /* DIN */
|
||||
+ SUNXI_FUNCTION(0x3, "sim"), /* VPPPP */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 21)), /* PA_EINT21 */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* WE */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* ALE */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* CLE */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* CLK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* CE1 */
|
||||
+ SUNXI_FUNCTION(0x3, "spi0")), /* CS */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* RE */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0")), /* RB1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand"), /* DQ6 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand"), /* DQ7 */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "nand"), /* DQS */
|
||||
+ SUNXI_FUNCTION(0x3, "mmc2")), /* RST */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXD0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXCK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXCTL/RCDV */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* RXERR */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD2L */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXD0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* CRS */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXCK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXCTL/TXEN */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* TXERR */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* CLKIN/COL */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* MDC */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "emac")), /* MDIO */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* PCLK */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* CLK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* MCLK */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* ERR */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* SYNC */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* DVLD */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D0 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D1 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D2 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D3 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D4 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D5 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D6 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* D7 */
|
||||
+ SUNXI_FUNCTION(0x3, "ts")), /* D7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* SCK */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c2")), /* SCK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "csi"), /* SDA */
|
||||
+ SUNXI_FUNCTION(0x3, "i2c2")), /* SDA */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out")),
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* MS */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* DI */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
|
||||
+ SUNXI_FUNCTION(0x3, "uart0")), /* TX */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* DO */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
|
||||
+ SUNXI_FUNCTION(0x3, "uart0")), /* RX */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */
|
||||
+ SUNXI_FUNCTION(0x3, "jtag")), /* CK */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc0")), /* DET */
|
||||
+ /* Hole */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 0)), /* PG_EINT0 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 1)), /* PG_EINT1 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 2)), /* PG_EINT2 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 3)), /* PG_EINT3 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 4)), /* PG_EINT4 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 5)), /* PG_EINT5 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* TX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 6)), /* PG_EINT6 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* RX */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 7)), /* PG_EINT7 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* RTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 8)), /* PG_EINT8 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "uart1"), /* CTS */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 9)), /* PG_EINT9 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* SYNC */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 10)), /* PG_EINT10 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* CLK */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 11)), /* PG_EINT11 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* DOUT */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 12)), /* PG_EINT12 */
|
||||
+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
|
||||
+ SUNXI_FUNCTION(0x0, "gpio_in"),
|
||||
+ SUNXI_FUNCTION(0x1, "gpio_out"),
|
||||
+ SUNXI_FUNCTION(0x2, "i2s1"), /* DIN */
|
||||
+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 13)), /* PG_EINT13 */
|
||||
+};
|
||||
+
|
||||
+static const struct sunxi_pinctrl_desc sun8i_h3_pinctrl_data = {
|
||||
+ .pins = sun8i_h3_pins,
|
||||
+ .npins = ARRAY_SIZE(sun8i_h3_pins),
|
||||
+ .irq_banks = 2,
|
||||
+};
|
||||
+
|
||||
+static int sun8i_h3_pinctrl_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ return sunxi_pinctrl_init(pdev,
|
||||
+ &sun8i_h3_pinctrl_data);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id sun8i_h3_pinctrl_match[] = {
|
||||
+ { .compatible = "allwinner,sun8i-h3-pinctrl", },
|
||||
+ {}
|
||||
+};
|
||||
+
|
||||
+static struct platform_driver sun8i_h3_pinctrl_driver = {
|
||||
+ .probe = sun8i_h3_pinctrl_probe,
|
||||
+ .driver = {
|
||||
+ .name = "sun8i-h3-pinctrl",
|
||||
+ .of_match_table = sun8i_h3_pinctrl_match,
|
||||
+ },
|
||||
+};
|
||||
+builtin_platform_driver(sun8i_h3_pinctrl_driver);
|
|
@ -1,133 +0,0 @@
|
|||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 909ed7a..f69e726
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -23,8 +23,8 @@ include $(srctree)/$(obj)/Makefile
|
||||
PHONY += __dtbs_install_prep
|
||||
__dtbs_install_prep:
|
||||
ifeq ("$(dtbinst-root)", "$(obj)")
|
||||
- $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
|
||||
- $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
|
||||
+ #$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
|
||||
+ #$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
|
||||
$(Q)mkdir -p $(INSTALL_DTBS_PATH)
|
||||
endif
|
||||
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 5972624..272d558 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -80,11 +80,13 @@
|
||||
fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
-packagename=linux-image-$version
|
||||
-fwpackagename=linux-firmware-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+packagename=linux-image-next"$LOCALVERSION"
|
||||
+fwpackagename=linux-firmware-image-next"$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers-next"$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb-next"$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev-next"$LOCALVERSION"
|
||||
dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -108,13 +110,17 @@
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir"
|
||||
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
|
||||
mkdir -m 755 -p "$fwdir/DEBIAN"
|
||||
mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename"
|
||||
mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
|
||||
mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
|
||||
+
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
+
|
||||
mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
|
||||
mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
@@ -165,6 +171,11 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ #mkdir -p "$tmpdir/boot/dtb"
|
||||
+ INSTALL_DTBS_PATH="$dtb_dir/boot/dtb" $MAKE KBUILD_SRC= dtbs_install
|
||||
+fi
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -189,9 +200,11 @@
|
||||
set -e
|
||||
|
||||
# Pass maintainer script parameters to hook scripts
|
||||
+
|
||||
export DEB_MAINT_PARAMS="\$*"
|
||||
|
||||
# Tell initramfs builder whether it's wanted
|
||||
+
|
||||
export INITRD=$want_initrd
|
||||
|
||||
test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
|
||||
@@ -200,6 +213,15 @@
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+kernel_tmp_version="${installed_image_path////\\/}"
|
||||
+sed -e "s/exit 0/ln -sf \/$kernel_tmp_version \/boot\/zImage || cp \/$kernel_tmp_version \/boot\/zImage/g" -i $tmpdir/DEBIAN/postinst
|
||||
+echo "touch /boot/.next" >> $tmpdir/DEBIAN/postinst
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/postinst
|
||||
+
|
||||
+
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
@@ -315,7 +337,7 @@
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
-Provides: linux-headers, linux-headers-2.6
|
||||
+Provides: linux-headers
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
@@ -341,6 +363,16 @@
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: any
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version.
|
||||
+EOF
|
||||
+
|
||||
+create_package "$dtb_packagename" "$dtb_dir"
|
||||
+
|
||||
+cat <<EOF >> debian/control
|
||||
+
|
||||
Package: $libc_headers_packagename
|
||||
Section: devel
|
||||
Provides: linux-kernel-headers
|
||||
@@ -352,7 +384,7 @@
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+# create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +0,0 @@
|
|||
--- a/configs/Bananapi_defconfig
|
||||
+++ b/configs/Bananapi_defconfig
|
||||
@@ -14,3 +14,8 @@ CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHC
|
||||
CONFIG_NETCONSOLE=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB0_ID_DET="PH04"
|
||||
+CONFIG_USB0_VBUS_DET="PH05"
|
||||
+CONFIG_USB0_VBUS_PIN="PB09"
|
||||
+CONFIG_USB_MUSB_SUNXI=y
|
||||
+CONFIG_USB_MUSB_GADGET=y
|
|
@ -1,10 +0,0 @@
|
|||
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
|
||||
index 0fbaa23..5ba97a6 100644
|
||||
--- a/configs/Cubieboard2_defconfig
|
||||
+++ b/configs/Cubieboard2_defconfig
|
||||
@@ -15,3 +15,5 @@ CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
+CONFIG_MMC2_CD_PIN="PH0"
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
@ -1,50 +0,0 @@
|
|||
--- a/include/configs/udoo.h
|
||||
+++ b/include/configs/udoo.h
|
||||
@@ -103,7 +103,7 @@
|
||||
#endif
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
- "script=uEnv.txt\0" \
|
||||
+ "script=/boot/boot.scr\0" \
|
||||
"image=zImage\0" \
|
||||
"console=ttymxc1\0" \
|
||||
"splashpos=m,m\0" \
|
||||
@@ -133,10 +133,9 @@
|
||||
"mmcargs=setenv bootargs console=${console},${baudrate} ${video} ${memory} " \
|
||||
"root=${mmcroot}\0" \
|
||||
"loadbootscript=" \
|
||||
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
+ "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
"bootscript=echo Running bootscript from mmc ...; " \
|
||||
- "env import -t ${loadaddr} ${filesize}; " \
|
||||
- "run uenvboot\0" \
|
||||
+ "source\0" \
|
||||
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
||||
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
"mmcboot=echo Booting from mmc ...; " \
|
||||
@@ -180,15 +179,16 @@
|
||||
"fi;\0"
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
- "mmc dev ${mmcdev}; " \
|
||||
- "if mmc rescan; then " \
|
||||
- "if run loadbootscript; then " \
|
||||
- "run bootscript; fi; " \
|
||||
- "if run loadimage; then " \
|
||||
- "run mmcboot; " \
|
||||
- "else run netboot; " \
|
||||
- "fi; " \
|
||||
- "else run netboot; fi"
|
||||
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
|
||||
+ "if run loadbootscript; then " \
|
||||
+ "run bootscript; " \
|
||||
+ "else " \
|
||||
+ "if run loadimage; then " \
|
||||
+ "run mmcboot; " \
|
||||
+ "else run netboot; " \
|
||||
+ "fi; " \
|
||||
+ "fi; " \
|
||||
+ "else run netboot; fi"
|
||||
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_LONGHELP
|
|
@ -1,238 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2013 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Configuration settings for Udoo board.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
#include "mx6_common.h"
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/imx-common/gpio.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#define CONFIG_MX6
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
#define CONFIG_DISPLAY_BOARDINFO
|
||||
|
||||
#define MACH_TYPE_UDOO 4800
|
||||
#define CONFIG_MACH_TYPE MACH_TYPE_UDOO
|
||||
|
||||
#define CONFIG_CMDLINE_TAG
|
||||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_INITRD_TAG
|
||||
#define CONFIG_REVISION_TAG
|
||||
|
||||
/* Size of malloc() pool */
|
||||
#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
|
||||
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_MXC_GPIO
|
||||
|
||||
#define CONFIG_MXC_UART
|
||||
#define CONFIG_MXC_UART_BASE UART2_BASE
|
||||
|
||||
/* SATA Configs */
|
||||
|
||||
#define CONFIG_CMD_SATA
|
||||
#ifdef CONFIG_CMD_SATA
|
||||
#define CONFIG_DWC_AHSATA
|
||||
#define CONFIG_SYS_SATA_MAX_DEVICE 1
|
||||
#define CONFIG_DWC_AHSATA_PORT_ID 0
|
||||
#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
|
||||
#define CONFIG_LBA48
|
||||
#define CONFIG_LIBATA
|
||||
#endif
|
||||
|
||||
/* Network support */
|
||||
|
||||
#define CONFIG_CMD_PING
|
||||
#define CONFIG_CMD_DHCP
|
||||
#define CONFIG_CMD_MII
|
||||
#define CONFIG_CMD_NET
|
||||
#define CONFIG_FEC_MXC
|
||||
#define CONFIG_MII
|
||||
#define IMX_FEC_BASE ENET_BASE_ADDR
|
||||
#define CONFIG_FEC_XCV_TYPE RGMII
|
||||
#define CONFIG_ETHPRIME "FEC"
|
||||
#define CONFIG_FEC_MXC_PHYADDR 6
|
||||
#define CONFIG_PHYLIB
|
||||
#define CONFIG_PHY_MICREL
|
||||
#define CONFIG_PHY_MICREL_KSZ9031
|
||||
|
||||
/* allow to overwrite serial and ethaddr */
|
||||
#define CONFIG_ENV_OVERWRITE
|
||||
#define CONFIG_CONS_INDEX 1
|
||||
#define CONFIG_BAUDRATE 115200
|
||||
|
||||
/* Command definition */
|
||||
#include <config_cmd_default.h>
|
||||
|
||||
#undef CONFIG_CMD_IMLS
|
||||
|
||||
#define CONFIG_CMD_BMODE
|
||||
#define CONFIG_CMD_SETEXPR
|
||||
|
||||
#define CONFIG_BOOTDELAY 3
|
||||
|
||||
#define CONFIG_SYS_MEMTEST_START 0x10000000
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
|
||||
#define CONFIG_LOADADDR 0x12000000
|
||||
#define CONFIG_SYS_TEXT_BASE 0x17800000
|
||||
|
||||
/* MMC Configuration */
|
||||
#define CONFIG_FSL_ESDHC
|
||||
#define CONFIG_FSL_USDHC
|
||||
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
|
||||
|
||||
#define CONFIG_MMC
|
||||
#define CONFIG_CMD_MMC
|
||||
#define CONFIG_GENERIC_MMC
|
||||
#define CONFIG_BOUNCE_BUFFER
|
||||
#define CONFIG_CMD_EXT2
|
||||
#define CONFIG_CMD_FAT
|
||||
#define CONFIG_DOS_PARTITION
|
||||
|
||||
#if defined(CONFIG_MX6Q)
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
|
||||
#else
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6dl-udoo.dtb"
|
||||
#endif
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"script=boot.scr\0" \
|
||||
"image=zImage\0" \
|
||||
"console=ttymxc1\0" \
|
||||
"splashpos=m,m\0" \
|
||||
"fdt_high=0xffffffff\0" \
|
||||
"initrd_high=0xffffffff\0" \
|
||||
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
|
||||
"fdt_addr=0x18000000\0" \
|
||||
"boot_fdt=try\0" \
|
||||
"ip_dyn=yes\0" \
|
||||
"mmcdev=0\0" \
|
||||
"mmcpart=1\0" \
|
||||
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
|
||||
"update_sd_firmware_filename=u-boot.imx\0" \
|
||||
"update_sd_firmware=" \
|
||||
"if test ${ip_dyn} = yes; then " \
|
||||
"setenv get_cmd dhcp; " \
|
||||
"else " \
|
||||
"setenv get_cmd tftp; " \
|
||||
"fi; " \
|
||||
"if mmc dev ${mmcdev}; then " \
|
||||
"if ${get_cmd} ${update_sd_firmware_filename}; then " \
|
||||
"setexpr fw_sz ${filesize} / 0x200; " \
|
||||
"setexpr fw_sz ${fw_sz} + 1; " \
|
||||
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
|
||||
"fi; " \
|
||||
"fi\0" \
|
||||
"mmcargs=setenv bootargs console=${console},${baudrate} ${video} ${memory} " \
|
||||
"root=${mmcroot}\0" \
|
||||
"loadbootscript=" \
|
||||
"ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${script} || fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
"bootscript=echo Running bootscript from mmc ...; " \
|
||||
"source\0" \
|
||||
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
||||
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
"mmcboot=echo Booting from mmc ...; " \
|
||||
"run mmcargs; " \
|
||||
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
"if run loadfdt; then " \
|
||||
"bootz ${loadaddr} - ${fdt_addr}; " \
|
||||
"else " \
|
||||
"if test ${boot_fdt} = try; then " \
|
||||
"bootz; " \
|
||||
"else " \
|
||||
"echo WARN: Cannot load the DT; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"else " \
|
||||
"bootz; " \
|
||||
"fi;\0" \
|
||||
"netargs=setenv bootargs console=${console},${baudrate} " \
|
||||
"root=/dev/nfs " \
|
||||
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
||||
"netboot=echo Booting from net ...; " \
|
||||
"run netargs; " \
|
||||
"if test ${ip_dyn} = yes; then " \
|
||||
"setenv get_cmd dhcp; " \
|
||||
"else " \
|
||||
"setenv get_cmd tftp; " \
|
||||
"fi; " \
|
||||
"${get_cmd} ${image}; " \
|
||||
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
||||
"bootz ${loadaddr} - ${fdt_addr}; " \
|
||||
"else " \
|
||||
"if test ${boot_fdt} = try; then " \
|
||||
"bootz; " \
|
||||
"else " \
|
||||
"echo WARN: Cannot load the DT; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"else " \
|
||||
"bootz; " \
|
||||
"fi;\0"
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
||||
"if run loadbootscript; then " \
|
||||
"run bootscript; " \
|
||||
"else " \
|
||||
"if run loadimage; then " \
|
||||
"run mmcboot; " \
|
||||
"else run netboot; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"else run netboot; fi"
|
||||
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_LONGHELP
|
||||
#define CONFIG_SYS_HUSH_PARSER
|
||||
#define CONFIG_SYS_PROMPT "=> "
|
||||
#define CONFIG_AUTO_COMPLETE
|
||||
#define CONFIG_SYS_CBSIZE 256
|
||||
|
||||
/* Print Buffer Size */
|
||||
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|
||||
#define CONFIG_SYS_MAXARGS 16
|
||||
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
|
||||
|
||||
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
||||
|
||||
#define CONFIG_CMDLINE_EDITING
|
||||
|
||||
/* Physical Memory Map */
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
||||
|
||||
#define CONFIG_SYS_INIT_SP_OFFSET \
|
||||
(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_INIT_SP_ADDR \
|
||||
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
|
||||
|
||||
/* FLASH and environment organization */
|
||||
#define CONFIG_SYS_NO_FLASH
|
||||
|
||||
#define CONFIG_ENV_SIZE (8 * 1024)
|
||||
|
||||
#define CONFIG_ENV_IS_IN_MMC
|
||||
#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
|
||||
#define CONFIG_OF_LIBFDT
|
||||
#define CONFIG_CMD_BOOTZ
|
||||
|
||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||
#define CONFIG_CMD_CACHE
|
||||
#endif
|
||||
|
||||
#endif /* __CONFIG_H * */
|
|
@ -1,393 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) Jasbir Matharu
|
||||
* Copyright (C) 2014 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Configuration settings for the UDOO NEO board.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __MX6SX_UDOONEO_CONFIG_H
|
||||
#define __MX6SX_UDOONEO_CONFIG_H
|
||||
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <linux/sizes.h>
|
||||
#include "mx6_common.h"
|
||||
#include <asm/imx-common/gpio.h>
|
||||
|
||||
#define CONFIG_MX6
|
||||
#define CONFIG_ROM_UNIFIED_SECTIONS
|
||||
#define CONFIG_SYS_GENERIC_BOARD
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
#define CONFIG_DISPLAY_BOARDINFO
|
||||
|
||||
#define CONFIG_DBG_MONITOR
|
||||
/* uncomment for PLUGIN mode support */
|
||||
/* #define CONFIG_USE_PLUGIN */
|
||||
|
||||
/* uncomment for SECURE mode support */
|
||||
/* #define CONFIG_SECURE_BOOT */
|
||||
|
||||
#define CONFIG_CMDLINE_TAG
|
||||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_INITRD_TAG
|
||||
#define CONFIG_REVISION_TAG
|
||||
|
||||
/* Size of malloc() pool */
|
||||
#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
|
||||
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_BOARD_LATE_INIT
|
||||
#define CONFIG_MXC_GPIO
|
||||
|
||||
#define CONFIG_MXC_UART
|
||||
#define CONFIG_MXC_UART_BASE UART1_BASE
|
||||
|
||||
#define CONFIG_CMD_FUSE
|
||||
#ifdef CONFIG_CMD_FUSE
|
||||
#define CONFIG_MXC_OCOTP
|
||||
#endif
|
||||
|
||||
/* MMC Configs */
|
||||
#define CONFIG_FSL_ESDHC
|
||||
#define CONFIG_FSL_USDHC
|
||||
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
|
||||
#define CONFIG_SYS_FSL_USDHC_NUM 2
|
||||
|
||||
#define CONFIG_MMC
|
||||
#define CONFIG_CMD_MMC
|
||||
#define CONFIG_GENERIC_MMC
|
||||
#define CONFIG_CMD_FAT
|
||||
#define CONFIG_DOS_PARTITION
|
||||
#define CONFIG_CMD_EXT2
|
||||
#undef CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
|
||||
|
||||
#define CONFIG_BAUDRATE 115200
|
||||
|
||||
#undef CONFIG_BOOTM_NETBSD
|
||||
#undef CONFIG_BOOTM_PLAN9
|
||||
#undef CONFIG_BOOTM_RTEMS
|
||||
|
||||
// needed for uEnv.txt support
|
||||
//#undef CONFIG_CMD_EXPORTENV
|
||||
//#undef CONFIG_CMD_IMPORTENV
|
||||
|
||||
#undef CONFIG_CMD_PING
|
||||
#undef CONFIG_CMD_DHCP
|
||||
#undef CONFIG_CMD_MII
|
||||
#undef CONFIG_CMD_NET
|
||||
#undef CONFIG_FEC_MXC
|
||||
#undef CONFIG_MII
|
||||
#define CONFIG_FEC_ENET_DEV 0
|
||||
|
||||
#if (CONFIG_FEC_ENET_DEV == 0)
|
||||
#define IMX_FEC_BASE ENET_BASE_ADDR
|
||||
#define CONFIG_FEC_MXC_PHYADDR 0x1
|
||||
#elif (CONFIG_FEC_ENET_DEV == 1)
|
||||
#define IMX_FEC_BASE ENET2_BASE_ADDR
|
||||
#define CONFIG_FEC_MXC_PHYADDR 0x2
|
||||
#endif
|
||||
#define CONFIG_FEC_XCV_TYPE RGMII
|
||||
#define CONFIG_ETHPRIME "FEC"
|
||||
|
||||
#define CONFIG_PHYLIB
|
||||
#define CONFIG_PHY_ATHEROS
|
||||
#define CONFIG_FEC_DMA_MINALIGN 64
|
||||
#define CONFIG_FEC_MXC_25M_REF_CLK
|
||||
|
||||
/* allow to overwrite serial and ethaddr */
|
||||
#define CONFIG_ENV_OVERWRITE
|
||||
#define CONFIG_CONS_INDEX 1
|
||||
|
||||
/* I2C configs */
|
||||
#define CONFIG_CMD_I2C
|
||||
#define CONFIG_SYS_I2C
|
||||
#define CONFIG_SYS_I2C_MXC
|
||||
#define CONFIG_SYS_I2C_SPEED 100000
|
||||
|
||||
/* PMIC */
|
||||
#define CONFIG_PFUZE300_PMIC_I2C
|
||||
#ifdef CONFIG_PFUZE300_PMIC_I2C
|
||||
#define CONFIG_PMIC_I2C_BUS 0
|
||||
#define CONFIG_PMIC_I2C_SLAVE 0x8
|
||||
#endif
|
||||
|
||||
/* Command definition */
|
||||
#include <config_cmd_default.h>
|
||||
|
||||
#undef CONFIG_CMD_IMLS
|
||||
|
||||
#define CONFIG_BOOTDELAY 3
|
||||
|
||||
#define CONFIG_LOADADDR 0x80800000
|
||||
#define CONFIG_SYS_TEXT_BASE 0x87800000
|
||||
|
||||
#define CONFIG_SYS_AUXCORE_BOOTDATA 0x78000000 /* Set to QSPI2 B flash at default */
|
||||
#ifndef CONFIG_SYS_AUXCORE_FASTUP
|
||||
#define CONFIG_CMD_BOOTAUX /* Boot M4 by command, disable this when M4 fast up */
|
||||
#define CONFIG_CMD_SETEXPR
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_BOOTAUX
|
||||
#define UPDATE_M4_ENV \
|
||||
"m4image=m4_qspi.bin\0" \
|
||||
"loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
|
||||
"update_m4_from_sd=" \
|
||||
"if sf probe 1:0; then " \
|
||||
"if run loadm4image; then " \
|
||||
"setexpr fw_sz ${filesize} + 0xffff; " \
|
||||
"setexpr fw_sz ${fw_sz} / 0x10000; " \
|
||||
"setexpr fw_sz ${fw_sz} * 0x10000; " \
|
||||
"sf erase 0x0 ${fw_sz}; " \
|
||||
"sf write ${loadaddr} 0x0 ${filesize}; " \
|
||||
"fi; " \
|
||||
"fi\0" \
|
||||
"m4boot=sf probe 1:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
|
||||
#else
|
||||
#define UPDATE_M4_ENV ""
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO
|
||||
#define CONFIG_VIDEO_MODE \
|
||||
"panel=" CONFIG_VIDEO_PANEL "\0"
|
||||
#else
|
||||
#define CONFIG_VIDEO_MODE ""
|
||||
#endif
|
||||
|
||||
#define CONFIG_MFG_ENV_SETTINGS \
|
||||
"mfgtool_args=setenv bootargs console=${console},${baudrate} " \
|
||||
"rdinit=/linuxrc " \
|
||||
"g_mass_storage.stall=0 g_mass_storage.removable=1 " \
|
||||
"g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
|
||||
"g_mass_storage.iSerialNumber=\"\" "\
|
||||
"\0" \
|
||||
"initrd_addr=0x83800000\0" \
|
||||
"initrd_high=0xffffffff\0" \
|
||||
"bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
CONFIG_MFG_ENV_SETTINGS \
|
||||
UPDATE_M4_ENV \
|
||||
CONFIG_VIDEO_MODE \
|
||||
"script=boot.scr\0" \
|
||||
"boot_prefixes=/ /boot/\0" \
|
||||
"boot_a_script=ext2load mmc 0 ${loadaddr} ${prefix}${script}; source ${loadaddr} || fatload mmc 0 ${loadaddr} ${prefix}${script}; source ${loadaddr}\0" \
|
||||
"scan_dev_for_boot=echo Scanning mmc ; for prefix in ${boot_prefixes}; do run scan_dev_for_scripts; done\0" \
|
||||
"scan_dev_for_scripts=if test -e mmc 0 ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; else echo Checking here ${prefix} ... not found; fi;\0" \
|
||||
"image=/zImage\0" \
|
||||
"console=ttymxc0\0" \
|
||||
"fdt_high=0xffffffff\0" \
|
||||
"initrd_high=0xffffffff\0" \
|
||||
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
|
||||
"fdt_addr=0x83000000\0" \
|
||||
"boot_fdt=try\0" \
|
||||
"ip_dyn=yes\0" \
|
||||
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
|
||||
"mmcpart=1\0" \
|
||||
"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
|
||||
"mmcautodetect=no\0" \
|
||||
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
||||
"root=${mmcroot} consoleblank=0\0" \
|
||||
"loadbootscript=" \
|
||||
"run scan_dev_for_boot;\0" \
|
||||
"bootscript=echo Running bootscript from mmc ...; " \
|
||||
"env import -t ${loadaddr} ${filesize}; " \
|
||||
"run uenvboot\0" \
|
||||
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
||||
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
"mmcboot=echo Booting from mmc ...; " \
|
||||
"run mmcargs; " \
|
||||
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
"if run loadfdt; then " \
|
||||
"bootz ${loadaddr} - ${fdt_addr}; " \
|
||||
"else " \
|
||||
"if test ${boot_fdt} = try; then " \
|
||||
"bootz; " \
|
||||
"else " \
|
||||
"echo WARN: Cannot load the DT; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"else " \
|
||||
"bootz; " \
|
||||
"fi;\0" \
|
||||
"netargs=setenv bootargs console=${console},${baudrate} " \
|
||||
"root=/dev/nfs " \
|
||||
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
||||
"netboot=echo Booting from net ...; " \
|
||||
"run netargs; " \
|
||||
"if test ${ip_dyn} = yes; then " \
|
||||
"setenv get_cmd dhcp; " \
|
||||
"else " \
|
||||
"setenv get_cmd tftp; " \
|
||||
"fi; " \
|
||||
"${get_cmd} ${image}; " \
|
||||
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
||||
"bootz ${loadaddr} - ${fdt_addr}; " \
|
||||
"else " \
|
||||
"if test ${boot_fdt} = try; then " \
|
||||
"bootz; " \
|
||||
"else " \
|
||||
"echo WARN: Cannot load the DT; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"else " \
|
||||
"bootz; " \
|
||||
"fi;\0"
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
"mmc dev ${mmcdev}; " \
|
||||
"if mmc rescan; then " \
|
||||
"if run loadbootscript; then " \
|
||||
"run bootscript; " \
|
||||
"fi; " \
|
||||
"if run loadimage; then " \
|
||||
"run mmcboot; " \
|
||||
"else run netboot; " \
|
||||
"fi; " \
|
||||
"else run netboot; fi"
|
||||
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_LONGHELP
|
||||
#define CONFIG_SYS_HUSH_PARSER
|
||||
#define CONFIG_SYS_PROMPT "=> "
|
||||
#define CONFIG_AUTO_COMPLETE
|
||||
#define CONFIG_SYS_CBSIZE 1024
|
||||
|
||||
/* Print Buffer Size */
|
||||
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|
||||
#define CONFIG_SYS_MAXARGS 256
|
||||
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
|
||||
|
||||
#define CONFIG_CMD_MEMTEST
|
||||
#define CONFIG_SYS_MEMTEST_START 0x80000000
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x10000)
|
||||
|
||||
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
#define CONFIG_CMDLINE_EDITING
|
||||
#define CONFIG_STACKSIZE SZ_128K
|
||||
|
||||
/* Physical Memory Map */
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
||||
|
||||
#define CONFIG_SYS_INIT_SP_OFFSET \
|
||||
(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_INIT_SP_ADDR \
|
||||
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
|
||||
|
||||
/* FLASH and environment organization */
|
||||
#define CONFIG_SYS_NO_FLASH
|
||||
|
||||
#define CONFIG_ENV_SIZE SZ_8K
|
||||
|
||||
#ifdef CONFIG_SYS_AUXCORE_FASTUP
|
||||
/*#define CONFIG_MXC_RDC*/ /* Disable the RDC temporarily, will enable it in future */
|
||||
#define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */
|
||||
#elif defined CONFIG_SYS_BOOT_QSPI
|
||||
#define CONFIG_SYS_USE_QSPI
|
||||
#define CONFIG_ENV_IS_IN_SPI_FLASH
|
||||
#else
|
||||
#define CONFIG_SYS_USE_QSPI /* Enable the QSPI flash at default */
|
||||
#define CONFIG_ENV_IS_IN_MMC
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_USE_QSPI
|
||||
#define CONFIG_QSPI /* enable the QUADSPI driver */
|
||||
#define CONFIG_QSPI_BASE QSPI2_BASE_ADDR
|
||||
#define CONFIG_QSPI_MEMMAP_BASE QSPI2_ARB_BASE_ADDR
|
||||
|
||||
#define CONFIG_CMD_SF
|
||||
#define CONFIG_SPI_FLASH
|
||||
#define CONFIG_SPI_FLASH_BAR
|
||||
#define CONFIG_SPI_FLASH_SPANSION
|
||||
#define CONFIG_SPI_FLASH_STMICRO
|
||||
#define CONFIG_SF_DEFAULT_BUS 0
|
||||
#define CONFIG_SF_DEFAULT_CS 0
|
||||
#define CONFIG_SF_DEFAULT_SPEED 40000000
|
||||
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 0 /*USDHC2*/
|
||||
#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
|
||||
#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC2 */
|
||||
|
||||
#if defined(CONFIG_ENV_IS_IN_MMC)
|
||||
#define CONFIG_ENV_OFFSET (8 * SZ_64K)
|
||||
#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
|
||||
#define CONFIG_ENV_OFFSET (768 * 1024)
|
||||
#define CONFIG_ENV_SECT_SIZE (64 * 1024)
|
||||
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
|
||||
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
|
||||
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
|
||||
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
|
||||
#endif
|
||||
|
||||
|
||||
#define CONFIG_OF_LIBFDT
|
||||
#define CONFIG_CMD_BOOTZ
|
||||
|
||||
#define CONFIG_CMD_BMODE
|
||||
|
||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||
#define CONFIG_CMD_CACHE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO
|
||||
#define CONFIG_CFB_CONSOLE
|
||||
#define CONFIG_VIDEO_MXS
|
||||
#define CONFIG_VIDEO_LOGO
|
||||
#define CONFIG_VIDEO_SW_CURSOR
|
||||
#define CONFIG_VGA_AS_SINGLE_DEVICE
|
||||
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
|
||||
#define CONFIG_SPLASH_SCREEN
|
||||
#define CONFIG_SPLASH_SCREEN_ALIGN
|
||||
#define CONFIG_CMD_BMP
|
||||
#define CONFIG_BMP_16BPP
|
||||
#define CONFIG_VIDEO_BMP_RLE8
|
||||
#define CONFIG_VIDEO_BMP_LOGO
|
||||
#ifdef CONFIG_VIDEO_GIS
|
||||
#define CONFIG_VIDEO_CSI
|
||||
#define CONFIG_VIDEO_PXP
|
||||
#define CONFIG_VIDEO_VADC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CONFIG_CMD_USB
|
||||
#define CONFIG_USB_EHCI
|
||||
#define CONFIG_USB_EHCI_MX6
|
||||
#define CONFIG_USB_STORAGE
|
||||
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
|
||||
#define CONFIG_USB_HOST_ETHER
|
||||
#define CONFIG_USB_ETHER_ASIX
|
||||
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
|
||||
#define CONFIG_MXC_USB_FLAGS 0
|
||||
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
|
||||
|
||||
/*
|
||||
* The PCIe support in uboot would bring failures in i.MX6SX PCIe
|
||||
* EP/RC validations. Disable PCIe support in uboot here.
|
||||
* RootCause: The bit10(ltssm_en) of GPR12 would be set in uboot,
|
||||
* thus the i.MX6SX PCIe EP would be cheated that the other i.MX6SX
|
||||
* PCIe RC had been configured and trying to setup PCIe link directly,
|
||||
* although the i.MX6SX RC is not properly configured at that time.
|
||||
* PCIe can be supported in uboot, if the i.MX6SX PCIe EP/RC validation
|
||||
* is not running.
|
||||
*/
|
||||
/* #define CONFIG_CMD_PCI */
|
||||
#ifdef CONFIG_CMD_PCI
|
||||
#define CONFIG_PCI
|
||||
#define CONFIG_PCI_PNP
|
||||
#define CONFIG_PCI_SCAN_SHOW
|
||||
#define CONFIG_PCIE_IMX
|
||||
#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(2, 0)
|
||||
#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1)
|
||||
#endif
|
||||
|
||||
#endif /* __CONFIG_H */
|
Loading…
Add table
Reference in a new issue