Fixes and enhancements to some AllWinner Pine64 devices
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
This commit is contained in:
parent
55159bd6fe
commit
70c4f19642
1218
Add-LCD-support-for-Pine64-Pinebook-1080p.patch
Normal file
1218
Add-LCD-support-for-Pine64-Pinebook-1080p.patch
Normal file
File diff suppressed because it is too large
Load Diff
69
arm64-a64-mbus.patch
Normal file
69
arm64-a64-mbus.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From daae9f66b29a04a94708b1b5a9b61e3ee14df031 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Mon, 10 Feb 2020 18:06:52 +0100
|
||||
Subject: [PATCH 1/2] dt-bindings: interconnect: sunxi: Add A64 MBUS compatible
|
||||
|
||||
A64 contains MBUS controller. Add a compatible for it.
|
||||
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml b/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
|
||||
index 9370e64992dd..aa0738b4d534 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
|
||||
@@ -30,6 +30,7 @@ properties:
|
||||
enum:
|
||||
- allwinner,sun5i-a13-mbus
|
||||
- allwinner,sun8i-h3-mbus
|
||||
+ - allwinner,sun50i-a64-mbus
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 410bb2be7e1f1d329c238e2d6d06b6c25dcee404 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Mon, 10 Feb 2020 18:06:54 +0100
|
||||
Subject: [PATCH 2/2] arm64: dts: allwinner: a64: Add MBUS controller node
|
||||
|
||||
A64 contains MBUS, which is the bus used by DMA devices to access
|
||||
system memory.
|
||||
|
||||
MBUS controller is responsible for arbitration between channels based
|
||||
on set priority and can do some other things as well, like report
|
||||
bandwidth used. It also maps RAM region to different address than CPU.
|
||||
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
index 862b47dc9dc9..251c91724de1 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
@@ -1061,6 +1061,14 @@ pwm: pwm@1c21400 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ mbus: dram-controller@1c62000 {
|
||||
+ compatible = "allwinner,sun50i-a64-mbus";
|
||||
+ reg = <0x01c62000 0x1000>;
|
||||
+ clocks = <&ccu 112>;
|
||||
+ dma-ranges = <0x00000000 0x40000000 0xc0000000>;
|
||||
+ #interconnect-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
csi: csi@1cb0000 {
|
||||
compatible = "allwinner,sun50i-a64-csi";
|
||||
reg = <0x01cb0000 0x1000>;
|
||||
--
|
||||
2.24.1
|
||||
|
568
arm64-pine64-pinephone.patch
Normal file
568
arm64-pine64-pinephone.patch
Normal file
@ -0,0 +1,568 @@
|
||||
From 836821a0addbd8589e949801aaa7be244703c7f8 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Thu, 27 Feb 2020 02:26:48 +0100
|
||||
Subject: [PATCH 1/3] arm64: dts: sun50i-a64: Add i2c2 pins
|
||||
|
||||
PinePhone needs I2C2 pins description. Add it, and make it default
|
||||
for i2c2, since it's the only possiblilty.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
index 862b47dc9dc9..107a48f9c5b3 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
@@ -671,6 +671,11 @@ i2c1_pins: i2c1-pins {
|
||||
function = "i2c1";
|
||||
};
|
||||
|
||||
+ i2c2_pins: i2c2-pins {
|
||||
+ pins = "PE14", "PE15";
|
||||
+ function = "i2c2";
|
||||
+ };
|
||||
+
|
||||
/omit-if-no-ref/
|
||||
lcd_rgb666_pins: lcd-rgb666-pins {
|
||||
pins = "PD0", "PD1", "PD2", "PD3", "PD4",
|
||||
@@ -958,12 +963,13 @@ i2c2: i2c@1c2b400 {
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_I2C2>;
|
||||
resets = <&ccu RST_BUS_I2C2>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c2_pins>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
-
|
||||
spi0: spi@1c68000 {
|
||||
compatible = "allwinner,sun8i-h3-spi";
|
||||
reg = <0x01c68000 0x1000>;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 5c4e2cd9e8b600cc622c10543f69fcd897557eee Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Thu, 27 Feb 2020 02:26:49 +0100
|
||||
Subject: [PATCH 2/3] dt-bindings: arm: sunxi: Add PinePhone 1.0 and 1.1
|
||||
bindings
|
||||
|
||||
Document board compatible names for Pine64 PinePhone:
|
||||
|
||||
- 1.0 - Developer variant
|
||||
- 1.1 - Braveheart variant
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/sunxi.yaml | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
|
||||
index 159060b65c5d..c632252be48b 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
|
||||
@@ -636,6 +636,16 @@ properties:
|
||||
- const: pine64,pinebook
|
||||
- const: allwinner,sun50i-a64
|
||||
|
||||
+ - description: Pine64 PinePhone Developer Batch (1.0)
|
||||
+ items:
|
||||
+ - const: pine64,pinephone-1.0
|
||||
+ - const: allwinner,sun50i-a64
|
||||
+
|
||||
+ - description: Pine64 PinePhone Braveheart (1.1)
|
||||
+ items:
|
||||
+ - const: pine64,pinephone-1.1
|
||||
+ - const: allwinner,sun50i-a64
|
||||
+
|
||||
- description: Pine64 PineTab
|
||||
items:
|
||||
- const: pine64,pinetab
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 697f60799172569e8d502a44ad98994f2c48778c Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Thu, 27 Feb 2020 02:26:50 +0100
|
||||
Subject: [PATCH 3/3] arm64: dts: allwinner: Add initial support for Pine64
|
||||
PinePhone
|
||||
|
||||
At the moment PinePhone comes in two slightly incompatible variants:
|
||||
|
||||
- 1.0: Early Developer Batch
|
||||
- 1.1: Braveheart Batch
|
||||
|
||||
There will be at least one more incompatible variant in the very near
|
||||
future, so let's start by sharing the dtsi among multiple variants,
|
||||
right away, even though the HW description doesn't yet include the
|
||||
different bits.
|
||||
|
||||
The differences between 1.0 and 1.1 are: change in pins that control
|
||||
the flash LED, differences in modem power status signal routing, and
|
||||
maybe some other subtler things, that have not been determined yet.
|
||||
|
||||
This is a basic DT that includes only features that are already
|
||||
supported by mainline drivers.
|
||||
|
||||
Co-developed-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Co-developed-by: Martijn Braam <martijn@brixit.nl>
|
||||
Signed-off-by: Martijn Braam <martijn@brixit.nl>
|
||||
Co-developed-by: Luca Weiss <luca@z3ntu.xyz>
|
||||
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
|
||||
Signed-off-by: Bhushan Shah <bshah@kde.org>
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/Makefile | 2 +
|
||||
.../allwinner/sun50i-a64-pinephone-1.0.dts | 11 +
|
||||
.../allwinner/sun50i-a64-pinephone-1.1.dts | 11 +
|
||||
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 379 ++++++++++++++++++
|
||||
4 files changed, 403 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
|
||||
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
||||
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
|
||||
index 6dad63881cd3..e4d3cd0ac5bb 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/Makefile
|
||||
+++ b/arch/arm64/boot/dts/allwinner/Makefile
|
||||
@@ -9,6 +9,8 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-lts.dtb
|
||||
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-pinetab.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
|
||||
new file mode 100644
|
||||
index 000000000000..0c42272106af
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
|
||||
@@ -0,0 +1,11 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "sun50i-a64-pinephone.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Pine64 PinePhone Developer Batch (1.0)";
|
||||
+ compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64";
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
||||
new file mode 100644
|
||||
index 000000000000..06a775c41664
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
||||
@@ -0,0 +1,11 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "sun50i-a64-pinephone.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Pine64 PinePhone Braveheart (1.1)";
|
||||
+ compatible = "pine64,pinephone-1.1", "allwinner,sun50i-a64";
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..cefda145c3c9
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
@@ -0,0 +1,379 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+// Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
|
||||
+// Copyright (C) 2020 Martijn Braam <martijn@brixit.nl>
|
||||
+// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
|
||||
+
|
||||
+#include "sun50i-a64.dtsi"
|
||||
+#include "sun50i-a64-cpu-opp.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pwm/pwm.h>
|
||||
+
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ blue {
|
||||
+ function = LED_FUNCTION_INDICATOR;
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
|
||||
+ };
|
||||
+
|
||||
+ green {
|
||||
+ function = LED_FUNCTION_INDICATOR;
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
|
||||
+ };
|
||||
+
|
||||
+ red {
|
||||
+ function = LED_FUNCTION_INDICATOR;
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ speaker_amp: audio-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
|
||||
+ sound-name-prefix = "Speaker Amp";
|
||||
+ };
|
||||
+
|
||||
+ vibrator {
|
||||
+ compatible = "gpio-vibrator";
|
||||
+ enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
|
||||
+ vcc-supply = <®_dcdc1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&codec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&codec_analog {
|
||||
+ cpvdd-supply = <®_eldo1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&dai {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ehci0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ehci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /* Magnetometer */
|
||||
+ lis3mdl@1e {
|
||||
+ compatible = "st,lis3mdl-magn";
|
||||
+ reg = <0x1e>;
|
||||
+ vdd-supply = <®_dldo1>;
|
||||
+ vddio-supply = <®_dldo1>;
|
||||
+ };
|
||||
+
|
||||
+ /* Accelerometer/gyroscope */
|
||||
+ mpu6050@68 {
|
||||
+ compatible = "invensense,mpu6050";
|
||||
+ reg = <0x68>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
|
||||
+ vdd-supply = <®_dldo1>;
|
||||
+ vddio-supply = <®_dldo1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* Connected to pogo pins (external spring based pinheader for user addons) */
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&lradc {
|
||||
+ vref-supply = <®_aldo3>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ button-200 {
|
||||
+ label = "Volume Up";
|
||||
+ linux,code = <KEY_VOLUMEUP>;
|
||||
+ channel = <0>;
|
||||
+ voltage = <200000>;
|
||||
+ };
|
||||
+
|
||||
+ button-400 {
|
||||
+ label = "Volume Down";
|
||||
+ linux,code = <KEY_VOLUMEDOWN>;
|
||||
+ channel = <0>;
|
||||
+ voltage = <400000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins>;
|
||||
+ vmmc-supply = <®_dcdc1>;
|
||||
+ vqmmc-supply = <®_dcdc1>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
+ disable-wp;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins>;
|
||||
+ vmmc-supply = <®_dcdc1>;
|
||||
+ vqmmc-supply = <®_dcdc1>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ohci0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ohci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pio {
|
||||
+ vcc-pb-supply = <®_dcdc1>;
|
||||
+ vcc-pc-supply = <®_dcdc1>;
|
||||
+ vcc-pd-supply = <®_dcdc1>;
|
||||
+ vcc-pe-supply = <®_aldo1>;
|
||||
+ vcc-pf-supply = <®_dcdc1>;
|
||||
+ vcc-pg-supply = <®_dldo4>;
|
||||
+ vcc-ph-supply = <®_dcdc1>;
|
||||
+};
|
||||
+
|
||||
+&r_pio {
|
||||
+ /*
|
||||
+ * FIXME: We can't add that supply for now since it would
|
||||
+ * create a circular dependency between pinctrl, the regulator
|
||||
+ * and the RSB Bus.
|
||||
+ *
|
||||
+ * vcc-pl-supply = <®_aldo2>;
|
||||
+ */
|
||||
+};
|
||||
+
|
||||
+&r_rsb {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ axp803: pmic@3a3 {
|
||||
+ compatible = "x-powers,axp803";
|
||||
+ reg = <0x3a3>;
|
||||
+ interrupt-parent = <&r_intc>;
|
||||
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+#include "axp803.dtsi"
|
||||
+
|
||||
+&ac_power_supply {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&battery_power_supply {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_aldo1 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "dovdd-csi";
|
||||
+};
|
||||
+
|
||||
+®_aldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-pl";
|
||||
+};
|
||||
+
|
||||
+®_aldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <2700000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-pll-avcc";
|
||||
+};
|
||||
+
|
||||
+®_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 = <1200000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
+ 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-dsi-sensor";
|
||||
+};
|
||||
+
|
||||
+®_dldo2 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-mipi-io";
|
||||
+};
|
||||
+
|
||||
+®_dldo3 {
|
||||
+ regulator-min-microvolt = <2800000>;
|
||||
+ regulator-max-microvolt = <2800000>;
|
||||
+ regulator-name = "avdd-csi";
|
||||
+};
|
||||
+
|
||||
+®_dldo4 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-wifi-io";
|
||||
+};
|
||||
+
|
||||
+®_eldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-lpddr";
|
||||
+};
|
||||
+
|
||||
+®_eldo3 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "dvdd-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";
|
||||
+};
|
||||
+
|
||||
+®_ldo_io0 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-lcd-ctp-stk";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_ldo_io1 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-1v8-typec";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_rtc_ldo {
|
||||
+ regulator-name = "vcc-rtc";
|
||||
+};
|
||||
+
|
||||
+&sound {
|
||||
+ status = "okay";
|
||||
+ simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
|
||||
+ simple-audio-card,widgets = "Microphone", "Headset Microphone",
|
||||
+ "Microphone", "Internal Microphone",
|
||||
+ "Headphone", "Headphone Jack",
|
||||
+ "Speaker", "Internal Earpiece",
|
||||
+ "Speaker", "Internal Speaker";
|
||||
+ simple-audio-card,routing =
|
||||
+ "Headphone Jack", "HP",
|
||||
+ "Internal Earpiece", "EARPIECE",
|
||||
+ "Internal Speaker", "Speaker Amp OUTL",
|
||||
+ "Internal Speaker", "Speaker Amp OUTR",
|
||||
+ "Speaker Amp INL", "LINEOUT",
|
||||
+ "Speaker Amp INR", "LINEOUT",
|
||||
+ "Left DAC", "AIF1 Slot 0 Left",
|
||||
+ "Right DAC", "AIF1 Slot 0 Right",
|
||||
+ "AIF1 Slot 0 Left ADC", "Left ADC",
|
||||
+ "AIF1 Slot 0 Right ADC", "Right ADC",
|
||||
+ "Internal Microphone", "MBIAS",
|
||||
+ "MIC1", "Internal Microphone",
|
||||
+ "Headset Microphone", "HBIAS",
|
||||
+ "MIC2", "Headset Microphone";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pb_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* Connected to the modem (hardware flow control can't be used) */
|
||||
+&uart3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart3_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_otg {
|
||||
+ dr_mode = "peripheral";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_power_supply {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.24.1
|
||||
|
583
arm64-pine64-pinetab.patch
Normal file
583
arm64-pine64-pinetab.patch
Normal file
@ -0,0 +1,583 @@
|
||||
From e15d9c7cb74033f668c19a65abfd77ed7331f91e Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Thu, 16 Jan 2020 11:36:35 +0800
|
||||
Subject: [PATCH 1/2] dt-bindings: arm: sunxi: add binding for PineTab tablet
|
||||
|
||||
Add the device tree binding for Pine64's PineTab tablet, which uses
|
||||
Allwinner A64 SoC.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
|
||||
index 327ce6730823..159060b65c5d 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
|
||||
@@ -636,6 +636,11 @@ properties:
|
||||
- const: pine64,pinebook
|
||||
- const: allwinner,sun50i-a64
|
||||
|
||||
+ - description: Pine64 PineTab
|
||||
+ items:
|
||||
+ - const: pine64,pinetab
|
||||
+ - const: allwinner,sun50i-a64
|
||||
+
|
||||
- description: Pine64 SoPine Baseboard
|
||||
items:
|
||||
- const: pine64,sopine-baseboard
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From d7b56d337bb980f0b996958ec6808253c4f50771 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Thu, 16 Jan 2020 11:36:36 +0800
|
||||
Subject: [PATCH 2/2] arm64: dts: allwinner: a64: add support for PineTab
|
||||
|
||||
PineTab is a 10.1" tablet by Pine64 with Allwinner A64 inside.
|
||||
|
||||
It includes the following peripherals:
|
||||
|
||||
USB:
|
||||
- A microUSB Type-B port connected to the OTG-capable USB PHY of
|
||||
Allwinner A64. The ID pin is connected to a GPIO of the A64 SoC, and the
|
||||
Vbus is connected to the Vbus of AXP803 PMIC. These enables OTG
|
||||
functionality on this port.
|
||||
- A USB Type-A port is connected to the internal hub attached to the
|
||||
non-OTG USB PHY of Allwinner A64.
|
||||
- There are reserved pins for an external keyboard connected to the
|
||||
internal hub.
|
||||
|
||||
Power:
|
||||
- The microUSB port has its Vbus connected to AXP803, mentioned above.
|
||||
- A DC jack (of a strange size, 2.5mm outer diameter) is connected to
|
||||
the ACIN of AXP803.
|
||||
- A Li-Polymer battery is connected to the battery pins of AXP803.
|
||||
|
||||
Storage:
|
||||
- An tradition Pine64 eMMC slot is on the board, mounted with an eMMC
|
||||
module by factory.
|
||||
- An external microSD slot is hidden under a protect case.
|
||||
|
||||
Display:
|
||||
- A MIPI-DSI LCD panel (800x1280) is connected to the DSI port of A64 SoC.
|
||||
- A mini HDMI port.
|
||||
|
||||
Input:
|
||||
- A touch panel attached to a Goodix GT9271 touch controller.
|
||||
- Volume keys connected to the LRADC of the A64 SoC.
|
||||
|
||||
Camera:
|
||||
- An OV5640 CMOS camera is at rear, connected to the CSI bus of A64 SoC.
|
||||
- A GC2145 CMOS camera is at front, shares the same CSI bus with OV5640.
|
||||
|
||||
Audio:
|
||||
- A headphone jack is conencted to the SoC's internal codec.
|
||||
- A speaker connected is to the Line Out port of SoC's internal codec, via
|
||||
an amplifier.
|
||||
|
||||
Misc:
|
||||
- Debug UART is muxed with the headphone jack, with the switch next to
|
||||
the microSD slot.
|
||||
- A bosch BMA223 accelerometer is connected to the I2C bus of A64 SoC.
|
||||
- Wi-Fi and Bluetooth are available via a RTL8723CS chip, similar to the
|
||||
one in Pinebook.
|
||||
|
||||
This commit adds a basically usable device tree for it, implementing
|
||||
most of the features mentioned above. HDMI is not supported now because
|
||||
bad LCD-HDMI coexistence situation of mainline A64 display driver, the
|
||||
front camera currently lacks a driver and a facility to share the bus
|
||||
with the rear one, and the accelerometer currently lacks a DT binding.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/Makefile | 1 +
|
||||
.../boot/dts/allwinner/sun50i-a64-pinetab.dts | 460 ++++++++++++++++++
|
||||
2 files changed, 461 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
|
||||
index cf4f78617c3f..6dad63881cd3 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/Makefile
|
||||
+++ b/arch/arm64/boot/dts/allwinner/Makefile
|
||||
@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-lts.dtb
|
||||
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-pinetab.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus.dtb
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
|
||||
new file mode 100644
|
||||
index 000000000000..316e8a443913
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
|
||||
@@ -0,0 +1,460 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "sun50i-a64.dtsi"
|
||||
+#include "sun50i-a64-cpu-opp.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/pwm/pwm.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "PineTab";
|
||||
+ compatible = "pine64,pinetab", "allwinner,sun50i-a64";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ ethernet0 = &rtl8723cs;
|
||||
+ };
|
||||
+
|
||||
+ backlight: backlight {
|
||||
+ compatible = "pwm-backlight";
|
||||
+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
+ brightness-levels = <0 16 18 20 22 24 26 29 32 35 38 42 46 51 56 62 68 75 83 91 100>;
|
||||
+ default-brightness-level = <15>;
|
||||
+ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
|
||||
+ power-supply = <&vdd_bl>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ i2c-csi {
|
||||
+ compatible = "i2c-gpio";
|
||||
+ sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */
|
||||
+ scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* PE12 */
|
||||
+ i2c-gpio,delay-us = <5>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ /* Rear camera */
|
||||
+ ov5640: camera@3c {
|
||||
+ compatible = "ovti,ov5640";
|
||||
+ reg = <0x3c>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&csi_mclk_pin>;
|
||||
+ clocks = <&ccu CLK_CSI_MCLK>;
|
||||
+ clock-names = "xclk";
|
||||
+
|
||||
+ AVDD-supply = <®_dldo3>;
|
||||
+ DOVDD-supply = <®_aldo1>;
|
||||
+ DVDD-supply = <®_eldo3>;
|
||||
+ reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* PE14 */
|
||||
+ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
|
||||
+
|
||||
+ port {
|
||||
+ ov5640_ep: endpoint {
|
||||
+ remote-endpoint = <&csi_ep>;
|
||||
+ bus-width = <8>;
|
||||
+ hsync-active = <1>; /* Active high */
|
||||
+ vsync-active = <0>; /* Active low */
|
||||
+ data-active = <1>; /* Active high */
|
||||
+ pclk-sample = <1>; /* Rising */
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ speaker_amp: audio-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
|
||||
+ sound-name-prefix = "Speaker Amp";
|
||||
+ };
|
||||
+
|
||||
+ vdd_bl: regulator@0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "bl-3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
|
||||
+ post-power-on-delay-ms = <200>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&codec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&codec_analog {
|
||||
+ hpvcc-supply = <®_eldo1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <®_dcdc2>;
|
||||
+};
|
||||
+
|
||||
+&csi {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ csi_ep: endpoint {
|
||||
+ remote-endpoint = <&ov5640_ep>;
|
||||
+ bus-width = <8>;
|
||||
+ hsync-active = <1>; /* Active high */
|
||||
+ vsync-active = <0>; /* Active low */
|
||||
+ data-active = <1>; /* Active high */
|
||||
+ pclk-sample = <1>; /* Rising */
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&dai {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dsi {
|
||||
+ vcc-dsi-supply = <®_dldo1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ panel@0 {
|
||||
+ compatible = "feixin,k101-im2ba02";
|
||||
+ reg = <0>;
|
||||
+ avdd-supply = <®_dc1sw>;
|
||||
+ dvdd-supply = <®_dc1sw>;
|
||||
+ cvdd-supply = <®_ldo_io1>;
|
||||
+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
|
||||
+ backlight = <&backlight>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ehci0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ehci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ touchscreen@5d {
|
||||
+ compatible = "goodix,gt9271";
|
||||
+ reg = <0x5d>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
|
||||
+ irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
|
||||
+ reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
|
||||
+ AVDD28-supply = <®_ldo_io1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c0_pins {
|
||||
+ bias-pull-up;
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /* TODO: add Bochs BMA223 accelerometer here */
|
||||
+};
|
||||
+
|
||||
+&lradc {
|
||||
+ vref-supply = <®_aldo3>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ button-200 {
|
||||
+ label = "Volume Up";
|
||||
+ linux,code = <KEY_VOLUMEUP>;
|
||||
+ channel = <0>;
|
||||
+ voltage = <200000>;
|
||||
+ };
|
||||
+
|
||||
+ button-400 {
|
||||
+ label = "Volume Down";
|
||||
+ linux,code = <KEY_VOLUMEDOWN>;
|
||||
+ channel = <0>;
|
||||
+ voltage = <400000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins>;
|
||||
+ vmmc-supply = <®_dcdc1>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc1_pins>;
|
||||
+ vmmc-supply = <®_dldo4>;
|
||||
+ vqmmc-supply = <®_eldo1>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rtl8723cs: wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins>;
|
||||
+ vmmc-supply = <®_dcdc1>;
|
||||
+ vqmmc-supply = <®_dcdc1>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ohci0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&r_rsb {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ axp803: pmic@3a3 {
|
||||
+ compatible = "x-powers,axp803";
|
||||
+ reg = <0x3a3>;
|
||||
+ interrupt-parent = <&r_intc>;
|
||||
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ x-powers,drive-vbus-en;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+#include "axp803.dtsi"
|
||||
+
|
||||
+&ac_power_supply {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&battery_power_supply {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_aldo1 {
|
||||
+ regulator-min-microvolt = <2800000>;
|
||||
+ regulator-max-microvolt = <2800000>;
|
||||
+ regulator-name = "dovdd-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-name = "vcc-lcd";
|
||||
+};
|
||||
+
|
||||
+®_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 = <1200000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
+ regulator-name = "vcc-dram";
|
||||
+};
|
||||
+
|
||||
+®_dcdc6 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1100000>;
|
||||
+ regulator-name = "vdd-sys";
|
||||
+};
|
||||
+
|
||||
+®_dldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-hdmi-dsi-sensor";
|
||||
+};
|
||||
+
|
||||
+®_dldo3 {
|
||||
+ regulator-min-microvolt = <2800000>;
|
||||
+ regulator-max-microvolt = <2800000>;
|
||||
+ regulator-name = "avdd-csi";
|
||||
+};
|
||||
+
|
||||
+®_dldo4 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-wifi";
|
||||
+};
|
||||
+
|
||||
+®_drivevbus {
|
||||
+ regulator-name = "usb0-vbus";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_eldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "cpvdd";
|
||||
+};
|
||||
+
|
||||
+®_eldo2 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcca-1v8";
|
||||
+};
|
||||
+
|
||||
+®_eldo3 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "dvdd-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";
|
||||
+};
|
||||
+
|
||||
+®_ldo_io0 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-usb";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_ldo_io1 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-enable-ramp-delay = <3500000>;
|
||||
+ regulator-name = "vcc-touchscreen";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+®_rtc_ldo {
|
||||
+ regulator-name = "vcc-rtc";
|
||||
+};
|
||||
+
|
||||
+&sound {
|
||||
+ status = "okay";
|
||||
+ simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
|
||||
+ simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
|
||||
+ "Microphone", "Internal Microphone Right",
|
||||
+ "Headphone", "Headphone Jack",
|
||||
+ "Speaker", "Internal Speaker";
|
||||
+ simple-audio-card,routing =
|
||||
+ "Left DAC", "AIF1 Slot 0 Left",
|
||||
+ "Right DAC", "AIF1 Slot 0 Right",
|
||||
+ "Speaker Amp INL", "LINEOUT",
|
||||
+ "Speaker Amp INR", "LINEOUT",
|
||||
+ "Internal Speaker", "Speaker Amp OUTL",
|
||||
+ "Internal Speaker", "Speaker Amp OUTR",
|
||||
+ "Headphone Jack", "HP",
|
||||
+ "AIF1 Slot 0 Left ADC", "Left ADC",
|
||||
+ "AIF1 Slot 0 Right ADC", "Right ADC",
|
||||
+ "Internal Microphone Left", "MBIAS",
|
||||
+ "MIC1", "Internal Microphone Left",
|
||||
+ "Internal Microphone Right", "HBIAS",
|
||||
+ "MIC2", "Internal Microphone Right";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pb_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_otg {
|
||||
+ dr_mode = "otg";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_power_supply {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
|
||||
+ usb0_vbus_power-supply = <&usb_power_supply>;
|
||||
+ usb0_vbus-supply = <®_drivevbus>;
|
||||
+ usb1_vbus-supply = <®_ldo_io0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.24.1
|
||||
|
429
arm64-pinebook-fixes.patch
Normal file
429
arm64-pinebook-fixes.patch
Normal file
@ -0,0 +1,429 @@
|
||||
From e7a6e6b0c6506a9f070dbfb2ca948770c47a1d78 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:30:57 -0600
|
||||
Subject: [PATCH 1/8] arm64: dts: allwinner: pinebook: Remove unused vcc3v3
|
||||
regulator
|
||||
|
||||
This fixed regulator has no consumers, GPIOs, or other connections.
|
||||
Remove it.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index 3d894b208901..ff32ca1a495e 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -63,13 +63,6 @@ lid_switch {
|
||||
};
|
||||
};
|
||||
|
||||
- reg_vcc3v3: vcc3v3 {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "vcc3v3";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- };
|
||||
-
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 5eea216437eeff908d6d2942bf893fb77ebfc111 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:30:59 -0600
|
||||
Subject: [PATCH 2/8] arm64: dts: allwinner: pinebook: Sort device tree nodes
|
||||
|
||||
The r_i2c node should come before r_rsb, and in any case should not
|
||||
separate the axp803 node from its subnodes.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index ff32ca1a495e..77784f7b1da7 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -172,6 +172,14 @@ &pwm {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+/* The ANX6345 eDP-bridge is on r_i2c */
|
||||
+&r_i2c {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&r_i2c_pl89_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
@@ -183,14 +191,6 @@ axp803: pmic@3a3 {
|
||||
};
|
||||
};
|
||||
|
||||
-/* The ANX6345 eDP-bridge is on r_i2c */
|
||||
-&r_i2c {
|
||||
- clock-frequency = <100000>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&r_i2c_pl89_pins>;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
#include "axp803.dtsi"
|
||||
|
||||
&ac_power_supply {
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 4bdf53ffc64e5c6738c942dcdc422d5ca8a2070a Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:31:00 -0600
|
||||
Subject: [PATCH 3/8] arm64: dts: allwinner: pinebook: Make simplefb more
|
||||
consistent
|
||||
|
||||
Boards generally reference the simplefb nodes from the SoC dtsi by
|
||||
label, not by full path. simplefb_hdmi is already like this in the
|
||||
Pinebook DTS. Update simplefb_lcd to match.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index 77784f7b1da7..224bed65d008 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -41,12 +41,6 @@ backlight: backlight {
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
-
|
||||
- framebuffer-lcd {
|
||||
- panel-supply = <®_dc1sw>;
|
||||
- dvdd25-supply = <®_dldo2>;
|
||||
- dvdd12-supply = <®_fldo1>;
|
||||
- };
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
@@ -316,6 +310,12 @@ ®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_lcd {
|
||||
+ panel-supply = <®_dc1sw>;
|
||||
+ dvdd25-supply = <®_dldo2>;
|
||||
+ dvdd12-supply = <®_fldo1>;
|
||||
+};
|
||||
+
|
||||
&simplefb_hdmi {
|
||||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From c0f416de7141bbc713f080ad123b256f6320ec92 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:31:01 -0600
|
||||
Subject: [PATCH 4/8] arm64: dts: allwinner: pinebook: Document MMC0 CD pin
|
||||
name
|
||||
|
||||
Normally GPIO pin references are followed by a comment giving the pin
|
||||
name for searchability. Add the comment here where it was missing.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index 224bed65d008..a1e15777d524 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -119,7 +119,7 @@ &mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
disable-wp;
|
||||
bus-width = <4>;
|
||||
status = "okay";
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 8818d55ec31fa6e0dc14fb7a4924b3e8d3ecef7d Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:31:02 -0600
|
||||
Subject: [PATCH 5/8] arm64: dts: allwinner: pinebook: Add GPIO port regulators
|
||||
|
||||
Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL.
|
||||
|
||||
VCC-PC and VCC-PG are supplied by ELDO1 at 1.8v.
|
||||
VCC-PD is supplied by DCDC1 (VCC-IO) at 3.3v.
|
||||
VCC-PE is supplied by ALDO1, and is unused.
|
||||
|
||||
VCC-PL creates a circular dependency, so it is omitted for now.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../boot/dts/allwinner/sun50i-a64-pinebook.dts | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index a1e15777d524..1ec39120323f 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -162,6 +162,13 @@ &ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&pio {
|
||||
+ vcc-pc-supply = <®_eldo1>;
|
||||
+ vcc-pd-supply = <®_dcdc1>;
|
||||
+ vcc-pe-supply = <®_aldo1>;
|
||||
+ vcc-pg-supply = <®_eldo1>;
|
||||
+};
|
||||
+
|
||||
&pwm {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -174,6 +181,16 @@ &r_i2c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&r_pio {
|
||||
+ /*
|
||||
+ * FIXME: We can't add that supply for now since it would
|
||||
+ * create a circular dependency between pinctrl, the regulator
|
||||
+ * and the RSB Bus.
|
||||
+ *
|
||||
+ * vcc-pl-supply = <®_aldo2>;
|
||||
+ */
|
||||
+};
|
||||
+
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From bd863f25d41173e140850772f9a02ffb3b3e0d6b Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:31:03 -0600
|
||||
Subject: [PATCH 6/8] arm64: dts: allwinner: pinebook: Fix backlight regulator
|
||||
|
||||
The output from the backlight regulator is labeled as "VBKLT" in the
|
||||
schematic. Using the equation and resistor values from the schematic,
|
||||
the output is approximately 18V, not 3.3V. Since the regulator in use
|
||||
(SS6640STR) is a boost regulator powered by PS (battery or AC input),
|
||||
which are both >3.3V, the output could not be 3.3V anyway.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../dts/allwinner/sun50i-a64-pinebook.dts | 20 +++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index 1ec39120323f..313f4e6edc19 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -21,22 +21,13 @@ aliases {
|
||||
ethernet0 = &rtl8723cs;
|
||||
};
|
||||
|
||||
- vdd_bl: regulator@0 {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "bl-3v3";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
- enable-active-high;
|
||||
- };
|
||||
-
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 50000 0>;
|
||||
brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>;
|
||||
default-brightness-level = <2>;
|
||||
enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
|
||||
- power-supply = <&vdd_bl>;
|
||||
+ power-supply = <®_vbklt>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -57,6 +48,15 @@ lid_switch {
|
||||
};
|
||||
};
|
||||
|
||||
+ reg_vbklt: vbklt {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vbklt";
|
||||
+ regulator-min-microvolt = <18000000>;
|
||||
+ regulator-max-microvolt = <18000000>;
|
||||
+ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From 425472eb612873c9c64b41df70020de58448bef3 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:31:04 -0600
|
||||
Subject: [PATCH 7/8] arm64: dts: allwinner: pinebook: Fix 5v0 boost regulator
|
||||
|
||||
Now that AXP803 GPIO support is available, we can properly model
|
||||
the hardware. Replace the use of GPIO0-LDO with a fixed regulator
|
||||
controlled by GPIO0. This boost regulator is used to power the
|
||||
(internal and external) USB ports, as well as the speakers.
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../dts/allwinner/sun50i-a64-pinebook.dts | 27 +++++++++----------
|
||||
1 file changed, 12 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index 313f4e6edc19..c06c540e6c08 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -57,6 +57,15 @@ reg_vbklt: vbklt {
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
+ reg_vcc5v0: vcc5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&axp_gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
|
||||
@@ -64,12 +73,7 @@ wifi_pwrseq: wifi_pwrseq {
|
||||
|
||||
speaker_amp: audio-amplifier {
|
||||
compatible = "simple-audio-amplifier";
|
||||
- /*
|
||||
- * TODO This is actually a fixed regulator controlled by
|
||||
- * the GPIO line on the PMIC. This should be corrected
|
||||
- * once GPIO support is added for this PMIC.
|
||||
- */
|
||||
- VCC-supply = <®_ldo_io0>;
|
||||
+ VCC-supply = <®_vcc5v0>;
|
||||
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
|
||||
sound-name-prefix = "Speaker Amp";
|
||||
};
|
||||
@@ -316,13 +320,6 @@ ®_fldo2 {
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
-®_ldo_io0 {
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- regulator-name = "vcc-usb";
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
@@ -371,7 +368,7 @@ &usb_otg {
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
- usb0_vbus-supply = <®_ldo_io0>;
|
||||
- usb1_vbus-supply = <®_ldo_io0>;
|
||||
+ usb0_vbus-supply = <®_vcc5v0>;
|
||||
+ usb1_vbus-supply = <®_vcc5v0>;
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From c3aea4ea2117f5dc28da3d4175fc93296653ecd5 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 19 Jan 2020 10:30:58 -0600
|
||||
Subject: [PATCH 8/8] arm64: dts: allwinner: pinebook: Remove unused AXP803
|
||||
regulators
|
||||
|
||||
The Pinebook does not use the CSI bus on the A64. In fact it does not
|
||||
use GPIO port E for anything at all. Thus the following regulators are
|
||||
not used and do not need voltages set:
|
||||
|
||||
- ALDO1: Connected to VCC-PE only
|
||||
- DLDO3: Not connected
|
||||
- ELDO3: Not connected
|
||||
|
||||
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 +---------------
|
||||
1 file changed, 1 insertion(+), 15 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index c06c540e6c08..12e513ba8f50 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -217,9 +217,7 @@ &battery_power_supply {
|
||||
};
|
||||
|
||||
®_aldo1 {
|
||||
- regulator-min-microvolt = <2800000>;
|
||||
- regulator-max-microvolt = <2800000>;
|
||||
- regulator-name = "vcc-csi";
|
||||
+ regulator-name = "vcc-pe";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
@@ -282,12 +280,6 @@ ®_dldo2 {
|
||||
regulator-name = "vcc-edp";
|
||||
};
|
||||
|
||||
-®_dldo3 {
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- regulator-name = "avdd-csi";
|
||||
-};
|
||||
-
|
||||
®_dldo4 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
@@ -301,12 +293,6 @@ ®_eldo1 {
|
||||
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>;
|
||||
--
|
||||
2.24.1
|
||||
|
14
kernel.spec
14
kernel.spec
@ -841,6 +841,17 @@ Patch323: arm64-tegra-fix-pcie.patch
|
||||
# Coral
|
||||
Patch330: arm64-dts-imx8mq-phanbell-Add-support-for-ethernet.patch
|
||||
|
||||
# Pine64 bits
|
||||
# 340-344 queued for 5.7
|
||||
Patch340: arm64-pinebook-fixes.patch
|
||||
Patch341: arm64-a64-mbus.patch
|
||||
# https://patchwork.kernel.org/cover/11405517/
|
||||
Patch342: Add-LCD-support-for-Pine64-Pinebook-1080p.patch
|
||||
# https://lkml.org/lkml/2020/1/15/1320
|
||||
Patch343: arm64-pine64-pinetab.patch
|
||||
# https://www.spinics.net/lists/arm-kernel/msg789135.html
|
||||
Patch344: arm64-pine64-pinephone.patch
|
||||
|
||||
# 400 - IBM (ppc/s390x) patches
|
||||
|
||||
# 500 - Temp fixes/CVEs etc
|
||||
@ -2952,6 +2963,9 @@ fi
|
||||
#
|
||||
#
|
||||
%changelog
|
||||
* Thu Feb 27 2020 Peter Robinson <pbrobinson@fedoraproject.org>
|
||||
- Fixes and enhancements to some AllWinner Pine64 devices
|
||||
|
||||
* Thu Feb 27 2020 Jeremy Cline <jcline@redhat.com> - 5.6.0-0.rc3.git2.1
|
||||
- Linux v5.6-rc3-71-gbfdc6d91a25f
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user