mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-05 05:41:43 +00:00
Add Wifi and RTC bits to OpiLite2, changing kernel sources to mainline. HDMI is broken here. Untested ...
This commit is contained in:
parent
a997cf8d7d
commit
9fcb58b8f1
4 changed files with 117 additions and 15 deletions
|
@ -31,6 +31,13 @@ case $BRANCH in
|
|||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
KERNEL_USE_GCC='> 7.0'
|
||||
KERNELPATCHDIR='sunxi-dev-h6'
|
||||
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH='branch:linux-4.18.y'
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
KERNEL_USE_GCC='> 7.0'
|
||||
KERNELPATCHDIR='sunxi-dev'
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ new file mode 100644
|
|||
index 000000000..385015396
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
|
||||
@@ -0,0 +1,240 @@
|
||||
@@ -0,0 +1,254 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2018 Armbian
|
||||
|
@ -38,6 +38,21 @@ index 000000000..385015396
|
|||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ pwr {
|
||||
+ label = "orangepi:red:pwr";
|
||||
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ status {
|
||||
+ label = "orangepi:green:status";
|
||||
+ gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ reg_gmac_3v3: gmac-3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc-gmac-3v3";
|
||||
|
@ -114,7 +129,6 @@ index 000000000..385015396
|
|||
+ pinctrl-0 = <&mmc0_pins>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
|
@ -272,7 +286,7 @@ new file mode 100644
|
|||
index 000000000..b9aff606e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
@@ -0,0 +1,231 @@
|
||||
@@ -0,0 +1,269 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io>
|
||||
|
@ -296,6 +310,21 @@ index 000000000..b9aff606e
|
|||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ pwr {
|
||||
+ label = "orangepi:red:pwr";
|
||||
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ status {
|
||||
+ label = "orangepi:green:status";
|
||||
+ gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ reg_vcc3v3: vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3";
|
||||
|
@ -319,6 +348,14 @@ index 000000000..b9aff606e
|
|||
+ gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rtc 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
|
||||
+ post-power-on-delay-ms = <200>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
|
@ -342,18 +379,35 @@ index 000000000..b9aff606e
|
|||
+ pinctrl-0 = <&mmc0_pins>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc1_pins>;
|
||||
+ vmmc-supply = <®_cldo2>;
|
||||
+ vqmmc-supply = <®_bldo3>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ap6255: sdio_wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&r_pio>;
|
||||
+ interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ vqmmc-supply = <®_vcc1v8>;
|
||||
+ vqmmc-supply = <®_bldo3>;
|
||||
+ non-removable;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ bus-width = <8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
|
@ -377,7 +431,7 @@ index 000000000..b9aff606e
|
|||
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ x-powers,master-mode;
|
||||
+ x-powers,self-working-mode;
|
||||
+
|
||||
+ regulators {
|
||||
+ reg_aldo1: aldo1 {
|
||||
|
@ -434,12 +488,14 @@ index 000000000..b9aff606e
|
|||
+ };
|
||||
+
|
||||
+ reg_cldo2: cldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-wifi-1";
|
||||
+ };
|
||||
+
|
||||
+ reg_cldo3: cldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-wifi-2";
|
||||
|
@ -496,10 +552,6 @@ index 000000000..b9aff606e
|
|||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb3phy {
|
||||
+ phy-supply = <®_usb_vbus>;
|
||||
+ status = "okay";
|
||||
|
|
35
patch/kernel/sunxi-dev/board-h6-add-rtc-osc32k-out.patch
Normal file
35
patch/kernel/sunxi-dev/board-h6-add-rtc-osc32k-out.patch
Normal file
|
@ -0,0 +1,35 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
index bec8c4a..73ed36d 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
@@ -124,6 +124,13 @@
|
||||
clock-output-names = "osc32k";
|
||||
};
|
||||
|
||||
+ ext_osc32k: ext_osc32k_clk {
|
||||
+ #clock-cells = <0>;
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <32768>;
|
||||
+ clock-output-names = "ext_osc32k";
|
||||
+ };
|
||||
+
|
||||
psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
@@ -511,6 +526,16 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
+ rtc: rtc@7000000 {
|
||||
+ compatible = "allwinner,sun6i-a31-rtc";
|
||||
+ reg = <0x07000000 0x54>;
|
||||
+ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clock-output-names = "rtc-osc32k", "rtc-osc32k-out";
|
||||
+ clocks = <&ext_osc32k>;
|
||||
+ #clock-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
r_intc: interrupt-controller@7021000 {
|
||||
compatible = "allwinner,sun50i-h6-r-intc",
|
||||
"allwinner,sun6i-a31-r-intc";
|
|
@ -17,10 +17,10 @@ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/
|
|||
index d4697bb..19c7ee8 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
@@ -125,12 +125,68 @@
|
||||
@@ -125,12 +125,76 @@
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
|
||||
|
||||
+ mmc0_pins: mmc0-pins {
|
||||
+ pins = "PF0", "PF1", "PF2", "PF3",
|
||||
+ "PF4", "PF5";
|
||||
|
@ -29,6 +29,14 @@ index d4697bb..19c7ee8 100644
|
|||
+ bias-pull-up;
|
||||
+ };
|
||||
+
|
||||
+ mmc1_pins: mmc1-pins {
|
||||
+ pins = "PG0", "PG1", "PG2", "PG3",
|
||||
+ "PG4", "PG5";
|
||||
+ function = "mmc1";
|
||||
+ drive-strength = <30>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+
|
||||
+ mmc2_pins: mmc2-pins {
|
||||
+ pins = "PC1", "PC4", "PC5", "PC6",
|
||||
+ "PC7", "PC8", "PC9", "PC10",
|
||||
|
@ -43,7 +51,7 @@ index d4697bb..19c7ee8 100644
|
|||
function = "uart0";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+ mmc0: mmc@4020000 {
|
||||
+ compatible = "allwinner,sun50i-h6-mmc";
|
||||
+ reg = <0x04020000 0x1000>;
|
||||
|
@ -86,6 +94,6 @@ index d4697bb..19c7ee8 100644
|
|||
uart0: serial@5000000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x05000000 0x400>;
|
||||
--
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue