From ca2d079867bbaaca2880bf7b4b965ee2dfe1e1cf Mon Sep 17 00:00:00 2001 From: Martin Ayotte Date: Tue, 23 May 2017 10:03:51 -0400 Subject: [PATCH] add RSP and AXP along with DTS for OPiWin --- config/kernel/linux-sun50i-dev.config | 12 +- .../sun50i-dev/add_orangepiwin_dts.patch | 136 +++++++++++++++++- 2 files changed, 140 insertions(+), 8 deletions(-) diff --git a/config/kernel/linux-sun50i-dev.config b/config/kernel/linux-sun50i-dev.config index 945701e65a..159a7ab276 100644 --- a/config/kernel/linux-sun50i-dev.config +++ b/config/kernel/linux-sun50i-dev.config @@ -1308,7 +1308,7 @@ CONFIG_CMA_ALIGNMENT=8 # CONFIG_ARM_CCI400_PMU is not set # CONFIG_ARM_CCI5xx_PMU is not set # CONFIG_ARM_CCN is not set -CONFIG_SUNXI_RSB=m +CONFIG_SUNXI_RSB=y # CONFIG_VEXPRESS_CONFIG is not set # CONFIG_CONNECTOR is not set CONFIG_MTD=y @@ -2030,6 +2030,7 @@ CONFIG_INPUT_GPIO_ROTARY_ENCODER=m # CONFIG_INPUT_DRV2665_HAPTICS is not set # CONFIG_INPUT_DRV2667_HAPTICS is not set # CONFIG_RMI4_CORE is not set +CONFIG_INPUT_AXP20X_PEK=y # # Hardware I/O ports @@ -2274,6 +2275,7 @@ CONFIG_PINCTRL_SUN8I_H3_R=y CONFIG_PINCTRL_SUN50I_A64=y CONFIG_PINCTRL_SUN50I_A64_R=y CONFIG_PINCTRL_SUN50I_H5=y +CONFIG_PINCTRL_AXP=y CONFIG_GPIOLIB=y CONFIG_OF_GPIO=y CONFIG_GPIO_SYSFS=y @@ -2611,8 +2613,9 @@ CONFIG_MFD_SUN4I_GPADC=m # CONFIG_MFD_ATMEL_HLCDC is not set # CONFIG_MFD_BCM590XX is not set # CONFIG_MFD_AC100 is not set -# CONFIG_MFD_AXP20X_I2C is not set -# CONFIG_MFD_AXP20X_RSB is not set +CONFIG_MFD_AXP20X=y +# CONFIG_MFD_AXP20X_I2C is not set +CONFIG_MFD_AXP20X_RSB=y # CONFIG_MFD_CROS_EC is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set @@ -2700,10 +2703,11 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_REGULATOR_ACT8865 is not set # CONFIG_REGULATOR_AD5398 is not set # CONFIG_REGULATOR_ANATOP is not set +CONFIG_REGULATOR_AXP20X=y # CONFIG_REGULATOR_DA9210 is not set # CONFIG_REGULATOR_DA9211 is not set # CONFIG_REGULATOR_FAN53555 is not set -# CONFIG_REGULATOR_GPIO is not set +CONFIG_REGULATOR_GPIO=y # CONFIG_REGULATOR_ISL9305 is not set # CONFIG_REGULATOR_ISL6271A is not set # CONFIG_REGULATOR_LP3971 is not set diff --git a/patch/kernel/sun50i-dev/add_orangepiwin_dts.patch b/patch/kernel/sun50i-dev/add_orangepiwin_dts.patch index de73638193..560efa7112 100644 --- a/patch/kernel/sun50i-dev/add_orangepiwin_dts.patch +++ b/patch/kernel/sun50i-dev/add_orangepiwin_dts.patch @@ -13,7 +13,7 @@ new file mode 100644 index 0000000..4fc6ffd --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepiwin.dts -@@ -0,0 +1,137 @@ +@@ -0,0 +1,265 @@ +/* + * Copyright (c) 2016 ARM Ltd. + * @@ -78,7 +78,8 @@ index 0000000..4fc6ffd + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en_pin>; -+ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ ++ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ ++ post-power-on-delay-ms = <50>; + }; + + reg_usb1_vbus: usb1-vbus { @@ -107,8 +108,8 @@ index 0000000..4fc6ffd +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; ++ vmmc-supply = <®_dldo2>; ++ vqmmc-supply = <®_dldo4>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; @@ -139,6 +140,133 @@ index 0000000..4fc6ffd + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ wifi_wake_pin: wifi_wake_pin@0 { ++ allwinner,pins = "PL7"; ++ allwinner,function = "irq"; ++ allwinner,pull = ; ++ }; ++}; ++ ++&r_rsb { ++ status = "okay"; ++ ++ axp803: pmic@3a3 { ++ compatible = "x-powers,axp803"; ++ reg = <0x3a3>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++#include "axp803.dtsi" ++ ++®_aldo1 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vcc-csi"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pl"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dc1sw { ++ regulator-always-on; ++ regulator-name = "vcc-phy"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-name = "vdd-cpux"; ++}; ++ ++/* DCDC3 is polyphased with DCDC2 */ ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dcdc6 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-hdmi"; ++}; ++ ++®_dldo2 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-mipi"; ++}; ++ ++®_dldo3 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avdd-csi"; ++}; ++ ++®_dldo4 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++®_eldo1 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "cpvdd"; ++}; ++ ++®_eldo3 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vdd-1v8-csi"; ++}; ++ ++®_fldo1 { ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-1v2-hsic"; ++}; ++ ++®_fldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; +}; + +&usb_otg {