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

[pine64-kernel-5.6.y] Pick up changes from upstream to add support for PinePhone 1.2 ("CE") boards #1

Open
wants to merge 4 commits into
base: pine64-kernel-5.6.y-sailfishos
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/allwinner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.0.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.1.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
Expand Down
31 changes: 31 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2020 Marius Gripsgard <[email protected]>

/dts-v1/;

#include "sun50i-a64-pinephone.dtsi"

#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>

/ {
model = "Pine64 PinePhone (1.2)";
compatible = "pine64,pinephone-1.2", "allwinner,sun50i-a64";

gpio-keys {
compatible = "gpio-keys";

ring-indicator {
label = "Ring Indicator";
gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
linux,code = <KEY_WAKEUP>;
wakeup-event-action = <EV_ACT_ASSERTED>;
wakeup-source;
};
};
};

&sgm3140 {
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
};
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@

&reg_dldo4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-wifi-io";
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
resets = <&ccu RST_BUS_GPU>;

assigned-clocks = <&ccu CLK_GPU>;
assigned-clock-rates = <432000000>;
assigned-clock-rates = <500000000>;
};

gic: interrupt-controller@1c81000 {
Expand Down
10 changes: 10 additions & 0 deletions drivers/usb/musb/sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ static u8 sunxi_musb_readb(void __iomem *addr, u32 offset)
return 0xde;

return readb(addr + SUNXI_MUSB_CONFIGDATA);

case MUSB_ULPI_BUSCONTROL:
return 0; /* ULPI buscontrol is not supported on sunix */

/* Offset for these is fixed by sunxi_musb_busctl_offset() */
case SUNXI_MUSB_TXFUNCADDR:
case SUNXI_MUSB_TXHUBADDR:
Expand Down Expand Up @@ -494,6 +498,12 @@ static void sunxi_musb_writeb(void __iomem *addr, unsigned offset, u8 data)
return writeb(data, addr + SUNXI_MUSB_TXFIFOSZ);
case MUSB_RXFIFOSZ:
return writeb(data, addr + SUNXI_MUSB_RXFIFOSZ);

case MUSB_ULPI_BUSCONTROL:
if (data)
dev_warn(sunxi_musb->controller->parent,
"sunxi-musb does not have ULPI buscontrol\n");
return;
/* Offset for these is fixed by sunxi_musb_busctl_offset() */
case SUNXI_MUSB_TXFUNCADDR:
case SUNXI_MUSB_TXHUBADDR:
Expand Down