Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunxi: improve Pine64/SoPine board support #3951

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions target/linux/sunxi/cortexa53/config-5.4
Expand Up @@ -125,8 +125,10 @@ CONFIG_KVM_INDIRECT_VECTORS=y
CONFIG_MDIO_BUS_MUX=y
CONFIG_MICREL_PHY=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MUSB_PIO_ONLY=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_NO_IOPORT_MAP=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_PINCTRL_SUN50I_A64=y
CONFIG_PINCTRL_SUN50I_A64_R=y
CONFIG_PINCTRL_SUN50I_H5=y
Expand All @@ -150,5 +152,10 @@ CONFIG_SUN50I_H6_R_CCU=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_THREAD_INFO_IN_TASK=y
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_USB_MUSB_DUAL_ROLE=y
# CONFIG_USB_MUSB_GADGET is not set
CONFIG_USB_MUSB_HDRC=y
# CONFIG_USB_MUSB_HOST is not set
CONFIG_USB_MUSB_SUNXI=y
CONFIG_VMAP_STACK=y
CONFIG_ZONE_DMA32=y
2 changes: 2 additions & 0 deletions target/linux/sunxi/image/cortexa53.mk
Expand Up @@ -66,13 +66,15 @@ TARGET_DEVICES += olimex_a64-olinuxino-emmc
define Device/pine64_pine64-plus
DEVICE_VENDOR := Pine64
DEVICE_MODEL := Pine64+
DEVICE_PACKAGES := kmod-rtl8723bs rtl8723bs-firmware
$(Device/sun50i-a64)
endef
TARGET_DEVICES += pine64_pine64-plus

define Device/pine64_sopine-baseboard
DEVICE_VENDOR := Pine64
DEVICE_MODEL := SoPine
DEVICE_PACKAGES := kmod-rtl8723bs rtl8723bs-firmware
$(Device/sun50i-a64)
endef
TARGET_DEVICES += pine64_sopine-baseboard
Expand Down
@@ -0,0 +1,72 @@
--- linux-5.4.99/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts.orig 2021-02-17 10:35:20.000000000 +0100
+++ linux-5.4.99/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts 2021-02-28 12:41:51.658785725 +0100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refresh this patch with make target/linux/{clean,refresh} V=99, otherwise it looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - refreshed and pushed to master.

@@ -78,6 +78,11 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+ };
};

&ac_power_supply {
@@ -138,6 +143,21 @@
reg = <1>;
};
};
+
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
+ vmmc-supply = <&reg_dldo4>;
+ vqmmc-supply = <&reg_eldo1>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+
+ rtl8723cs: wifi@1 {
+ reg = <1>;
+ };
+};

&mmc2 {
pinctrl-names = "default";
--- linux-5.4.99/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts.orig 2021-02-28 13:09:50.676558278 +0100
+++ linux-5.4.99/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts 2021-02-28 13:07:20.769048096 +0100
@@ -73,6 +73,11 @@
};
};
};
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+ };
};

&codec {
@@ -146,6 +151,21 @@
status = "okay";
};

+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
+ vmmc-supply = <&reg_dldo4>;
+ vqmmc-supply = <&reg_eldo1>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+
+ rtl8723cs: wifi@1 {
+ reg = <1>;
+ };
+};
+
&ohci0 {
status = "okay";
};