sunxi-6.11: Add megous patches

This commit is contained in:
The-going
2024-09-19 15:54:04 +03:00
committed by Igor
parent 8138abdc26
commit ad027fda4b
246 changed files with 37834 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
From 35f3f662fe3eec678623efb8fd658fc6392bac54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 14 Nov 2017 02:47:51 +0100
Subject: ARM: dts: axp813: Add charger LED
PMIC supports charging status indication via a LED. Add support
for it.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/axp81x.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/axp81x.dtsi b/arch/arm/boot/dts/allwinner/axp81x.dtsi
index ebaf1c3ce8db..a4b1be159b02 100644
--- a/arch/arm/boot/dts/allwinner/axp81x.dtsi
+++ b/arch/arm/boot/dts/allwinner/axp81x.dtsi
@@ -161,4 +161,9 @@ reg_drivevbus: drivevbus {
usb_power_supply: usb-power {
compatible = "x-powers,axp813-usb-power-supply";
};
+
+ charger_led: charger-led {
+ compatible = "x-powers,axp813-charger-led";
+ status = "disabled";
+ };
};
--
2.35.3

View File

@@ -0,0 +1,185 @@
From 7e5667ec79f4e9c783adf2fd35c60e3ae7ce0617 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 23 Feb 2020 01:23:10 +0100
Subject: ARM: dts: sun5i: Add PocketBook Touch Lux 3 display/ctp support
Add support for display and touchscreen via out-of-tree drivers.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../sun5i-a13-pocketbook-touch-lux-3.dts | 105 +++++++++++++++++-
1 file changed, 103 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
index d60407772e5d..db28ab621804 100644
--- a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
+++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
@@ -62,6 +62,11 @@ key-left {
};
};
+ regulator-eink {
+ compatible = "custom,reg-userspace-consumer";
+ controlled-supply = <&tp65185x>;
+ };
+
reg_1v8: regulator-1v8 {
compatible = "regulator-fixed";
regulator-name = "vdd-1v8-nor-ctp";
@@ -79,7 +84,6 @@ reg_1v8_nor: regulator-nor {
gpio = <&pio 2 14 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&reg_1v8>;
- regulator-always-on;
};
reg_1v8_ctp: regulator-ctp {
@@ -112,6 +116,7 @@ &ehci0 {
&i2c0 {
status = "okay";
+ //XXX: bsp has pullup on PB0/PB1 pins enabled, but it works without it
axp209: pmic@34 {
reg = <0x34>;
@@ -128,12 +133,42 @@ pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
+
+ // hacky PMIC driver for eInk display
+ tp65185x: regulator@68 {
+ compatible = "tp,tp65185x";
+ reg = <0x68>;
+
+ regulator-min-microvolt = <3120000>;
+ regulator-max-microvolt = <3120000>;
+ regulator-name = "eink-vcom";
+
+ //XXX: we don't use interrupts in the driver right now
+ //interrupt-parent = <&pio>;
+ //interrupts = <1 10 IRQ_TYPE_LEVEL_LOW>; /* PB10 */
+
+ wakeup-gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
+ powerup-gpios = <&pio 4 7 GPIO_ACTIVE_HIGH>; /* PE7 */
+ vcom-gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
+ //XXX: not a pullup on BSP (might have an external resistor)
+ powergood-gpios = <&pio 4 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PE6 */
+ };
};
&i2c2 {
status = "okay";
- /* Touchpanel is connected here. */
+ touchpanel@24 {
+ compatible = "cypress,cyttsp4_i2c_adapter";
+ reg = <0x24>;
+
+ interrupt-parent = <&pio>;
+ interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* PG11 */
+
+ vdd-supply = <&reg_1v8_ctp>;
+ power-gpios = <&pio 4 5 GPIO_ACTIVE_LOW>; /* PE5 */
+ reset-gpios = <&pio 1 3 GPIO_ACTIVE_LOW>; /* PB3 */
+ };
};
&lradc {
@@ -179,6 +214,20 @@ &otg_sram {
status = "okay";
};
+&pio {
+ eink_pins_active: eink-pins-lcd {
+ pins = "PD3", "PD4", "PD5", "PD6", "PD7", "PD10", "PD11", "PD12",
+ "PD13", "PD15", "PD20", "PD21", "PD22", "PD23", "PD24";
+ function = "lcd0";
+ };
+
+ eink_pins_idle: eink-pins-gpio {
+ pins = "PD3", "PD4", "PD5", "PD6", "PD7", "PD10", "PD11", "PD12",
+ "PD13", "PD15", "PD20", "PD21", "PD22", "PD23", "PD24";
+ function = "gpio_out";
+ };
+};
+
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm0_pin>;
@@ -219,6 +268,55 @@ &reg_ldo3 {
regulator-ramp-delay = <1600>;
};
+&soc {
+ display-controller@1c0c000 {
+ pinctrl-names = "idle", "active";
+ pinctrl-0 = <&eink_pins_idle>;
+ pinctrl-1 = <&eink_pins_active>;
+
+ all-gpios = <&pio 3 3 GPIO_ACTIVE_HIGH>,
+ <&pio 3 4 GPIO_ACTIVE_HIGH>,
+ <&pio 3 5 GPIO_ACTIVE_HIGH>,
+ <&pio 3 6 GPIO_ACTIVE_HIGH>,
+ <&pio 3 7 GPIO_ACTIVE_HIGH>,
+ <&pio 3 10 GPIO_ACTIVE_HIGH>,
+ <&pio 3 11 GPIO_ACTIVE_HIGH>,
+ <&pio 3 12 GPIO_ACTIVE_HIGH>,
+ <&pio 3 13 GPIO_ACTIVE_HIGH>,
+ <&pio 3 15 GPIO_ACTIVE_HIGH>,
+ <&pio 3 20 GPIO_ACTIVE_HIGH>,
+ <&pio 3 21 GPIO_ACTIVE_HIGH>,
+ <&pio 3 22 GPIO_ACTIVE_HIGH>,
+ <&pio 3 23 GPIO_ACTIVE_HIGH>,
+ <&pio 3 24 GPIO_ACTIVE_HIGH>;
+
+ compatible = "custom,pocketbook-touch-lux-3-tcon0-ed060xd4-display";
+ reg = <0x01c0c000 0x1000>, // TCON0 regs
+ <0x01e60000 0x10000>; // DEBE regs
+
+ interrupts = <44>; // TCON interrupt
+
+ resets = <&ccu RST_LCD>, <&ccu RST_DE_BE>;
+ reset-names = "tcon", "be";
+
+ clocks = <&ccu CLK_AHB_LCD>, <&ccu CLK_TCON_CH0>,
+ <&ccu CLK_AHB_DE_BE>, <&ccu CLK_DE_BE>,
+ <&ccu CLK_DRAM_DE_BE>;
+ clock-names = "tcon_bus", "tcon_mod",
+ "be_bus", "be_mod",
+ "be_ram";
+
+ assigned-clocks = <&ccu CLK_DE_BE>;
+ assigned-clock-rates = <300000000>;
+
+ interconnects = <&mbus 18>;
+ interconnect-names = "dma-mem";
+
+ panel-supply = <&tp65185x>;
+ control-device-name = "eink-panel";
+ };
+};
+
&spi2 {
pinctrl-names = "default";
pinctrl-0 = <&spi2_pe_pins>, <&spi2_cs0_pe_pin>;
@@ -230,6 +328,7 @@ epd_flash: flash@0 {
compatible = "macronix,mx25u4033", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <4000000>;
+ vdd-supply = <&reg_1v8_nor>;
};
};
@@ -253,6 +352,8 @@ &usb_power_supply {
};
&usbphy {
+ //XXX: might not work, need to test
+ usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
usb1_vbus-supply = <&reg_ldo3>;
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,26 @@
From 23510d34222d8e589a3acb3184319de55c0057e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 5 Oct 2019 15:04:43 +0200
Subject: ARM: dts: sun5i: Add soc handle
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun5i.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/allwinner/sun5i.dtsi b/arch/arm/boot/dts/allwinner/sun5i.dtsi
index e6836fd4b8dc..126b80f3ca70 100644
--- a/arch/arm/boot/dts/allwinner/sun5i.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun5i.dtsi
@@ -123,7 +123,7 @@ default-pool {
};
};
- soc {
+ soc: soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
--
2.35.3

View File

@@ -0,0 +1,27 @@
From 965bcb0a9d2e231d39762940943ec2542efa2546 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Thu, 25 Jun 2020 01:57:27 +0200
Subject: ARM: dts: sun5i-a13-pocketbook-touch-lux-3: Add RTC clock-cells
This stop the driver from complaining in dmesg.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
index db28ab621804..ee81db68e546 100644
--- a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
+++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
@@ -132,6 +132,7 @@ &i2c1 {
pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
+ #clock-cells = <0>;
};
// hacky PMIC driver for eInk display
--
2.35.3

View File

@@ -0,0 +1,39 @@
From ceae3eb7ab45014064f274095c367bd6f8501b0e Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 3 Apr 2021 20:53:26 -0500
Subject: ARM: dts: sun8i: a83t: Add MBUS node
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index ef62ced26684..04b33b42b414 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -1056,6 +1056,21 @@ mdio: mdio {
};
};
+ mbus: dram-controller@1c62000 {
+ compatible = "allwinner,sun8i-a83t-mbus";
+ reg = <0x01c62000 0x1000>,
+ <0x01c63000 0x1000>;
+ reg-names = "mbus", "dram";
+ clocks = <&ccu CLK_BUS_DRAM>,
+ <&ccu CLK_DRAM>,
+ <&ccu CLK_MBUS>;
+ clock-names = "apb", "dram", "mbus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ dma-ranges = <0x00000000 0x40000000 0xc0000000>;
+ #interconnect-cells = <1>;
+ };
+
gic: interrupt-controller@1c81000 {
compatible = "arm,gic-400";
reg = <0x01c81000 0x1000>,
--
2.35.3

View File

@@ -0,0 +1,37 @@
From f63b9361532a0d85a5d86a2dffe296a01639188d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 9 Sep 2019 06:02:10 +0200
Subject: ARM: dts: sun8i-a83t: Add cedrus video codec support to A83T
[untested]
Not tested at all.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index addf0cb0f465..ed3d8e692d84 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -441,6 +441,16 @@ syscon: syscon@1c00000 {
reg = <0x01c00000 0x1000>;
};
+ video-codec@01c0e000 {
+ compatible = "allwinner,sun8i-a83t-video-engine";
+ reg = <0x01c0e000 0x1000>;
+ clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
+ <&ccu CLK_DRAM_VE>;
+ clock-names = "ahb", "mod", "ram";
+ resets = <&ccu RST_BUS_VE>;
+ interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
dma: dma-controller@1c02000 {
compatible = "allwinner,sun8i-a83t-dma";
reg = <0x01c02000 0x1000>;
--
2.35.3

View File

@@ -0,0 +1,48 @@
From a675a481bb8485c41b6033942fde3cf3ea244da3 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:32:57 +0200
Subject: ARM: dts: sun8i: a83t: Add hdmi sound card
A83t support HDMI audio. Add a sound card node for it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index 026c9b1b2217..cc86d3755036 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -150,6 +150,20 @@ cpu103: cpu@103 {
};
};
+ sound_hdmi: sound_hdmi {
+ compatible = "allwinner,sun9i-a80-hdmi-audio",
+ "allwinner,sun8i-a83t-hdmi-audio";
+ status = "disabled";
+
+ codec {
+ sound-dai = <&hdmi>;
+ };
+
+ cpu {
+ sound-dai = <&i2s2>;
+ };
+ };
+
timer {
compatible = "arm,armv7-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
@@ -1059,6 +1073,7 @@ csi: camera@1cb0000 {
};
hdmi: hdmi@1ee0000 {
+ #sound-dai-cells = <0>;
compatible = "allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
reg-io-width = <1>;
--
2.35.3

View File

@@ -0,0 +1,35 @@
From a724a6d1b0a0488458101e4f71c55cea76c3d7fc Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Mon, 13 Mar 2023 06:02:27 +0100
Subject: ARM: dts: sun8i-a83t: Add missing GPU trip point
Without this, thermal sensor driver fails to probe.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index 27f8e42467af..2ab73558aaca 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -1307,6 +1307,15 @@ gpu_thermal: gpu-thermal {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&ths 2>;
+
+ trips {
+ gpu_crit: gpu-crit {
+ /* milliCelsius */
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
};
};
};
--
2.35.3

View File

@@ -0,0 +1,69 @@
From d860662caa553460d0068615286774b2ff1019bd Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:34:43 +0200
Subject: ARM: dts: sun8i: a83t: Enable hdmi sound card on boards with hdmi
Each board that has HDMI connector can also transmit audio through it.
Enable HDMI sound card on all A83t boards with HDMI connector.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3.dts | 8 ++++++++
.../arm/boot/dts/allwinner/sun8i-a83t-cubietruck-plus.dts | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3.dts
index 32e811fa23e2..9a7117bca70d 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3.dts
@@ -162,6 +162,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -380,6 +384,10 @@ &reg_sw {
regulator-name = "vcc-ephy";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-cubietruck-plus.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-cubietruck-plus.dts
index d5e6ddaffbce..d4d834084b12 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-cubietruck-plus.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-cubietruck-plus.dts
@@ -197,6 +197,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -417,6 +421,10 @@ &reg_sw {
regulator-name = "vcc-wifi-io";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&spdif {
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,134 @@
From 016d6109da39ec86f0d8a94fefabf8c1a6678679 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 1 Sep 2019 23:56:49 +0200
Subject: ARM: dts: sun8i-a83t: Improve CPU OPP tables (go up to 1.8GHz)
This table is for the worst SoC bin, so it should work on all A83T
bins.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 80 ++++++---------------
1 file changed, 22 insertions(+), 58 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index 04b33b42b414..026c9b1b2217 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -210,45 +210,27 @@ opp-480000000 {
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-600000000 {
- opp-hz = /bits/ 64 <600000000>;
- opp-microvolt = <840000>;
- clock-latency-ns = <244144>; /* 8 32k periods */
- };
-
- opp-720000000 {
- opp-hz = /bits/ 64 <720000000>;
- opp-microvolt = <840000>;
- clock-latency-ns = <244144>; /* 8 32k periods */
- };
-
- opp-864000000 {
- opp-hz = /bits/ 64 <864000000>;
- opp-microvolt = <840000>;
- clock-latency-ns = <244144>; /* 8 32k periods */
- };
-
- opp-912000000 {
- opp-hz = /bits/ 64 <912000000>;
+ opp-1008000000 {
+ opp-hz = /bits/ 64 <1008000000>;
opp-microvolt = <840000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-1008000000 {
- opp-hz = /bits/ 64 <1008000000>;
- opp-microvolt = <840000>;
+ opp-1412000000 {
+ opp-hz = /bits/ 64 <1412000000>;
+ opp-microvolt = <920000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-1128000000 {
- opp-hz = /bits/ 64 <1128000000>;
- opp-microvolt = <840000>;
+ opp-1608000000 {
+ opp-hz = /bits/ 64 <1608000000>;
+ opp-microvolt = <1000000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-1200000000 {
- opp-hz = /bits/ 64 <1200000000>;
- opp-microvolt = <840000>;
+ opp-1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <1080000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
};
@@ -263,45 +245,27 @@ opp-480000000 {
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-600000000 {
- opp-hz = /bits/ 64 <600000000>;
- opp-microvolt = <840000>;
- clock-latency-ns = <244144>; /* 8 32k periods */
- };
-
- opp-720000000 {
- opp-hz = /bits/ 64 <720000000>;
- opp-microvolt = <840000>;
- clock-latency-ns = <244144>; /* 8 32k periods */
- };
-
- opp-864000000 {
- opp-hz = /bits/ 64 <864000000>;
- opp-microvolt = <840000>;
- clock-latency-ns = <244144>; /* 8 32k periods */
- };
-
- opp-912000000 {
- opp-hz = /bits/ 64 <912000000>;
+ opp-1008000000 {
+ opp-hz = /bits/ 64 <1008000000>;
opp-microvolt = <840000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-1008000000 {
- opp-hz = /bits/ 64 <1008000000>;
- opp-microvolt = <840000>;
+ opp-1412000000 {
+ opp-hz = /bits/ 64 <1412000000>;
+ opp-microvolt = <920000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-1128000000 {
- opp-hz = /bits/ 64 <1128000000>;
- opp-microvolt = <840000>;
+ opp-1608000000 {
+ opp-hz = /bits/ 64 <1608000000>;
+ opp-microvolt = <1000000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
- opp-1200000000 {
- opp-hz = /bits/ 64 <1200000000>;
- opp-microvolt = <840000>;
+ opp-1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <1080000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
};
--
2.35.3

View File

@@ -0,0 +1,59 @@
From c5f40e2f7cf3b678d73d0731a6f3c09e4fbaf35d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 1 Feb 2020 23:41:47 +0100
Subject: ARM: dts: sun8i-a83t: Set fifo-size for uarts
Boot time optimization.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index cc86d3755036..0bbf43850c95 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -926,6 +926,7 @@ uart0: serial@1c28000 {
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
status = "disabled";
@@ -937,6 +938,7 @@ uart1: serial@1c28400 {
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART1>;
resets = <&ccu RST_BUS_UART1>;
status = "disabled";
@@ -948,6 +950,7 @@ uart2: serial@1c28800 {
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART2>;
resets = <&ccu RST_BUS_UART2>;
status = "disabled";
@@ -959,6 +962,7 @@ uart3: serial@1c28c00 {
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART3>;
resets = <&ccu RST_BUS_UART3>;
status = "disabled";
@@ -970,6 +974,7 @@ uart4: serial@1c29000 {
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART4>;
resets = <&ccu RST_BUS_UART4>;
status = "disabled";
--
2.35.3

View File

@@ -0,0 +1,66 @@
From f98ffe305ec6e1f8d1dc171ff9ad7ae3724bc77c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 10 Nov 2017 14:33:28 +0100
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add PN544 NFC support
Regulators on the schematic are named incorrectly. Both cameras are
is in fact connected to the dvdd-csi-f regulator and dvdd-csi-r is
in reality used for digital pad supply for NFC chip.
At the same time vcc-mipi regulator is not used for MIPI, but for NFC
VBAT power.
Interpreting schematics is an art form! :D
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index 43982b106a4d..5cedbe2455db 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -190,6 +190,16 @@ accelerometer@18 {
interrupt-parent = <&pio>;
interrupts = <7 10 IRQ_TYPE_EDGE_RISING>; /* PH10 / EINT10 */
};
+
+ /* NFC (NPC 100) */
+ npc100: nfc@28 {
+ compatible = "nxp,nxp-nci-i2c";
+ reg = <0x28>;
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>; /* PL6 */
+ enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+ firmware-gpios = <&pio 3 3 GPIO_ACTIVE_HIGH>; /* PD3 */
+ };
};
&mmc0 {
@@ -368,9 +378,10 @@ &reg_dldo1 {
};
&reg_dldo2 {
- regulator-min-microvolt = <2800000>;
+ regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <4200000>;
- regulator-name = "vcc-mipi";
+ regulator-name = "vbat-nfc";
+ regulator-always-on;
};
&reg_dldo3 {
@@ -393,7 +404,8 @@ &reg_drivevbus {
&reg_eldo1 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1800000>;
- regulator-name = "dvdd-csi-r";
+ regulator-name = "pvdd-nfc";
+ regulator-always-on;
};
&reg_eldo2 {
--
2.35.3

View File

@@ -0,0 +1,180 @@
From 6b09de5386eecb40d63af17a031dbff979ab0faa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 23 Jun 2020 19:43:24 +0200
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add camera sensors (HM5065, GC2145)
The tablet has two cameras, that can be switched between. Add
support for the both of them.
Sensor is connected via parallel bus to CSI and via I2C bus to
PE14/PE15 pins. Enable CSI module and add the node for HM5065
camera sensor.
Camera sensors are connected via I2C to PE14/PE15 pins on A83T.
Unfortunately while the A83T datasheet suggests TWI2 I2C controller
can be configured to have SDA/SCL on these pins, this configuration
doesn't work in reality. We need to either use CCI I2C controller
that is part of the CSI module, or as is done in this patch, use GPIO
based bitbanging I2C driver.
Reduce camera IOVDD voltage.
Force dvdd-csi-r/f regulators to 1.8V.
This is required by camera sensors that are connected to them.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun8i-a83t-tbs-a711.dts | 101 +++++++++++++++++-
1 file changed, 99 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index ce1a8d98b548..ba3ea3199c69 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -70,6 +70,16 @@ backlight: backlight {
default-brightness-level = <9>;
};
+ i2c_gpio: i2c-gpio {
+ compatible = "i2c-gpio";
+ /* PE15 = sda, PE14 = scl */
+ sda-gpios = <&pio 4 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&pio 4 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <1>; /* ~100 kHz */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
panel {
compatible = "tbs,a711-panel", "panel-lvds";
backlight = <&backlight>;
@@ -215,6 +225,13 @@ link2_codec: codec {
};
};
+&ccu {
+ /* Use a stable clock source with known fixed rate for MCLK */
+ assigned-clocks = <&ccu CLK_CSI_MCLK>;
+ assigned-clock-parents = <&osc24M>;
+ assigned-clock-rates = <24000000>;
+};
+
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
@@ -223,6 +240,37 @@ &cpu100 {
cpu-supply = <&reg_dcdc3>;
};
+&csi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&csi_8bit_parallel_pins>, <&csi_mclk_pin>;
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi_hm5065_ep: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&hm5065_ep>;
+ bus-width = <8>;
+ data-active = <1>;
+ pclk-sample = <0>;
+ hsync-active = <0>;
+ vsync-active = <1>;
+ };
+
+ csi_gc2145_ep: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&gc2145_ep>;
+ bus-width = <8>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ data-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+};
+
&de {
status = "okay";
};
@@ -283,6 +331,55 @@ npc100: nfc@28 {
};
};
+&i2c_gpio {
+ hm5065: rear-camera@1f {
+ compatible = "himax,hm5065";
+ reg = <0x1f>;
+ clocks = <&ccu CLK_CSI_MCLK>;
+ clock-names = "xclk";
+ IOVDD-supply = <&reg_dldo3>;
+ AVDD-supply = <&reg_dldo4>;
+ DVDD-supply = <&reg_eldo3>;
+ AFVDD-supply = <&reg_dldo3>;
+ reset-gpios = <&pio 4 18 GPIO_ACTIVE_LOW>; /* PE18 */
+ enable-gpios = <&pio 4 19 GPIO_ACTIVE_HIGH>; /* PE19 */
+
+ port {
+ hm5065_ep: endpoint {
+ remote-endpoint = <&csi_hm5065_ep>;
+ bus-width = <8>;
+ data-active = <1>;
+ pclk-sample = <0>;
+ hsync-active = <0>;
+ vsync-active = <1>;
+ };
+ };
+ };
+
+ gc2145: front-camera@3c {
+ compatible = "galaxycore,gc2145";
+ reg = <0x3c>;
+ clocks = <&ccu CLK_CSI_MCLK>;
+ clock-names = "xclk";
+ IOVDD-supply = <&reg_dldo3>;
+ AVDD-supply = <&reg_dldo4>;
+ DVDD-supply = <&reg_eldo3>;
+ reset-gpios = <&pio 4 16 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE16 */
+ enable-gpios = <&pio 4 17 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE17 */
+
+ port {
+ gc2145_ep: endpoint {
+ remote-endpoint = <&csi_gc2145_ep>;
+ bus-width = <8>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ data-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+ };
+};
+
&i2s0 {
status = "okay";
pinctrl-names = "default";
@@ -500,7 +597,7 @@ &reg_drivevbus {
};
&reg_eldo1 {
- regulator-min-microvolt = <1200000>;
+ regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "pvdd-nfc";
regulator-always-on;
@@ -513,7 +610,7 @@ &reg_eldo2 {
};
&reg_eldo3 {
- regulator-min-microvolt = <1200000>;
+ regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "dvdd-csi-f";
};
--
2.35.3

View File

@@ -0,0 +1,32 @@
From a5ebbf80c0230061f2f6b2f88554a5face26ced7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 8 Nov 2017 21:57:45 +0100
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add flash led support
---
arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index ba3ea3199c69..23eb11e99b98 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -61,6 +61,15 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ leds {
+ compatible = "gpio-leds";
+
+ flash_led {
+ label = "flash";
+ gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
--
2.35.3

View File

@@ -0,0 +1,61 @@
From e5a7e08dec4c18a2be060780e57a45d0ea1b9778 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?=
<mylene.josserand@free-electrons.com>
Date: Thu, 6 Jul 2017 10:57:55 +0200
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add powerup/down support for the 3G
modem
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The modem needs tree gpios to be powered-up:
- PL10 = reset
- PL8 = On/Off
- PL9 = vbat
Because of that, the PL9 corresponds to the regulator's gpio whereas
the PL8 (on/off) will be a power-gpio of the power sequence.
Thanks to that, the modem is powered up:
# lsusb
Bus 001 Device 004: ID 19d2:ffeb
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index 5cedbe2455db..f7d8e5425233 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -118,7 +118,7 @@ reg_vmain: reg-vmain {
regulator-name = "vmain";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
- gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>;
+ gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
enable-active-high;
vin-supply = <&reg_vbat>;
};
@@ -134,6 +134,17 @@ wifi_pwrseq: pwrseq {
clocks = <&ac100_rtc 1>;
clock-names = "ext_clock";
};
+
+ modem {
+ compatible = "zte,mg3732";
+ char-device-name = "modem-power";
+
+ power-supply = <&reg_vmain>;
+
+ enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+ reset-gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
+ wakeup-gpios = <&r_pio 0 11 GPIO_ACTIVE_HIGH>; /* PL11 */
+ };
};
&cpu0 {
--
2.35.3

View File

@@ -0,0 +1,30 @@
From 2d38464d68e191efe63a5e0b6b00bcde9d2b4155 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 23 Jun 2020 19:15:37 +0200
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add regulators to the accelerometer
The bosch,bma250 driver will fail to probe if the regulators are
not specified in DT, because it tries to set voltage on dummy
regulators, which fails with EINVAL.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index 925891a1d6d9..ce1a8d98b548 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -268,6 +268,8 @@ accelerometer@18 {
reg = <0x18>;
interrupt-parent = <&pio>;
interrupts = <7 10 IRQ_TYPE_EDGE_RISING>; /* PH10 / EINT10 */
+ vdd-supply = <&reg_dcdc1>;
+ vddio-supply = <&reg_dcdc1>;
};
/* NFC (NPC 100) */
--
2.35.3

View File

@@ -0,0 +1,131 @@
From c6188d4cca3df17fed77ce081a993ea86be286c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 22 Feb 2020 23:40:29 +0100
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add sound support via AC100 codec
...
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun8i-a83t-tbs-a711.dts | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index f7d8e5425233..925891a1d6d9 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -145,6 +145,74 @@ modem {
reset-gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
wakeup-gpios = <&r_pio 0 11 GPIO_ACTIVE_HIGH>; /* PL11 */
};
+
+ bt_sco_codec: bt-sco-codec {
+ #sound-dai-cells = <1>;
+ compatible = "linux,bt-sco";
+ sound-name-prefix = "Bluetooth";
+ };
+
+ speaker_amp: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
+ sound-name-prefix = "Speaker Amp";
+ };
+
+ sound: sound {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "ac100-audio";
+ simple-audio-card,aux-devs = <&ac100_codec_analog>, <&speaker_amp>;
+ simple-audio-card,widgets = "Microphone", "Headset Microphone",
+ "Microphone", "Internal Microphone",
+ "Headphone", "Headphone Jack",
+ "Speaker", "Internal Speaker";
+ simple-audio-card,routing =
+ "Headphone Jack", "HP",
+ "Internal Speaker", "Speaker Amp OUTL",
+ "Speaker Amp INL", "SPKOUTL",
+ "Left DAC", "DACL",
+ "Right DAC", "DACR",
+ "ADCL", "Left ADC",
+ "ADCR", "Right ADC",
+ "Internal Microphone", "MBIAS",
+ "MIC1", "Internal Microphone",
+ "Headset Microphone", "HBIAS",
+ "MIC2", "Headset Microphone";
+
+ simple-audio-card,dai-link@0 {
+ format = "i2s";
+ frame-master = <&link0_cpu>;
+ bitclock-master = <&link0_cpu>;
+ mclk-fs = <512>;
+
+ link0_cpu: cpu {
+ sound-dai = <&i2s0>;
+ };
+
+ link0_codec: codec {
+ sound-dai = <&ac100_codec 0>;
+ };
+ };
+
+ simple-audio-card,dai-link@2 {
+ format = "dsp_a";
+ frame-master = <&link2_codec>;
+ bitclock-master = <&link2_codec>;
+ bitclock-inversion;
+
+ link2_cpu: cpu {
+ sound-dai = <&bt_sco_codec 0>;
+ };
+
+ link2_codec: codec {
+ sound-dai = <&ac100_codec 2>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <16>;
+ };
+ };
+ };
};
&cpu0 {
@@ -213,6 +281,12 @@ npc100: nfc@28 {
};
};
+&i2s0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_pins>;
+};
+
&mmc0 {
vmmc-supply = <&reg_dcdc1>;
pinctrl-names = "default";
@@ -293,12 +367,23 @@ ac100: codec@e89 {
compatible = "x-powers,ac100";
reg = <0xe89>;
+ ac100_codec_analog: codec-analog {
+ compatible = "x-powers,ac100-codec-analog";
+ cpvdd-supply = <&reg_aldo2>;
+ };
+
ac100_codec: codec {
+ #sound-dai-cells = <1>;
compatible = "x-powers,ac100-codec";
interrupt-parent = <&r_pio>;
interrupts = <0 12 IRQ_TYPE_LEVEL_LOW>; /* PL12 */
#clock-cells = <0>;
clock-output-names = "4M_adda";
+
+ LDOIN-supply = <&reg_aldo2>;
+ AVCC-supply = <&reg_aldo3>;
+ VDDIO1-supply = <&reg_dcdc1>;
+ VDDIO2-supply = <&reg_dldo1>;
};
ac100_rtc: rtc {
--
2.35.3

View File

@@ -0,0 +1,39 @@
From 8dd8de6789b8e117eda6102b22f5c38fb3cd02ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 9 Nov 2019 23:55:48 +0100
Subject: ARM: dts: sun8i-a83t-tbs-a711: Add support for the vibrator motor
The board has a vibrator mottor. Hook it to the input subsystem.
According to the PMIC specification, LDO needs to be enabled (value 0b11)
to achieve the specified max driving current of 150mA. We can't drive
the motor with just GPIO mode.
In GPIO mode the chip is probably just using the regular CMOS logic
output circuitry (typically limited to around 20-35mA, but not specified
in this datasheet).
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index 23eb11e99b98..81e1271482ed 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -118,6 +118,11 @@ panel_input: endpoint {
};
};
+ vibrator {
+ compatible = "gpio-vibrator";
+ vcc-supply = <&reg_ldo_io1>;
+ };
+
reg_gps: reg-gps {
compatible = "regulator-fixed";
regulator-name = "gps";
--
2.35.3

View File

@@ -0,0 +1,31 @@
From 5fcce7aeac6d3c862c2ab2ba4cba0e7738acba58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 23 Feb 2020 13:21:58 +0100
Subject: ARM: dts: sun8i-a83t-tbs-a711: Enable charging LED
The tablet has a LED connected to the PMIC. The LED is visible in the
top right corner of the tablet. Enable it.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index 6a90763d8736..6edeaf8ed431 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -519,6 +519,10 @@ &battery_power_supply {
status = "okay";
};
+&charger_led {
+ status = "okay";
+};
+
&reg_aldo1 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
--
2.35.3

View File

@@ -0,0 +1,47 @@
From 3379095d4a992146a4fb05fb313f1b04a7fc1406 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 23 Jun 2020 19:19:46 +0200
Subject: ARM: dts: sun8i-a83t-tbs-a711: Give Linux more privileges over SCPI
This is needed since on A83T there's no PSCI/ATF implementation.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index 1ef9b4a581ac..27f8e42467af 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -286,7 +286,7 @@ opp-1800000000 {
scpi_protocol: scpi {
compatible = "arm,scpi";
- mboxes = <&msgbox 2>, <&msgbox 3>;
+ mboxes = <&msgbox 0>, <&msgbox 1>;
mbox-names = "tx", "rx";
shmem = <&scpi_sram>;
};
@@ -424,6 +424,9 @@ syscon: syscon@1c00000 {
compatible = "allwinner,sun8i-a83t-system-controller",
"syscon";
reg = <0x01c00000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
sram_a2: sram@40000 {
compatible = "mmio-sram";
@@ -434,7 +437,7 @@ sram_a2: sram@40000 {
scpi_sram: scp-shmem@13c00 {
compatible = "arm,scp-shmem";
- reg = <0x13c00 0x200>;
+ reg = <0x13e00 0x200>;
};
};
--
2.35.3

View File

@@ -0,0 +1,30 @@
From 9a9bfc1234d9b0496c2830c67da135920c7c30fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 8 Dec 2017 12:44:22 +0100
Subject: ARM: dts: sun8i-a83t-tbs-a711: Increase voltage on the vibrator
Vibrator motor is weak at the current voltage. Increase the voltage.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
index 81e1271482ed..6a90763d8736 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-tbs-a711.dts
@@ -650,8 +650,8 @@ &reg_ldo_io0 {
};
&reg_ldo_io1 {
- regulator-min-microvolt = <3100000>;
- regulator-max-microvolt = <3100000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
regulator-name = "vcc-vb";
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,42 @@
From 9bc70e938bb55381ebb28432cd73669981f7689c Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:14:51 +0200
Subject: ARM: dts: sun8i: h2-plus: bananapi-m2-zero: Enable HDMI audio
BananaPi M2 Zero has HDMI output and thus supports HDMI audio. Enable
it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
.../boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
index d3a7c9fa23e4..f40c2d0483b5 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -133,6 +133,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
@@ -256,6 +260,10 @@ &r_pio {
"", "", "", "", "", "", "", "";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&usb_otg {
dr_mode = "otg";
status = "okay";
--
2.35.3

View File

@@ -0,0 +1,272 @@
From b6a7525c6ddcaaa747a37b446d2c07f11451e360 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:06:37 +0200
Subject: ARM: dts: sun8i: h3: Enable hdmi sound card on boards with hdmi
Each board that has HDMI connector can also transmit audio through it.
Enable HDMI sound card on all H3 boards with HDMI connector.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm/boot/dts/allwinner/sun8i-h3-beelink-x2.dts | 8 ++++++++
.../dts/allwinner/sun8i-h3-emlid-neutis-n5h3-devboard.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-2.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-lite.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts | 8 ++++++++
.../boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts | 8 ++++++++
arch/arm/boot/dts/allwinner/sun8i-h3-rervision-dvk.dts | 8 ++++++++
10 files changed, 80 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-beelink-x2.dts
index 5b77300307de..2fa04f508216 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-beelink-x2.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-beelink-x2.dts
@@ -159,6 +159,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
linux,rc-map-name = "rc-tanix-tx3mini";
pinctrl-names = "default";
@@ -213,6 +217,10 @@ &reg_usb0_vbus {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&spdif {
pinctrl-names = "default";
pinctrl-0 = <&spdif_tx_pin>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-emlid-neutis-n5h3-devboard.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-emlid-neutis-n5h3-devboard.dts
index 02fbe00cde97..61d6529dcc70 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-emlid-neutis-n5h3-devboard.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-emlid-neutis-n5h3-devboard.dts
@@ -70,3 +70,11 @@ hdmi_out_con: endpoint {
&i2c1 {
status = "okay";
};
+
+&i2s2 {
+ status = "okay";
+};
+
+&sound_hdmi {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts
index 59bd0746acf8..10ae138b14f0 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts
@@ -118,6 +118,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -159,6 +163,10 @@ &ohci2 {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1.dts
index 69243dcb30a6..9393779f33b6 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1.dts
@@ -91,6 +91,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -104,3 +108,7 @@ &ohci1 {
&ohci2 {
status = "okay";
};
+
+&sound_hdmi {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-2.dts
index d2ae47b074bf..7fac0c8906e8 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-2.dts
@@ -145,6 +145,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -179,6 +183,10 @@ &reg_usb1_vbus {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-lite.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-lite.dts
index 6a4316a52469..28ec2a5b1a5c 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-lite.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-lite.dts
@@ -120,6 +120,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -156,6 +160,10 @@ &ohci2 {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
index 59f6f6d5e7ca..927fd1bab07d 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
@@ -146,6 +146,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
@@ -166,6 +170,10 @@ &reg_usb0_vbus {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts
index 92a58e362004..624e248e3ffc 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts
@@ -147,6 +147,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -206,6 +210,10 @@ &reg_usb0_vbus {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts
index 7a6444a10e25..4073d34af23c 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts
@@ -117,6 +117,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
@@ -155,6 +159,10 @@ &ohci0 {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-rervision-dvk.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-rervision-dvk.dts
index 4738f3a9efe4..ee645912ee39 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-rervision-dvk.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-rervision-dvk.dts
@@ -69,6 +69,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mmc0 {
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
@@ -98,6 +102,10 @@ &ohci3 {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
--
2.35.3

View File

@@ -0,0 +1,72 @@
From d415923892b9562123390413580343d1e88eab45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 17 Aug 2020 23:43:53 +0200
Subject: ARM: dts: sun8i-h3: Use my own more aggressive OPPs on H3
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-h3.dtsi | 36 +++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi b/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
index eac2349a2380..da1991c991cb 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
@@ -48,6 +48,12 @@ cpu0_opp_table: opp-table-cpu {
compatible = "operating-points-v2";
opp-shared;
+ opp-480000000 {
+ opp-hz = /bits/ 64 <480000000>;
+ opp-microvolt = <1040000 1040000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
opp-648000000 {
opp-hz = /bits/ 64 <648000000>;
opp-microvolt = <1040000 1040000 1300000>;
@@ -60,11 +66,41 @@ opp-816000000 {
clock-latency-ns = <244144>; /* 8 32k periods */
};
+ opp-960000000 {
+ opp-hz = /bits/ 64 <960000000>;
+ opp-microvolt = <1200000 1200000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
opp-1008000000 {
opp-hz = /bits/ 64 <1008000000>;
opp-microvolt = <1200000 1200000 1300000>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
+
+ opp-1104000000 {
+ opp-hz = /bits/ 64 <1104000000>;
+ opp-microvolt = <1320000 1320000 1320000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1320000 1320000 1320000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ opp-1296000000 {
+ opp-hz = /bits/ 64 <1296000000>;
+ opp-microvolt = <1340000 1340000 1340000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ opp-1368000000 {
+ opp-hz = /bits/ 64 <1368000000>;
+ opp-microvolt = <1400000 1400000 1400000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
};
cpus {
--
2.35.3

View File

@@ -0,0 +1,49 @@
From ffd74505d24254a4addadd1b714a198ff94ee044 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 2 Apr 2022 02:24:26 +0200
Subject: ARM: dts: sun8i-h3-orange-pi-one: Enable all gpio header UARTs
---
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
index f5476cdab8a4..64c489e356ce 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
@@ -54,6 +54,9 @@ / {
aliases {
ethernet0 = &emac;
serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
};
chosen {
@@ -183,19 +186,19 @@ &uart0 {
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
- status = "disabled";
+ status = "okay";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
- status = "disabled";
+ status = "okay";
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
- status = "disabled";
+ status = "okay";
};
&usb_otg {
--
2.35.3

View File

@@ -0,0 +1,31 @@
From ac24923597de71f58bda50adfbe856785c274806 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 13 May 2018 21:00:43 +0200
Subject: ARM: dts: sun8i-h3-orange-pi-pc: Increase max CPUX voltage to 1.4V
When using thermal regulation we can afford to go higher. Also add
regulator-ramp-delay, because regulator takes some time to change
voltage.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts
index b96e015f54ee..92a58e362004 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc.dts
@@ -194,7 +194,8 @@ reg_vdd_cpux: regulator@65 {
* Use 1.0V as the minimum voltage instead.
*/
regulator-min-microvolt = <1000000>;
- regulator-max-microvolt = <1300000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-ramp-delay = <200>;
regulator-boot-on;
regulator-always-on;
};
--
2.35.3

View File

@@ -0,0 +1,48 @@
From d49a230aff40db9f14b6ca58cbb54109bf34244c Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:50:56 +0200
Subject: ARM: dts: sun8i: r40: Add hdmi sound card
R40 support HDMI audio. Add a sound card node for it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm/boot/dts/allwinner/sun8i-r40.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi b/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi
index a5b1f1e3900d..d73828d6b3c0 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi
@@ -124,6 +124,20 @@ de: display-engine {
status = "disabled";
};
+ sound_hdmi: sound_hdmi {
+ compatible = "allwinner,sun9i-a80-hdmi-audio",
+ "allwinner,sun8i-r40-hdmi-audio";
+ status = "disabled";
+
+ codec {
+ sound-dai = <&hdmi>;
+ };
+
+ cpu {
+ sound-dai = <&i2s2>;
+ };
+ };
+
thermal-zones {
cpu_thermal: cpu0-thermal {
/* milliseconds */
@@ -1265,6 +1279,7 @@ gic: interrupt-controller@1c81000 {
};
hdmi: hdmi@1ee0000 {
+ #sound-dai-cells = <0>;
compatible = "allwinner,sun8i-r40-dw-hdmi",
"allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
--
2.35.3

View File

@@ -0,0 +1,42 @@
From 043dec62baf9572282ba002cbb7e5db2f33e150c Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:52:43 +0200
Subject: ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable HDMI audio
BananaPi M2 Ultra has HDMI output and thus supports HDMI audio. Enable
it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
.../boot/dts/allwinner/sun8i-r40-bananapi-m2-ultra.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/allwinner/sun8i-r40-bananapi-m2-ultra.dts
index cd2351acc32f..a91213e8d2c1 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-r40-bananapi-m2-ultra.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-r40-bananapi-m2-ultra.dts
@@ -169,6 +169,10 @@ axp22x: pmic@34 {
#include "axp22x.dtsi"
+&i2s2 {
+ status = "okay";
+};
+
&ir0 {
status = "okay";
};
@@ -304,6 +308,10 @@ &reg_eldo3 {
regulator-name = "vdd1v2-sata";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&tcon_tv0 {
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,42 @@
From 797144792170a94b64ff4f0088bf639c0cad6641 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 12:00:46 +0200
Subject: ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI audio
BananaPi M2 Berry has HDMI output and thus supports HDMI audio. Enable
it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
.../boot/dts/allwinner/sun8i-v40-bananapi-m2-berry.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/allwinner/sun8i-v40-bananapi-m2-berry.dts
index 6575ef274453..0e1395a3d052 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-v40-bananapi-m2-berry.dts
@@ -160,6 +160,10 @@ axp22x: pmic@34 {
#include "axp22x.dtsi"
+&i2s2 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_dcdc1>;
bus-width = <4>;
@@ -275,6 +279,10 @@ &reg_eldo3 {
regulator-name = "vdd1v2-sata";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&tcon_tv0 {
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,29 @@
From 4849f06074e6124bfdcd5cd67e9c7b17d6a955ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 12 Nov 2017 19:03:39 +0100
Subject: ARM: dts: suni-a83t: Add i2s0 pins
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index ed3d8e692d84..ef62ced26684 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -829,6 +829,11 @@ spdif_tx_pin: spdif-tx-pin {
function = "spdif";
};
+ i2s0_pins: i2s0-pins {
+ pins = "PB4", "PB5", "PB6", "PB7", "PB8";
+ function = "i2s0";
+ };
+
uart0_pb_pins: uart0-pb-pins {
pins = "PB9", "PB10";
function = "uart0";
--
2.35.3

View File

@@ -0,0 +1,66 @@
From 9baf7a9252783fadd91d20b22856443b95519ad8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 25 Jan 2021 01:15:58 +0100
Subject: ARM: dts: sunxi: Add aliases for MMC
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/boot/dts/allwinner/sun5i.dtsi | 6 ++++++
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 6 ++++++
arch/arm/boot/dts/allwinner/sun8i-h3.dtsi | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun5i.dtsi b/arch/arm/boot/dts/allwinner/sun5i.dtsi
index 126b80f3ca70..a15effbbbc51 100644
--- a/arch/arm/boot/dts/allwinner/sun5i.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun5i.dtsi
@@ -51,6 +51,12 @@ / {
#address-cells = <1>;
#size-cells = <1>;
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index 2ab73558aaca..a1aaa99ac3c4 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -57,6 +57,12 @@ / {
#address-cells = <1>;
#size-cells = <1>;
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi b/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
index e601317d5de2..30d72d3b670e 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
@@ -44,6 +44,12 @@
#include <dt-bindings/thermal/thermal.h>
/ {
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ };
+
cpu0_opp_table: opp-table-cpu {
compatible = "operating-points-v2";
opp-shared;
--
2.35.3

View File

@@ -0,0 +1,52 @@
From eb72ee4195bae89800989958a8cdd7969c6a56df Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 1 Jan 2020 16:14:29 -0600
Subject: ARM: dts: sunxi: a83t: Add SCPI protocol
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
index 0bbf43850c95..1ef9b4a581ac 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi
@@ -284,6 +284,13 @@ opp-1800000000 {
};
};
+ scpi_protocol: scpi {
+ compatible = "arm,scpi";
+ mboxes = <&msgbox 2>, <&msgbox 3>;
+ mbox-names = "tx", "rx";
+ shmem = <&scpi_sram>;
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -417,6 +424,20 @@ syscon: syscon@1c00000 {
compatible = "allwinner,sun8i-a83t-system-controller",
"syscon";
reg = <0x01c00000 0x1000>;
+
+ sram_a2: sram@40000 {
+ compatible = "mmio-sram";
+ reg = <0x00040000 0x14000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x00040000 0x14000>;
+
+ scpi_sram: scp-shmem@13c00 {
+ compatible = "arm,scp-shmem";
+ reg = <0x13c00 0x200>;
+ };
+ };
+
};
video-codec@01c0e000 {
--
2.35.3

View File

@@ -0,0 +1,81 @@
From 09855e550099acaf674898a63e455444a6de7829 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 1 Jan 2020 16:12:36 -0600
Subject: ARM: dts: sunxi: h3/h5: Add SCPI protocol
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm/boot/dts/allwinner/sun8i-h3.dtsi | 13 +++++++++++++
arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi | 7 +++++++
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 13 +++++++++++++
3 files changed, 33 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi b/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
index da1991c991cb..e601317d5de2 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3.dtsi
@@ -206,6 +206,19 @@ syscon: system-control@1c00000 {
#size-cells = <1>;
ranges;
+ sram_a2: sram@40000 {
+ compatible = "mmio-sram";
+ reg = <0x00040000 0xc000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x00040000 0xc000>;
+
+ scpi_sram: scp-shmem@bc00 {
+ compatible = "arm,scp-shmem";
+ reg = <0xbc00 0x200>;
+ };
+ };
+
sram_c: sram@1d00000 {
compatible = "mmio-sram";
reg = <0x01d00000 0x80000>;
diff --git a/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
index a872fc586ab6..ebc64458084c 100644
--- a/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
@@ -120,6 +120,13 @@ de: display-engine {
status = "disabled";
};
+ scpi_protocol: scpi {
+ compatible = "arm,scpi";
+ mboxes = <&msgbox 2>, <&msgbox 3>;
+ mbox-names = "tx", "rx";
+ shmem = <&scpi_sram>;
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
index d3caf27b6a55..e02a3848003e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
@@ -86,6 +86,19 @@ syscon: system-control@1c00000 {
#size-cells = <1>;
ranges;
+ sram_a2: sram@40000 {
+ compatible = "mmio-sram";
+ reg = <0x00040000 0x14000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x00040000 0x14000>;
+
+ scpi_sram: scp-shmem@13c00 {
+ compatible = "arm,scp-shmem";
+ reg = <0x13c00 0x200>;
+ };
+ };
+
sram_c1: sram@18000 {
compatible = "mmio-sram";
reg = <0x00018000 0x1c000>;
--
2.35.3

View File

@@ -0,0 +1,48 @@
From 932b4b8ec5b9f39e0bd709534756212d2899226f Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 11:04:58 +0200
Subject: ARM: dts: sunxi: h3/h5: Add hdmi sound card
H3 and H5 support HDMI audio. Add a sound card node for it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
index 7df60515a903..0f19e7c00c50 100644
--- a/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
@@ -106,6 +106,20 @@ de: display-engine {
status = "disabled";
};
+ sound_hdmi: sound_hdmi {
+ compatible = "allwinner,sun9i-a80-hdmi-audio",
+ "allwinner,sun8i-h3-hdmi-audio";
+ status = "disabled";
+
+ codec {
+ sound-dai = <&hdmi>;
+ };
+
+ cpu {
+ sound-dai = <&i2s2>;
+ };
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -818,6 +832,7 @@ csi: camera@1cb0000 {
};
hdmi: hdmi@1ee0000 {
+ #sound-dai-cells = <0>;
compatible = "allwinner,sun8i-h3-dw-hdmi",
"allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
--
2.35.3

View File

@@ -0,0 +1,88 @@
From 334ba3f84c411c65d076ba0238980ee61919f17f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 23 Oct 2019 05:06:29 +0200
Subject: ARM: sunxi: Add experimental suspend to memory implementation for
A83T
This just ends with WFI, but all secondary CPUs will be shut down.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/mach-sunxi/sunxi.c | 46 +++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index e1b7945aac99..2d6b7b4528e9 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -12,10 +12,13 @@
#include <linux/init.h>
#include <linux/of_clk.h>
#include <linux/platform_device.h>
+#include <linux/of_platform.h>
#include <linux/reset/sunxi.h>
+#include <linux/suspend.h>
#include <asm/mach/arch.h>
#include <asm/secure_cntvoff.h>
+#include <asm/suspend.h>
static const char * const sunxi_board_dt_compat[] = {
"allwinner,sun4i-a10",
@@ -86,10 +89,53 @@ static const char * const sun8i_a83t_cntvoff_board_dt_compat[] = {
NULL,
};
+#ifdef CONFIG_PM_SLEEP
+static int sun8i_a83t_pm_valid(suspend_state_t state)
+{
+ return state == PM_SUSPEND_MEM;
+}
+
+static int sun8i_a83t_suspend_finish(unsigned long val)
+{
+ // don't do much
+ cpu_do_idle();
+ return 0;
+}
+
+static int sun8i_a83t_pm_enter(suspend_state_t state)
+{
+ switch (state) {
+ case PM_SUSPEND_MEM:
+ cpu_suspend(0, sun8i_a83t_suspend_finish);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static const struct platform_suspend_ops sun8i_a83t_pm_ops = {
+ .enter = sun8i_a83t_pm_enter,
+ .valid = sun8i_a83t_pm_valid,
+};
+#define SUN8I_A83T_PM_OPS &sun8i_a83t_pm_ops
+#else
+#define SUN8I_A83T_PM_OPS NULL
+#endif
+
+static void __init sun8i_a83t_init_machine(void)
+{
+ suspend_set_ops(SUN8I_A83T_PM_OPS);
+
+ of_platform_default_populate(NULL, NULL, NULL);
+}
+
DT_MACHINE_START(SUN8I_A83T_CNTVOFF_DT, "Allwinner A83t board")
.init_early = sun8i_a83t_cntvoff_init,
.init_time = sun6i_timer_init,
.dt_compat = sun8i_a83t_cntvoff_board_dt_compat,
+ .init_machine = sun8i_a83t_init_machine,
MACHINE_END
static const char * const sun9i_board_dt_compat[] = {
--
2.35.3

View File

@@ -0,0 +1,54 @@
From 4a58f295f7ae60c06807b179dd756e5d1123f97d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 2 Nov 2019 15:21:04 +0100
Subject: ARM: sunxi: Use SCPI to send suspend message to SCP on A83T
We use undefined value of 3, to mean SUSPEND_SYSTEM. SCP should:
- kill CPU0
- kill cluster 0
- shutdown power to both clusters (Linux MCPM doesn't do that)
...
- reverse all of the above on interrupt
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/mach-sunxi/sunxi.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 2d6b7b4528e9..d4c25c33455d 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/reset/sunxi.h>
+#include <linux/scpi_protocol.h>
#include <linux/suspend.h>
#include <asm/mach/arch.h>
@@ -97,8 +98,18 @@ static int sun8i_a83t_pm_valid(suspend_state_t state)
static int sun8i_a83t_suspend_finish(unsigned long val)
{
- // don't do much
- cpu_do_idle();
+ struct scpi_ops *scpi;
+
+ scpi = get_scpi_ops();
+ if (scpi && scpi->sys_set_power_state) {
+ //HACK: use invalid state to mean: suspend last CPU and the system
+ scpi->sys_set_power_state(3);
+ cpu_do_idle();
+ } else {
+ // don't do much if scpi is not available
+ cpu_do_idle();
+ }
+
return 0;
}
--
2.35.3

View File

@@ -0,0 +1,27 @@
From 27eb9680cf720fa00ba4dbca5c2f58144afe83b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 23 Oct 2019 05:08:04 +0200
Subject: ARM: sunxi: sunxi_cpu0_hotplug_support_set is not supported on A83T
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm/mach-sunxi/mc_smp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
index 277f6aa8e6c2..ca237d50db4b 100644
--- a/arch/arm/mach-sunxi/mc_smp.c
+++ b/arch/arm/mach-sunxi/mc_smp.c
@@ -146,6 +146,9 @@ static int sunxi_cpu_power_switch_set(unsigned int cpu, unsigned int cluster,
static void sunxi_cpu0_hotplug_support_set(bool enable)
{
+ if (is_a83t)
+ return;
+
if (enable) {
writel(CPU0_SUPPORT_HOTPLUG_MAGIC0, sram_b_smp_base);
writel(CPU0_SUPPORT_HOTPLUG_MAGIC1, sram_b_smp_base + 0x4);
--
2.35.3

View File

@@ -0,0 +1,233 @@
From f24b30cbe351dc0f20a98babe756d988b46fc89f Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Tue, 10 Nov 2020 20:42:44 +0100
Subject: ASOC: sun9i-hdmi-audio: Initial implementation
This implements HDMI audio sound card which is used to enable HDMI audio
on all Allwinner SoCs with DW-HDMI core. First such SoC is A80, but it's
been used on plenty of others, like A64, A83t, H2+, H3, H5, H6, R40 and
V40.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
sound/soc/sunxi/Kconfig | 8 ++
sound/soc/sunxi/Makefile | 1 +
sound/soc/sunxi/sun9i-hdmi-audio.c | 178 +++++++++++++++++++++++++++++
3 files changed, 187 insertions(+)
create mode 100644 sound/soc/sunxi/sun9i-hdmi-audio.c
diff --git a/sound/soc/sunxi/Kconfig b/sound/soc/sunxi/Kconfig
index f87b061f59b2..753c38c5d554 100644
--- a/sound/soc/sunxi/Kconfig
+++ b/sound/soc/sunxi/Kconfig
@@ -76,6 +76,14 @@ config SND_SUN50I_DMIC
Say Y or M to add support for the DMIC audio block in the Allwinner
H6 and affiliated SoCs.
+config SND_SUN9I_HDMI_AUDIO
+ tristate "Allwinner sun9i HDMI Audio Sound Card"
+ depends on OF
+ depends on SND_SUN4I_I2S
+ help
+ Say Y or M to add support for the HDMI Audio sound card for Allwinner
+ SoCs with DW-HDMI core.
+
config SND_SUN8I_ADDA_PR_REGMAP
tristate
select REGMAP
diff --git a/sound/soc/sunxi/Makefile b/sound/soc/sunxi/Makefile
index 6131aea97efa..19800277105c 100644
--- a/sound/soc/sunxi/Makefile
+++ b/sound/soc/sunxi/Makefile
@@ -8,3 +8,4 @@ obj-$(CONFIG_SND_SUN50I_CODEC_ANALOG) += sun50i-codec-analog.o
obj-$(CONFIG_SND_SUN8I_CODEC) += sun8i-codec.o
obj-$(CONFIG_SND_SUN8I_ADDA_PR_REGMAP) += sun8i-adda-pr-regmap.o
obj-$(CONFIG_SND_SUN50I_DMIC) += sun50i-dmic.o
+obj-$(CONFIG_SND_SUN9I_HDMI_AUDIO) += sun9i-hdmi-audio.o
diff --git a/sound/soc/sunxi/sun9i-hdmi-audio.c b/sound/soc/sunxi/sun9i-hdmi-audio.c
new file mode 100644
index 000000000000..32eb6d9decd3
--- /dev/null
+++ b/sound/soc/sunxi/sun9i-hdmi-audio.c
@@ -0,0 +1,178 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// sun9i hdmi audio sound card
+//
+// Copyright (C) 2021 Jernej Skrabec <jernej.skrabec@gmail.com>
+
+#include <linux/module.h>
+#include <linux/of_platform.h>
+
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+
+static int sun9i_hdmi_audio_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ unsigned int mclk;
+
+ mclk = params_rate(params) * 128;
+
+ return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0, mclk,
+ SND_SOC_CLOCK_OUT);
+}
+
+static const struct snd_soc_ops sun9i_hdmi_audio_ops = {
+ .hw_params = sun9i_hdmi_audio_hw_params,
+};
+
+static int sun9i_hdmi_audio_dai_init(struct snd_soc_pcm_runtime *rtd)
+{
+ int ret;
+
+ /* TODO: switch to custom api once it's implemented in sun4i-i2s */
+ ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0, 0, 2, 32);
+ if (ret) {
+ dev_err(snd_soc_rtd_to_cpu(rtd, 0)->dev,
+ "setting tdm link slots failed\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static int sun9i_hdmi_audio_parse_dai(struct device_node *node,
+ struct snd_soc_dai_link_component *dlc)
+{
+ struct of_phandle_args args;
+ int ret;
+
+ if (!node)
+ return 0;
+
+ ret = of_parse_phandle_with_args(node, "sound-dai",
+ "#sound-dai-cells", 0, &args);
+ if (ret)
+ return ret;
+
+ ret = snd_soc_get_dai_name(&args, &dlc->dai_name);
+ if (ret < 0) {
+ of_node_put(args.np);
+
+ return ret;
+ }
+
+ dlc->of_node = args.np;
+
+ return 0;
+}
+
+static int sun9i_hdmi_audio_probe(struct platform_device *pdev)
+{
+ struct snd_soc_dai_link_component *dlc;
+ struct device *dev = &pdev->dev;
+ struct snd_soc_dai_link *link;
+ struct snd_soc_card *card;
+ struct device_node *child;
+ int ret;
+
+ card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL);
+ if (!card)
+ return -ENOMEM;
+
+ link = devm_kzalloc(dev, sizeof(*link), GFP_KERNEL);
+ if (!link)
+ return -ENOMEM;
+
+ dlc = devm_kzalloc(dev, sizeof(*dlc) * 3, GFP_KERNEL);
+ if (!dlc)
+ return -ENOMEM;
+
+ child = of_get_child_by_name(dev->of_node, "codec");
+ if (!child)
+ return -ENODEV;
+
+ ret = sun9i_hdmi_audio_parse_dai(child, &dlc[1]);
+ of_node_put(child);
+ if (ret)
+ return ret;
+
+ child = of_get_child_by_name(dev->of_node, "cpu");
+ if (!child) {
+ ret = -ENODEV;
+ goto out_err;
+ }
+
+ ret = sun9i_hdmi_audio_parse_dai(child, &dlc[0]);
+ of_node_put(child);
+ if (ret)
+ goto out_err;
+
+ dlc[2].of_node = dlc[0].of_node;
+
+ platform_set_drvdata(pdev, card);
+
+ link->cpus = &dlc[0];
+ link->codecs = &dlc[1];
+ link->platforms = &dlc[2];
+
+ link->num_cpus = 1;
+ link->num_codecs = 1;
+ link->num_platforms = 1;
+
+ link->playback_only = 1;
+
+ link->name = "SUN9I-HDMI";
+ link->stream_name = "SUN9I-HDMI PCM";
+
+ link->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_CBS_CFS;
+
+ link->ops = &sun9i_hdmi_audio_ops;
+ link->init = sun9i_hdmi_audio_dai_init;
+
+ card->dai_link = link;
+ card->num_links = 1;
+ card->owner = THIS_MODULE;
+ card->dev = dev;
+ card->name = "sun9i-hdmi";
+
+ ret = devm_snd_soc_register_card(dev, card);
+ if (ret)
+ goto out_err;
+
+ return 0;
+
+out_err:
+ of_node_put(dlc[0].of_node);
+ of_node_put(dlc[1].of_node);
+
+ return ret;
+}
+
+static void sun9i_hdmi_audio_remove(struct platform_device *pdev)
+{
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+ of_node_put(card->dai_link->cpus->of_node);
+ of_node_put(card->dai_link->codecs->of_node);
+}
+
+static const struct of_device_id sun9i_hdmi_audio_match[] = {
+ { .compatible = "allwinner,sun9i-a80-hdmi-audio" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, sun9i_hdmi_audio_match);
+
+static struct platform_driver sun9i_hdmi_audio_driver = {
+ .probe = sun9i_hdmi_audio_probe,
+ .remove = sun9i_hdmi_audio_remove,
+ .driver = {
+ .name = "sun9i-hdmi-audio",
+ .of_match_table = sun9i_hdmi_audio_match,
+ },
+};
+module_platform_driver(sun9i_hdmi_audio_driver);
+
+MODULE_DESCRIPTION("sun9i HDMI Audio Sound Card");
+MODULE_AUTHOR("Jernej Skrabec <jernej.skrabec@gmail.com>");
+MODULE_LICENSE("GPL v2");
--
2.35.3

View File

@@ -0,0 +1,29 @@
From 4fd883ad56886bf4f6c02c13f712d75a39c62c7e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 29 Jul 2022 01:08:29 +0200
Subject: ASoC: codec: es8316: "DAC Soft Ramp Rate" is just a 2 bit control
Max value should be 3, otherwise "DAC Soft Ramp Switch" will be
overwritten by this control.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/codecs/es8316.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 61729e5b50a8..71aad3e4c83f 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -99,7 +99,7 @@ static const struct snd_kcontrol_new es8316_snd_controls[] = {
SOC_DOUBLE_R_TLV("DAC Playback Volume", ES8316_DAC_VOLL,
ES8316_DAC_VOLR, 0, 0xc0, 1, dac_vol_tlv),
SOC_SINGLE("DAC Soft Ramp Switch", ES8316_DAC_SET1, 4, 1, 1),
- SOC_SINGLE("DAC Soft Ramp Rate", ES8316_DAC_SET1, 2, 4, 0),
+ SOC_SINGLE("DAC Soft Ramp Rate", ES8316_DAC_SET1, 2, 3, 0),
SOC_SINGLE("DAC Notch Filter Switch", ES8316_DAC_SET2, 6, 1, 0),
SOC_SINGLE("DAC Double Fs Switch", ES8316_DAC_SET2, 7, 1, 0),
SOC_SINGLE("DAC Stereo Enhancement", ES8316_DAC_SET3, 0, 7, 0),
--
2.35.3

View File

@@ -0,0 +1,154 @@
From 25ebe2053c3e0be1664b6a1582ccdd891f73cfa3 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 25 Sep 2020 21:42:52 -0500
Subject: ASoC: ec25: New codec driver for the EC25 modem
The EC25 LTE modem has a PCM interface, and supports 16-bit PCM audio at
an 8 kHz or 16 kHz sameple rate.
Suggested-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
sound/soc/codecs/Kconfig | 3 ++
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/ec25.c | 94 +++++++++++++++++++++++++++++++++++++++
3 files changed, 99 insertions(+)
create mode 100644 sound/soc/codecs/ec25.c
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index b5e6d0a986c8..ff07a2ecda04 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1124,6 +1124,9 @@ config SND_SOC_HDMI_CODEC
select SND_PCM_IEC958
select HDMI
+config SND_SOC_EC25
+ tristate "EC25 LTE module CODEC"
+
config SND_SOC_ES7134
tristate "Everest Semi ES7134 CODEC"
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 622e360f0086..571c08fdeae3 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -120,6 +120,7 @@ snd-soc-da7219-y := da7219.o da7219-aad.o
snd-soc-da732x-y := da732x.o
snd-soc-da9055-y := da9055.o
snd-soc-dmic-y := dmic.o
+snd-soc-ec25-y := ec25.o
snd-soc-es7134-y := es7134.o
snd-soc-es7241-y := es7241.o
snd-soc-es83xx-dsm-common-y := es83xx-dsm-common.o
@@ -526,6 +527,7 @@ obj-$(CONFIG_SND_SOC_DA7219) += snd-soc-da7219.o
obj-$(CONFIG_SND_SOC_DA732X) += snd-soc-da732x.o
obj-$(CONFIG_SND_SOC_DA9055) += snd-soc-da9055.o
obj-$(CONFIG_SND_SOC_DMIC) += snd-soc-dmic.o
+obj-$(CONFIG_SND_SOC_EC25) += snd-soc-ec25.o
obj-$(CONFIG_SND_SOC_ES7134) += snd-soc-es7134.o
obj-$(CONFIG_SND_SOC_ES7241) += snd-soc-es7241.o
obj-$(CONFIG_SND_SOC_ES83XX_DSM_COMMON) += snd-soc-es83xx-dsm-common.o
diff --git a/sound/soc/codecs/ec25.c b/sound/soc/codecs/ec25.c
new file mode 100644
index 000000000000..4f9b6b06cce7
--- /dev/null
+++ b/sound/soc/codecs/ec25.c
@@ -0,0 +1,94 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/module.h>
+#include <sound/soc.h>
+
+static const struct snd_soc_dapm_widget ec25_dapm_widgets[] = {
+ SND_SOC_DAPM_OUTPUT("AOUT"),
+ SND_SOC_DAPM_INPUT("AIN"),
+};
+
+static const struct snd_soc_dapm_route ec25_dapm_routes[] = {
+ { "AOUT", NULL, "Playback" },
+ { "AOUT", NULL, "Wideband Playback" },
+ { "Capture", NULL, "AIN" },
+ { "Wideband Capture", NULL, "AIN" },
+};
+
+static const struct snd_soc_component_driver ec25_component_driver = {
+ .dapm_widgets = ec25_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(ec25_dapm_widgets),
+ .dapm_routes = ec25_dapm_routes,
+ .num_dapm_routes = ARRAY_SIZE(ec25_dapm_routes),
+ .endianness = 1,
+};
+
+static struct snd_soc_dai_driver ec25_dais[] = {
+ {
+ .name = "ec25",
+ .capture = {
+ .stream_name = "Capture",
+ .channels_min = 1,
+ .channels_max = 1,
+ .rates = SNDRV_PCM_RATE_8000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ },
+ .playback = {
+ .stream_name = "Playback",
+ .channels_min = 1,
+ .channels_max = 1,
+ .rates = SNDRV_PCM_RATE_8000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ },
+ .symmetric_rate = 1,
+ .symmetric_channels = 1,
+ .symmetric_sample_bits = 1,
+ },
+ {
+ .name = "ec25-wb",
+ .capture = {
+ .stream_name = "Wideband Capture",
+ .channels_min = 1,
+ .channels_max = 1,
+ .rates = SNDRV_PCM_RATE_16000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ },
+ .playback = {
+ .stream_name = "Wideband Playback",
+ .channels_min = 1,
+ .channels_max = 1,
+ .rates = SNDRV_PCM_RATE_16000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ },
+ .symmetric_rate = 1,
+ .symmetric_channels = 1,
+ .symmetric_sample_bits = 1,
+ },
+};
+
+static int ec25_codec_probe(struct platform_device *pdev)
+{
+ return devm_snd_soc_register_component(&pdev->dev, &ec25_component_driver,
+ ec25_dais, ARRAY_SIZE(ec25_dais));
+}
+
+static const struct of_device_id ec25_codec_of_match[] = {
+ { .compatible = "quectel,ec25", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, ec25_codec_of_match);
+
+static struct platform_driver ec25_codec_driver = {
+ .driver = {
+ .name = "ec25",
+ .of_match_table = of_match_ptr(ec25_codec_of_match),
+ },
+ .probe = ec25_codec_probe,
+};
+
+module_platform_driver(ec25_codec_driver);
+
+MODULE_DESCRIPTION("ASoC ec25 driver");
+MODULE_AUTHOR("Samuel Holland <samuel@sholland.org>");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:ec25");
--
2.35.3

View File

@@ -0,0 +1,45 @@
From abaea1601aaa34016f3319261dab86c1fbc14e91 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Mon, 15 Aug 2022 02:23:37 +0200
Subject: ASoC: rockchip: Fix doubling of playback speed after system sleep
There is some issue with CRU on RK3399 that can be reproduced by:
- playing some audio and stopping the playback (so that runtime PM suspends I2S)
- putting system to deep sleep and resuming it (using mainline TF-A)
- playing some audio (audio plays at 2x the normal speed)
If the audio is kept playing during system sleep cycle, the issue
does not manifest. Relevant registers in CRU are identical in bug/
no-bug scenarios, so this patch is just touching the CRU registers
without actually changing anything in the end. Touching the registers
fixes the playback speed, though.
Inspired by: https://github.com/djselbeck/linux/commit/cb4be5dec3fa18c4b344c11fed3fc57aa3bea424
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/rockchip/rockchip_i2s.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index b378f870b3ad..b72b896c44d8 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -114,6 +114,13 @@ static int i2s_runtime_resume(struct device *dev)
if (ret)
clk_disable_unprepare(i2s->mclk);
+ if (ret == 0) {
+ unsigned long rate = clk_get_rate(i2s->mclk);
+
+ clk_set_rate(i2s->mclk, rate - 1);
+ clk_set_rate(i2s->mclk, rate);
+ }
+
return ret;
}
--
2.35.3

View File

@@ -0,0 +1,67 @@
From f5db10ee6292552bf889b339061d61e490e2e11b Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 14 May 2024 10:46:10 +0200
Subject: ASoC: simple-card: Allow to define pins for aux jack devices
This restores original behavior of jack pins on Pinephone, as it was
before upstreaming jack detection to codec driver.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/generic/simple-card-utils.c | 40 +++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index fedae7f6f70c..5582f9440d93 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -853,6 +853,46 @@ int simple_util_init_aux_jacks(struct simple_util_priv *priv, char *prefix)
continue;
(void)snd_soc_component_set_jack(component, jack, NULL);
+
+ /* add pins to the jack */
+ int count = of_property_count_strings(card->dev->of_node, "simple-audio-card,jack-pins");
+ if (count < 0) {
+ if (count != -EINVAL)
+ dev_warn(card->dev, "Invalid jack-pins property\n");
+ continue;
+ }
+ if (count % 2) {
+ dev_warn(card->dev, "jack-pins property must have even number of strings\n");
+ continue;
+ }
+
+ for (int idx = 0; idx < count; idx += 2) {
+ const char *aux_dev_name, *pin_name;
+ u32 mask;
+
+ ret = of_property_read_string_index(card->dev->of_node, "simple-audio-card,jack-pins", idx, &aux_dev_name);
+ if (ret < 0)
+ continue;
+ ret = of_property_read_string_index(card->dev->of_node, "simple-audio-card,jack-pins", idx + 1, &pin_name);
+ if (ret < 0)
+ continue;
+ ret = of_property_read_u32_index(card->dev->of_node, "simple-audio-card,jack-pins-mask", idx / 2, &mask);
+ if (ret < 0) {
+ dev_warn(card->dev, "jack-pins-mask for jack pin %s/%s can't be read\n", aux_dev_name, pin_name);
+ continue;
+ }
+
+ if (!strcmp(aux_dev_name, component->name)) {
+ struct snd_soc_jack_pin *pin = devm_kzalloc(card->dev, sizeof(*pin), GFP_KERNEL);
+
+ pin->pin = pin_name;
+ pin->mask = mask;
+
+ dev_info(card->dev, "Adding jack %s pin %s (mask %d)\n",
+ aux_dev_name, pin_name, pin->mask);
+ snd_soc_jack_add_pins(jack, 1, pin);
+ }
+ }
}
return 0;
}
--
2.35.3

View File

@@ -0,0 +1,129 @@
From f1da2c16ddce574d78ba08a294c7dfc4f059dbe4 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 17 Feb 2024 01:13:39 +0100
Subject: ASoC: sun8i-codec: Add debug output for jack detection
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/sunxi/sun8i-codec.c | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 67e304cb4238..a89c0f6aa99f 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -9,6 +9,8 @@
* Mylène Josserand <mylene.josserand@free-electrons.com>
*/
+#define DEBUG
+
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/clk.h>
@@ -234,6 +236,7 @@ struct sun8i_codec {
int jack_status;
int jack_type;
int jack_last_sample;
+ unsigned jack_last_btn;
ktime_t jack_hbias_ready;
struct mutex jack_mutex;
int last_hmic_irq;
@@ -1344,6 +1347,8 @@ static void sun8i_codec_set_hmic_bias(struct sun8i_codec *scodec, bool enable)
snd_soc_dapm_sync(dapm);
+ dev_dbg(scodec->component->dev, "HMIC bias %s\n", enable ? "on" : "off");
+
regmap_update_bits(scodec->regmap, SUN8I_HMIC_CTRL1,
irq_mask, enable ? irq_mask : 0);
}
@@ -1352,6 +1357,7 @@ static void sun8i_codec_jack_work(struct work_struct *work)
{
struct sun8i_codec *scodec = container_of(work, struct sun8i_codec,
jack_work.work);
+ struct device *dev = scodec->component->dev;
unsigned int mdata;
int type;
@@ -1362,6 +1368,7 @@ static void sun8i_codec_jack_work(struct work_struct *work)
return;
scodec->jack_last_sample = -1;
+ scodec->jack_last_btn = 0;
if (scodec->jack_type & SND_JACK_MICROPHONE) {
/*
@@ -1419,6 +1426,8 @@ static void sun8i_codec_jack_work(struct work_struct *work)
snd_soc_jack_report(scodec->jack, type, scodec->jack_type);
scodec->jack_status = SUN8I_JACK_STATUS_CONNECTED;
+
+ dev_dbg(dev, "jack: plug-in reported\n");
} else if (scodec->jack_status == SUN8I_JACK_STATUS_CONNECTED) {
if (scodec->last_hmic_irq != SUN8I_HMIC_STS_JACK_OUT_IRQ_ST)
return;
@@ -1428,14 +1437,18 @@ static void sun8i_codec_jack_work(struct work_struct *work)
sun8i_codec_set_hmic_bias(scodec, false);
snd_soc_jack_report(scodec->jack, 0, scodec->jack_type);
+
+ dev_dbg(dev, "jack: plug-out reported\n");
}
}
static irqreturn_t sun8i_codec_jack_irq(int irq, void *dev_id)
{
struct sun8i_codec *scodec = dev_id;
+ struct device *dev = scodec->component->dev;
int type = SND_JACK_HEADSET;
unsigned int status, value;
+ unsigned btn_chg = 0;
guard(mutex)(&scodec->jack_mutex);
@@ -1447,6 +1460,8 @@ static irqreturn_t sun8i_codec_jack_irq(int irq, void *dev_id)
* 100ms after each interrupt..
*/
if (status & BIT(SUN8I_HMIC_STS_JACK_OUT_IRQ_ST)) {
+ dev_dbg(dev, "jack: irq plug-out\n");
+
/*
* Out interrupt has priority over in interrupt so that if
* we get both, we assume the disconnected state, which is
@@ -1456,6 +1471,8 @@ static irqreturn_t sun8i_codec_jack_irq(int irq, void *dev_id)
mod_delayed_work(system_power_efficient_wq, &scodec->jack_work,
msecs_to_jiffies(100));
} else if (status & BIT(SUN8I_HMIC_STS_JACK_IN_IRQ_ST)) {
+ dev_dbg(dev, "jack: irq plug-in\n");
+
scodec->last_hmic_irq = SUN8I_HMIC_STS_JACK_IN_IRQ_ST;
mod_delayed_work(system_power_efficient_wq, &scodec->jack_work,
msecs_to_jiffies(100));
@@ -1489,9 +1506,22 @@ static irqreturn_t sun8i_codec_jack_irq(int irq, void *dev_id)
* samples are identical.
*/
if (scodec->jack_last_sample >= 0 &&
- scodec->jack_last_sample == value)
+ scodec->jack_last_sample == value) {
snd_soc_jack_report(scodec->jack, type,
scodec->jack_type);
+ btn_chg = (scodec->jack_last_btn ^ type) & SUN8I_CODEC_BUTTONS;
+ scodec->jack_last_btn = type;
+ }
+
+ if (btn_chg & SND_JACK_BTN_0)
+ dev_dbg(dev, "jack: key_%spress BTN_0 (%#x)\n",
+ type & SND_JACK_BTN_0 ? "" : "de", value);
+ if (btn_chg & SND_JACK_BTN_1)
+ dev_dbg(dev, "jack: key_%spress BTN_1 (%#x)\n",
+ type & SND_JACK_BTN_1 ? "" : "de", value);
+ if (btn_chg & SND_JACK_BTN_2)
+ dev_dbg(dev, "jack: key_%spress BTN_2 (%#x)\n",
+ type & SND_JACK_BTN_2 ? "" : "de", value);
scodec->jack_last_sample = value;
}
--
2.35.3

View File

@@ -0,0 +1,47 @@
From 25541f5272bcae10a774c0409a52b19b22ab1f40 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 2 Mar 2024 14:55:31 +0100
Subject: ASoC: sun8i-codec: Allow the jack type to be set via device tree
This makes the codec's jack detection functionality usable from within
simple-sound-card.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/sunxi/sun8i-codec.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index b5dafb749c3f..09fc25f67a15 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -1563,6 +1563,18 @@ static void sun8i_codec_disable_jack_detect(struct snd_soc_component *component)
scodec->jack = NULL;
}
+static int sun8i_codec_component_get_jack_type(struct snd_soc_component *component)
+{
+ struct device_node *node = component->dev->of_node;
+
+ if (of_property_match_string(node, "jack-type", "headset") >= 0)
+ return SND_JACK_HEADSET | SUN8I_CODEC_BUTTONS;
+ else if (of_property_match_string(node, "jack-type", "headphone") >= 0)
+ return SND_JACK_HEADPHONE;
+
+ return 0;
+}
+
static int sun8i_codec_component_set_jack(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *data)
{
@@ -1584,6 +1596,7 @@ static const struct snd_soc_component_driver sun8i_soc_component = {
.dapm_routes = sun8i_codec_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(sun8i_codec_dapm_routes),
.set_jack = sun8i_codec_component_set_jack,
+ .get_jack_type = sun8i_codec_component_get_jack_type,
.probe = sun8i_codec_component_probe,
.idle_bias_on = 1,
.suspend_bias_off = 1,
--
2.35.3

View File

@@ -0,0 +1,48 @@
From 502820ff12a7c20271c8ea894245f3b9a8ea95ac Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 26 Mar 2024 17:38:38 +0100
Subject: ASoC: sun8i-codec: Set jack_type from DT in probe
Jack type needs to be set in probe so that it can be used later on.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/sunxi/sun8i-codec.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index a89c0f6aa99f..c6550f0b3204 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -1602,14 +1602,9 @@ static void sun8i_codec_disable_jack_detect(struct snd_soc_component *component)
static int sun8i_codec_component_get_jack_type(struct snd_soc_component *component)
{
- struct device_node *node = component->dev->of_node;
-
- if (of_property_match_string(node, "jack-type", "headset") >= 0)
- return SND_JACK_HEADSET | SUN8I_CODEC_BUTTONS;
- else if (of_property_match_string(node, "jack-type", "headphone") >= 0)
- return SND_JACK_HEADPHONE;
+ struct sun8i_codec *scodec = snd_soc_component_get_drvdata(component);
- return 0;
+ return scodec->jack_type;
}
static int sun8i_codec_component_set_jack(struct snd_soc_component *component,
@@ -1671,6 +1666,11 @@ static int sun8i_codec_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, scodec);
+ if (of_property_match_string(pdev->dev.of_node, "jack-type", "headset") >= 0)
+ scodec->jack_type = SND_JACK_HEADSET | SUN8I_CODEC_BUTTONS;
+ else if (of_property_match_string(pdev->dev.of_node, "jack-type", "headphone") >= 0)
+ scodec->jack_type = SND_JACK_HEADPHONE;
+
if (scodec->quirks->bus_clock) {
scodec->clk_bus = devm_clk_get(&pdev->dev, "bus");
if (IS_ERR(scodec->clk_bus)) {
--
2.35.3

View File

@@ -0,0 +1,31 @@
From aac86dedcf1d7a4e7360d9990a80f987ca4d7d56 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 23 Feb 2024 01:58:40 +0100
Subject: ASoC: sun8i-codec: define button keycodes
This is likely not upstreamable, but simple. :)
---
sound/soc/sunxi/sun8i-codec.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 09fc25f67a15..67e304cb4238 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -1541,6 +1541,13 @@ static int sun8i_codec_enable_jack_detect(struct snd_soc_component *component,
if (ret)
return ret;
+ if (jack->jack->type & SND_JACK_MICROPHONE) {
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
+ }
+
return 0;
}
--
2.35.3

View File

@@ -0,0 +1,215 @@
From 5e35cfd359a32a0acf7565d3b44d05e8ff847de3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 22 Nov 2016 01:01:49 +0100
Subject: Add README.md with information and u-boot patches
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
...Fix-PLL1-setup-to-never-use-dividers.patch | 33 ++++
README.md | 154 ++++++++++++++++++
2 files changed, 187 insertions(+)
create mode 100644 0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
create mode 100644 README.md
diff --git a/0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch b/0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
new file mode 100644
index 000000000000..2b892e805a2b
--- /dev/null
+++ b/0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
@@ -0,0 +1,33 @@
+From 7f5071f906f79bdc99d6b4b0ccf0cb280abe740b Mon Sep 17 00:00:00 2001
+From: Ondrej Jirman <megi@xff.cz>
+Date: Tue, 20 Dec 2016 11:25:12 +0100
+Subject: [PATCH] sunxi: h3: Fix PLL1 setup to never use dividers
+
+Kernel would lower the divider on first CLK change and cause the
+lock up.
+---
+ arch/arm/mach-sunxi/clock_sun6i.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
+index 50fb302a19..91aa2a0478 100644
+--- a/arch/arm/mach-sunxi/clock_sun6i.c
++++ b/arch/arm/mach-sunxi/clock_sun6i.c
+@@ -94,11 +94,10 @@ void clock_set_pll1(unsigned int clk)
+ int k = 1;
+ int m = 1;
+
+- if (clk > 1152000000) {
+- k = 2;
+- } else if (clk > 768000000) {
++ if (clk >= 1368000000) {
+ k = 3;
+- m = 2;
++ } else if (clk >= 768000000) {
++ k = 2;
+ }
+
+ /* Switch to 24MHz clock while changing PLL1 */
+--
+2.11.0
+
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..74c4c16416d3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,154 @@
+Mainline linux kernel for Orange Pi PC/PC2/PC3/One, TBS A711, PinePhone (Pro), PocketBook Touch Lux 3
+------------------------------------------------------------------------------------------------------
+
+This kernel tree is meant for:
+
+- Orange Pi One
+- Orange Pi PC
+- Orange Pi PC 2
+- Orange Pi 3
+- PinePhone 1.0, 1.1 and 1.2(a/b)
+- TBS A711 Tablet
+- PocketBook Touch Lux 3
+- Pinebook Pro
+- Pinephone Pro
+
+Features in addition to mainline:
+
+- [Orange Pi One/PC/PC2] More aggressive OPPs for CPU
+- [All] Mark one of DRM planes as a cursor plane, speeding up Xorg based desktop with modesetting driver
+- [Orange Pi One/PC/PC2] Configure on-board micro-switches to perform system power off function
+- [Orange Pi One/PC/PC2/3] HDMI audio
+- [Orange Pi 3] Ethernet
+- [TBS A711] HM5065 (back camera) / GC2145 (front camera)
+- [PinePhone] WiFi, Bluetooth, Audio, Modem power, HDMI out over USB-C, USB-C support, cameras, PMIC improvements, power management, fixes here and there
+- [PocketBook Touch Lux 3] Display and Touchscreen support
+- [Pinephone Pro] Everything
+
+Pre-built u-boot and kernels are available at https://xff.cz/kernels/
+
+You may need some firmware files for some part of the functionality. Those are
+available at: https://megous.com/git/linux-firmware
+
+If you want to reproduce my pre-built kernels exactly, you'll need to uncomment
+CONFIG_EXTRA_FIRMWARE_DIR and CONFIG_EXTRA_FIRMWARE in the defconfigs, and
+point CONFIG_EXTRA_FIRMWARE_DIR to a directory on your computer where the
+clone of https://megous.com/git/linux-firmware resides.
+
+You can also leave those two config options commented out, and copy the contents
+of https://megous.com/git/linux-firmware to /lib/firmware/ on the target device.
+
+You can use this kernel to run a desktop environment on Orange Pi SBCs,
+Arch Linux on your Pinephone, or to have a completely opensource OS on
+a Pocketbook e-ink book reader.
+
+Have fun!
+
+
+Build instructions
+------------------
+
+These are rudimentary instructions and you need to understand what you're doing.
+These are just core steps required to build the ATF/u-boot/kernel. Downloading,
+verifying, renaming to correct directories is not described or mentioned. You
+should be able to infer missing necessary steps yourself for your particular needs.
+
+Get necessary toolchains from:
+
+- https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/ for 64bit Orange Pi PC2 and Orange Pi 3, PinePhone
+- https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/ for 32bit Orange Pis, Pocketbook, TBS tablet
+
+Extract toolchains and prepare the environment:
+
+ CWD=`pwd`
+ OUT=$CWD/builds
+ SRC=$CWD/u-boot
+ export PATH="$PATH:$CWD/Toolchains/arm/bin:$CWD/Toolchains/aarch64/bin"
+
+For Orange Pi PC2, Orange Pi 3 or PinePhone:
+
+ export CROSS_COMPILE=aarch64-linux-gnu-
+ export KBUILD_OUTPUT=$OUT/.tmp/uboot-pc2
+ rm -rf "$KBUILD_OUTPUT"
+ mkdir -p $KBUILD_OUTPUT $OUT/pc2
+
+Get and build ATF from https://github.com/ARM-software/arm-trusted-firmware:
+
+ make -C "$CWD/arm-trusted-firmware" PLAT=sun50i_a64 DEBUG=1 bl31
+ cp "$CWD/arm-trusted-firmware/build/sun50i_a64/debug/bl31.bin" "$KBUILD_OUTPUT"
+
+Use sun50i_a64 for Orange Pi PC2 or PinePhone and sun50i_h6 for Orange Pi 3.
+
+Build u-boot from https://megous.com/git/u-boot/ (opi-v2020.04 branch) with appropriate
+defconfig (orangepi_one_defconfig, orangepi_pc2_defconfig, orangepi_pc_defconfig, orangepi_3_defconfig, tbs_a711_defconfig, pinephone_defconfig).
+
+My u-boot branch already has all the necessary patches integrated and is configured for quick u-boot/kernel startup.
+
+ make -C u-boot orangepi_pc2_defconfig
+ make -C u-boot -j5
+
+ cp $KBUILD_OUTPUT/.config $OUT/pc2/uboot.config
+ cat $KBUILD_OUTPUT/{spl/sunxi-spl.bin,u-boot.itb} > $OUT/pc2/uboot.bin
+
+Get kernel from this repository and checkout the latest orange-pi-5.18 branch.
+
+Build the kernel for 64-bit boards:
+
+ export ARCH=arm64
+ export CROSS_COMPILE=aarch64-linux-gnu-
+ export KBUILD_OUTPUT=$OUT/.tmp/linux-arm64
+ mkdir -p $KBUILD_OUTPUT $OUT/pc2
+
+ make -C linux orangepi_defconfig
+ # or make -C linux pocketbook_touch_lux_3_defconfig
+ # or make -C linux tbs_a711_defconfig
+ make -C linux -j5 clean
+ make -C linux -j5 Image dtbs
+
+ cp -f $KBUILD_OUTPUT/arch/arm64/boot/Image $OUT/pc2/
+ cp -f $KBUILD_OUTPUT/.config $OUT/pc2/linux.config
+ cp -f $KBUILD_OUTPUT/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dtb $OUT/pc2/board.dtb
+
+Build the kernel for 32-bit boards:
+
+ export ARCH=arm
+ export CROSS_COMPILE=arm-linux-gnueabihf-
+ export KBUILD_OUTPUT=$OUT/.tmp/linux-arm
+ mkdir -p $KBUILD_OUTPUT $OUT/pc
+
+ make orangepi_defconfig
+ # or make pinephone_defconfig
+ make -C linux orangepi_defconfig
+ make -C linux -j5 clean
+ make -C linux -j5 zImage dtbs
+
+ cp -f $KBUILD_OUTPUT/arch/arm/boot/zImage $OUT/pc/
+ cp -f $KBUILD_OUTPUT/.config $OUT/pc/linux.config
+ cp -f $KBUILD_OUTPUT/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dtb $OUT/pc/board.dtb
+ # Or use sun8i-h3-orangepi-one.dtb for Orange Pi One
+
+
+PinePhone
+---------
+
+I don't run u-boot on PinePhone, so my pre-built kernel packages don't come
+with u-boot built for PinePhone.
+
+
+Kernel lockup issues
+--------------------
+
+*If you're getting lockups on boot or later during thermal regulation,
+you're missing an u-boot patch.*
+
+This patch is necessary to run this kernel!
+
+These lockups are caused by improper NKMP clock factors selection
+in u-boot for PLL_CPUX. (M divider should not be used. P divider
+should be used only for frequencies below 240MHz.)
+
+This patch for u-boot fixes it:
+
+ 0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
+
+Kernel side is already fixed in this kernel tree.
--
2.35.3

View File

@@ -0,0 +1,66 @@
From 8f2023b76f807bb2b09a9a1903af820629e2f2ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 18 Aug 2017 13:56:06 +0200
Subject: Add support for my private Sapomat device
---
arch/arm/boot/dts/allwinner/Makefile | 1 +
.../sun8i-h3-orangepi-pc-sapomat.dts | 34 +++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts
diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile
index cd0d044882cf..54b156fca9bf 100644
--- a/arch/arm/boot/dts/allwinner/Makefile
+++ b/arch/arm/boot/dts/allwinner/Makefile
@@ -238,6 +238,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-h3-orangepi-lite.dtb \
sun8i-h3-orangepi-one.dtb \
sun8i-h3-orangepi-pc.dtb \
+ sun8i-h3-orangepi-pc-sapomat.dtb \
sun8i-h3-orangepi-pc-plus.dtb \
sun8i-h3-orangepi-plus.dtb \
sun8i-h3-orangepi-plus2e.dtb \
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts
new file mode 100644
index 000000000000..55c82d5fb63f
--- /dev/null
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts
@@ -0,0 +1,34 @@
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "sun8i-h3-orangepi-pc.dts"
+
+/ {
+ model = "Xunlong Orange Pi PC Sapomat";
+
+ sapomat_gpio_keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <50>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sapomat_btn_pins>;
+
+ red_btn {
+ label = "Red Button";
+ linux,code = <BTN_4>;
+ gpios = <&pio 2 4 GPIO_ACTIVE_LOW>; /* PC4 */
+ };
+
+ green_btn {
+ label = "Green Button";
+ linux,code = <BTN_5>;
+ gpios = <&pio 2 7 GPIO_ACTIVE_LOW>; /* PC7 */
+ };
+ };
+};
+
+&pio {
+ sapomat_btn_pins: btn_pins@0 {
+ pins = "PC4", "PC7";
+ function = "gpio_in";
+ bias-pull-up;
+ };
+};
--
2.35.3

View File

@@ -0,0 +1,32 @@
From 83052bfd2d05d445298ee5f8c56c456d64b088b5 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 26 Aug 2023 10:55:24 +0200
Subject: Fix intptr_t typedef
GCC includes the same typedef, but on some 32bit platforms it's defined
as int, leading to conflicts.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
include/linux/types.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/types.h b/include/linux/types.h
index 2bc8766ba20c..246d8b89d76a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -40,7 +40,11 @@ typedef __kernel_uid16_t uid16_t;
typedef __kernel_gid16_t gid16_t;
typedef unsigned long uintptr_t;
+#if __SIZEOF_POINTER__ == __SIZEOF_INT__
+typedef int intptr_t;
+#else
typedef long intptr_t;
+#endif
#ifdef CONFIG_HAVE_UID16
/* This is defined by include/asm-{arch}/posix_types.h */
--
2.35.3

View File

@@ -0,0 +1,30 @@
From d275de46dcd4a7705bdcc164af26f583663cc4fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 30 Sep 2017 21:31:35 +0200
Subject: MAINTAINERS: Add entry for Himax HM5065
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
MAINTAINERS | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index cc40a9d9b8cd..df362a56c326 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10053,6 +10053,12 @@ L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/misc/hisi_hikey_usb.c
+HIMAX HM5065 SENSOR DRIVER
+M: Ondrej Jirman <kernel@xff.cz>
+L: linux-media@vger.kernel.org
+S: Supported
+F: drivers/media/i2c/hm5065.c
+
HIMAX HX83112B TOUCHSCREEN SUPPORT
M: Job Noorman <job@noorman.info>
L: linux-input@vger.kernel.org
--
2.35.3

View File

@@ -0,0 +1,39 @@
From 718431a65b0393cd8364c12d3e72a13d7523fcda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 18 Aug 2017 13:55:48 +0200
Subject: Make microbuttons on Orange Pi PC and PC 2 work as power off buttons
---
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts | 2 +-
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
index 927fd1bab07d..f5476cdab8a4 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-one.dts
@@ -91,7 +91,7 @@ gpio-keys {
switch-4 {
label = "sw4";
- linux,code = <BTN_0>;
+ linux,code = <KEY_POWER>;
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
};
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
index 460c0e3d2f97..0d6881c73b4c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -60,7 +60,7 @@ gpio-keys {
key-sw4 {
label = "sw4";
- linux,code = <BTN_0>;
+ linux,code = <KEY_POWER>;
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
wakeup-source;
};
--
2.35.3

View File

@@ -0,0 +1,40 @@
From cd93f971df67851f2c399e795e0d793e68a10475 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 10 Feb 2020 01:00:12 +0100
Subject: Mark some slow drivers for async probe with PROBE_PREFER_ASYNCHRONOUS
This makes it faster to boot TBS A711 tablet.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/iio/accel/bma180.c | 1 +
drivers/nfc/nxp-nci/i2c.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 6581772cb0c4..88e796a67324 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -1127,6 +1127,7 @@ static struct i2c_driver bma180_driver = {
.name = "bma180",
.pm = pm_sleep_ptr(&bma180_pm_ops),
.of_match_table = bma180_of_match,
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.probe = bma180_probe,
.remove = bma180_remove,
diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index a8aced0b8010..4bf9341ceaaf 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -348,6 +348,7 @@ static struct i2c_driver nxp_nci_i2c_driver = {
.name = NXP_NCI_I2C_DRIVER_NAME,
.acpi_match_table = ACPI_PTR(acpi_id),
.of_match_table = of_nxp_nci_i2c_match,
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.probe = nxp_nci_i2c_probe,
.id_table = nxp_nci_i2c_id_table,
--
2.35.3

View File

@@ -0,0 +1,115 @@
From 77a7582292c8b6ca8ff798ee94f03e4f61252b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 9 May 2021 23:43:21 +0200
Subject: Move a node to avoid merge conflict
---
arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi | 12 ++++-----
.../dts/allwinner/sun50i-h6-orangepi-3.dts | 8 +++---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 27 +++++++++----------
3 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
index 0f19e7c00c50..a872fc586ab6 100644
--- a/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/allwinner/sunxi-h3-h5.dtsi
@@ -100,12 +100,6 @@ osc32k: osc32k-clk {
};
};
- de: display-engine {
- compatible = "allwinner,sun8i-h3-display-engine";
- allwinner,pipelines = <&mixer0>;
- status = "disabled";
- };
-
sound_hdmi: sound_hdmi {
compatible = "allwinner,sun9i-a80-hdmi-audio",
"allwinner,sun8i-h3-hdmi-audio";
@@ -120,6 +114,12 @@ cpu {
};
};
+ de: display-engine {
+ compatible = "allwinner,sun8i-h3-display-engine";
+ allwinner,pipelines = <&mixer0>;
+ status = "disabled";
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index a8eaa98fef1b..332a9fe83ccd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -128,6 +128,10 @@ &gpu {
status = "okay";
};
+&i2s1 {
+ status = "okay";
+};
+
&hdmi {
status = "okay";
};
@@ -167,10 +171,6 @@ ext_rgmii_phy: ethernet-phy@1 {
};
};
-&i2s1 {
- status = "okay";
-};
-
&mmc0 {
vmmc-supply = <&reg_cldo1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 13fe21b00711..c4e35a255643 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -126,20 +126,6 @@ psci {
method = "smc";
};
- sound_hdmi: sound_hdmi {
- compatible = "allwinner,sun9i-a80-hdmi-audio",
- "allwinner,sun50i-h6-hdmi-audio";
- status = "disabled";
-
- codec {
- sound-dai = <&hdmi>;
- };
-
- cpu {
- sound-dai = <&i2s1>;
- };
- };
-
timer {
compatible = "arm,armv8-timer";
arm,no-tick-in-suspend;
@@ -153,6 +139,19 @@ timer {
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
+ sound_hdmi: sound_hdmi {
+ compatible = "allwinner,sun9i-a80-hdmi-audio",
+ "allwinner,sun50i-h6-hdmi-audio";
+ status = "disabled";
+
+ codec {
+ sound-dai = <&hdmi>;
+ };
+
+ cpu {
+ sound-dai = <&i2s1>;
+ };
+ };
soc {
compatible = "simple-bus";
--
2.35.3

View File

@@ -0,0 +1,28 @@
From b5073e75d9adf1c1707ccfe0d5b22c117a260f9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 1 Nov 2020 02:57:38 +0100
Subject: Revert "drm/sun4i: lvds: Invert the LVDS polarity"
This reverts commit 3bc46a083fa9f475dd2e0ab8717d9839b070b8d9.
---
drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index a1a2c845ade0..b78799dedf62 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -476,7 +476,9 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon,
SUN4I_TCON0_BASIC2_V_TOTAL(mode->crtc_vtotal * 2) |
SUN4I_TCON0_BASIC2_V_BACKPORCH(bp));
- reg = SUN4I_TCON0_LVDS_IF_CLK_SEL_TCON0;
+ reg = SUN4I_TCON0_LVDS_IF_CLK_SEL_TCON0 |
+ SUN4I_TCON0_LVDS_IF_DATA_POL_NORMAL |
+ SUN4I_TCON0_LVDS_IF_CLK_POL_NORMAL;
if (sun4i_tcon_get_pixel_depth(encoder) == 24)
reg |= SUN4I_TCON0_LVDS_IF_BITWIDTH_24BITS;
else
--
2.35.3

View File

@@ -0,0 +1,39 @@
From 41a9b1e7b88b0212b3c026558d68645f4e69e685 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 7 May 2024 18:39:12 +0200
Subject: Revert "usb: typec: tcpm: unregister existing source caps before
re-registration"
This reverts commit 230ecdf71a644c9c73e0e6735b33173074ae3f94.
---
drivers/usb/typec/tcpm/tcpm.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 4b02d6474259..b1c12ddd43f7 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -3005,7 +3005,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
{
struct usb_power_delivery_desc desc = { port->negotiated_rev };
struct usb_power_delivery_capabilities_desc caps = { };
- struct usb_power_delivery_capabilities *cap = port->partner_source_caps;
+ struct usb_power_delivery_capabilities *cap;
if (!port->partner_pd)
port->partner_pd = usb_power_delivery_register(NULL, &desc);
@@ -3015,11 +3015,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
memcpy(caps.pdo, port->source_caps, sizeof(u32) * port->nr_source_caps);
caps.role = TYPEC_SOURCE;
- if (cap) {
- usb_power_delivery_unregister_capabilities(cap);
- port->partner_source_caps = NULL;
- }
-
cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps);
if (IS_ERR(cap))
return PTR_ERR(cap);
--
2.35.3

View File

@@ -0,0 +1,301 @@
From ec2545d2f1196193a584a4bf44ca5eac2a63ed60 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 12 May 2024 23:36:08 +0200
Subject: Update defconfigs
---
arch/arm/configs/orangepi_defconfig | 3 +--
.../arm/configs/pocketbook_touch_lux_3_defconfig | 2 +-
arch/arm/configs/tbs_a711_defconfig | 3 +--
arch/arm64/configs/orangepi_defconfig | 16 ++++++----------
arch/arm64/configs/pinephone_defconfig | 9 ++++-----
arch/arm64/configs/pinephone_multidist_defconfig | 9 ++++-----
6 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/arch/arm/configs/orangepi_defconfig b/arch/arm/configs/orangepi_defconfig
index 2ebd59970d3b..8dd9219c89d7 100644
--- a/arch/arm/configs/orangepi_defconfig
+++ b/arch/arm/configs/orangepi_defconfig
@@ -76,6 +76,7 @@ CONFIG_BLK_CGROUP_IOCOST=y
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
+CONFIG_CMA_AREAS=7
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
@@ -191,7 +192,6 @@ CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
-CONFIG_BT_HS=y
CONFIG_BT_LEDS=y
CONFIG_BT_HCIBTSDIO=y
CONFIG_BT_HCIUART=y
@@ -366,7 +366,6 @@ CONFIG_AXP20X_POWER=y
CONFIG_SENSORS_RASPBERRYPI_HWMON=y
CONFIG_THERMAL=y
CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_CPU_THERMAL=y
diff --git a/arch/arm/configs/pocketbook_touch_lux_3_defconfig b/arch/arm/configs/pocketbook_touch_lux_3_defconfig
index 2d5db37e86cb..caef90469c39 100644
--- a/arch/arm/configs/pocketbook_touch_lux_3_defconfig
+++ b/arch/arm/configs/pocketbook_touch_lux_3_defconfig
@@ -71,6 +71,7 @@ CONFIG_BLK_CGROUP_IOLATENCY=y
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
+CONFIG_CMA_AREAS=7
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
@@ -235,7 +236,6 @@ CONFIG_AXP20X_POWER=y
CONFIG_SENSORS_NTC_THERMISTOR=y
CONFIG_THERMAL=y
CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_CPU_THERMAL=y
diff --git a/arch/arm/configs/tbs_a711_defconfig b/arch/arm/configs/tbs_a711_defconfig
index f28899833bbf..58ba99e82522 100644
--- a/arch/arm/configs/tbs_a711_defconfig
+++ b/arch/arm/configs/tbs_a711_defconfig
@@ -74,6 +74,7 @@ CONFIG_BLK_CGROUP_IOLATENCY=y
# CONFIG_BFQ_GROUP_IOSCHED is not set
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
+CONFIG_CMA_AREAS=7
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
@@ -168,7 +169,6 @@ CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=m
-CONFIG_BT_HS=y
CONFIG_BT_LEDS=y
CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_HCIUART=m
@@ -272,7 +272,6 @@ CONFIG_AXP20X_POWER=y
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_CPU_THERMAL=y
diff --git a/arch/arm64/configs/orangepi_defconfig b/arch/arm64/configs/orangepi_defconfig
index 82f1448bbf14..4ee0756cef5f 100644
--- a/arch/arm64/configs/orangepi_defconfig
+++ b/arch/arm64/configs/orangepi_defconfig
@@ -45,15 +45,14 @@ CONFIG_PERF_EVENTS=y
CONFIG_ARCH_SUNXI=y
CONFIG_ARCH_ROCKCHIP=y
# CONFIG_ARM64_ERRATUM_832075 is not set
-# CONFIG_ARM64_ERRATUM_834220 is not set
-# CONFIG_ARM64_ERRATUM_1542419 is not set
+CONFIG_ARM64_ERRATUM_2441007=y
+CONFIG_ARM64_ERRATUM_1286807=y
# CONFIG_ARM64_ERRATUM_1508412 is not set
# CONFIG_ARM64_ERRATUM_2051678 is not set
# CONFIG_ARM64_ERRATUM_2077057 is not set
# CONFIG_ARM64_ERRATUM_2658417 is not set
# CONFIG_ARM64_ERRATUM_2054223 is not set
# CONFIG_ARM64_ERRATUM_2067961 is not set
-# CONFIG_ARM64_ERRATUM_2441009 is not set
# CONFIG_ARM64_ERRATUM_2645198 is not set
# CONFIG_ARM64_ERRATUM_2966298 is not set
# CONFIG_CAVIUM_ERRATUM_22375 is not set
@@ -212,6 +211,7 @@ CONFIG_NFT_FIB_NETDEV=y
CONFIG_NFT_REJECT_NETDEV=y
CONFIG_NF_FLOW_TABLE_INET=y
CONFIG_NF_FLOW_TABLE=y
+CONFIG_NETFILTER_XTABLES=y
CONFIG_IP_SET=y
CONFIG_IP_SET_BITMAP_IP=y
CONFIG_IP_SET_BITMAP_IPMAC=y
@@ -235,7 +235,6 @@ CONFIG_NF_TABLES_ARP=y
CONFIG_NF_LOG_ARP=y
CONFIG_NF_LOG_IPV4=y
# CONFIG_NF_NAT_SNMP_BASIC is not set
-CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
CONFIG_NFT_DUP_IPV6=y
@@ -318,7 +317,6 @@ CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
-CONFIG_BT_HS=y
CONFIG_BT_LEDS=y
CONFIG_BT_HCIBTUSB=y
CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y
@@ -548,7 +546,6 @@ CONFIG_SENSORS_ARM_SCPI=y
CONFIG_SENSORS_GPIO_FAN=y
CONFIG_THERMAL=y
CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_CPU_THERMAL=y
@@ -631,11 +628,11 @@ CONFIG_ROCKCHIP_LVDS=y
CONFIG_ROCKCHIP_RGB=y
CONFIG_DRM_SUN4I=y
CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A=y
-CONFIG_DRM_PANEL_SIMPLE=y
-CONFIG_DRM_PANEL_EDP=y
CONFIG_DRM_PANEL_HIMAX_HX8394=y
CONFIG_DRM_PANEL_ILITEK_ILI9881C=y
CONFIG_DRM_PANEL_SITRONIX_ST7703=y
+CONFIG_DRM_PANEL_EDP=y
+CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_DISPLAY_CONNECTOR=y
CONFIG_DRM_SIMPLE_BRIDGE=y
CONFIG_DRM_CDNS_DSI=y
@@ -829,6 +826,7 @@ CONFIG_MAILBOX=y
CONFIG_ROCKCHIP_MBOX=y
CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y
CONFIG_ROCKCHIP_IOMMU=y
+CONFIG_SUN50I_IOMMU=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_V3=y
CONFIG_ROCKCHIP_IODOMAIN=y
@@ -974,7 +972,6 @@ CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_ZSTD=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_USER_API_HASH=y
@@ -989,7 +986,6 @@ CONFIG_CRYPTO_SHA512_ARM64_CE=y
CONFIG_CRYPTO_SHA3_ARM64=y
CONFIG_CRYPTO_SM3_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_BS=y
CONFIG_CRYPTO_SM4_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
diff --git a/arch/arm64/configs/pinephone_defconfig b/arch/arm64/configs/pinephone_defconfig
index 7ac485b54aea..74e9abbf09a3 100644
--- a/arch/arm64/configs/pinephone_defconfig
+++ b/arch/arm64/configs/pinephone_defconfig
@@ -42,11 +42,11 @@ CONFIG_ARCH_SUNXI=y
# CONFIG_ARM64_ERRATUM_1165522 is not set
# CONFIG_ARM64_ERRATUM_1319367 is not set
# CONFIG_ARM64_ERRATUM_1530923 is not set
-# CONFIG_ARM64_ERRATUM_1286807 is not set
+CONFIG_ARM64_ERRATUM_2441007=y
# CONFIG_ARM64_ERRATUM_1463225 is not set
-# CONFIG_ARM64_ERRATUM_1542419 is not set
# CONFIG_ARM64_ERRATUM_2051678 is not set
# CONFIG_ARM64_ERRATUM_2077057 is not set
+CONFIG_ARM64_ERRATUM_2441009=y
# CONFIG_CAVIUM_ERRATUM_22375 is not set
# CONFIG_CAVIUM_ERRATUM_23154 is not set
# CONFIG_CAVIUM_ERRATUM_27456 is not set
@@ -59,6 +59,7 @@ CONFIG_ARCH_SUNXI=y
# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set
# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set
# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set
+CONFIG_ARM64_VA_BITS_39=y
CONFIG_SCHED_MC=y
CONFIG_NR_CPUS=4
CONFIG_HZ_100=y
@@ -107,6 +108,7 @@ CONFIG_PARTITION_ADVANCED=y
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
+CONFIG_CMA_AREAS=7
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
@@ -206,7 +208,6 @@ CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=m
-CONFIG_BT_HS=y
CONFIG_BT_LEDS=y
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_RTL=y
@@ -325,7 +326,6 @@ CONFIG_AXP20X_POWER=y
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_CPU_THERMAL=y
@@ -624,7 +624,6 @@ CONFIG_CRYPTO_SHA512_ARM64_CE=m
CONFIG_CRYPTO_SHA3_ARM64=m
CONFIG_CRYPTO_SM3_ARM64_CE=m
CONFIG_CRYPTO_AES_ARM64=m
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=m
CONFIG_CRYPTO_AES_ARM64_BS=m
CONFIG_CRYPTO_SM4_ARM64_CE=m
CONFIG_CRYPTO_AES_ARM64_CE_CCM=m
diff --git a/arch/arm64/configs/pinephone_multidist_defconfig b/arch/arm64/configs/pinephone_multidist_defconfig
index 92b9119238c0..9f65f896e251 100644
--- a/arch/arm64/configs/pinephone_multidist_defconfig
+++ b/arch/arm64/configs/pinephone_multidist_defconfig
@@ -42,11 +42,11 @@ CONFIG_ARCH_SUNXI=y
# CONFIG_ARM64_ERRATUM_1165522 is not set
# CONFIG_ARM64_ERRATUM_1319367 is not set
# CONFIG_ARM64_ERRATUM_1530923 is not set
-# CONFIG_ARM64_ERRATUM_1286807 is not set
+CONFIG_ARM64_ERRATUM_2441007=y
# CONFIG_ARM64_ERRATUM_1463225 is not set
-# CONFIG_ARM64_ERRATUM_1542419 is not set
# CONFIG_ARM64_ERRATUM_2051678 is not set
# CONFIG_ARM64_ERRATUM_2077057 is not set
+CONFIG_ARM64_ERRATUM_2441009=y
# CONFIG_CAVIUM_ERRATUM_22375 is not set
# CONFIG_CAVIUM_ERRATUM_23154 is not set
# CONFIG_CAVIUM_ERRATUM_27456 is not set
@@ -59,6 +59,7 @@ CONFIG_ARCH_SUNXI=y
# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set
# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set
# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set
+CONFIG_ARM64_VA_BITS_39=y
CONFIG_SCHED_MC=y
CONFIG_NR_CPUS=4
CONFIG_COMPAT=y
@@ -101,6 +102,7 @@ CONFIG_PARTITION_ADVANCED=y
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
+CONFIG_CMA_AREAS=7
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
@@ -200,7 +202,6 @@ CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
-CONFIG_BT_HS=y
CONFIG_BT_LEDS=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_RTL=y
@@ -320,7 +321,6 @@ CONFIG_AXP20X_POWER=y
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_CPU_THERMAL=y
@@ -575,7 +575,6 @@ CONFIG_CRYPTO_SHA512_ARM64_CE=y
CONFIG_CRYPTO_SHA3_ARM64=y
CONFIG_CRYPTO_SM3_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_BS=y
CONFIG_CRYPTO_SM4_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
--
2.35.3

View File

@@ -0,0 +1,197 @@
From 8abc1bbc616ddf6297bbfb657641d5aaac39e4e3 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Thu, 1 Aug 2024 17:52:41 +0200
Subject: Update for 6.11
---
arch/arm/configs/orangepi_defconfig | 2 +-
.../arm/configs/pocketbook_touch_lux_3_defconfig | 1 -
arch/arm/configs/tbs_a711_defconfig | 2 --
arch/arm64/configs/orangepi_defconfig | 16 ++++++++++------
arch/arm64/configs/pinephone_defconfig | 1 -
arch/arm64/configs/pinephone_multidist_defconfig | 1 -
6 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/arm/configs/orangepi_defconfig b/arch/arm/configs/orangepi_defconfig
index 8dd9219c89d7..1b41de066b6e 100644
--- a/arch/arm/configs/orangepi_defconfig
+++ b/arch/arm/configs/orangepi_defconfig
@@ -620,7 +620,6 @@ CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_NFS_FS=y
-# CONFIG_NFS_V2 is not set
# CONFIG_NFS_V3 is not set
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
@@ -630,6 +629,7 @@ CONFIG_NFS_FSCACHE=y
CONFIG_NFSD=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
+# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set
CONFIG_CIFS=y
# CONFIG_CIFS_STATS2 is not set
CONFIG_CIFS_XATTR=y
diff --git a/arch/arm/configs/pocketbook_touch_lux_3_defconfig b/arch/arm/configs/pocketbook_touch_lux_3_defconfig
index caef90469c39..948f7bf2eae1 100644
--- a/arch/arm/configs/pocketbook_touch_lux_3_defconfig
+++ b/arch/arm/configs/pocketbook_touch_lux_3_defconfig
@@ -244,7 +244,6 @@ CONFIG_SUNXI_WATCHDOG=y
CONFIG_MFD_SUN4I_GPADC=y
CONFIG_MFD_AXP20X_I2C=y
CONFIG_MFD_SUN6I_PRCM=y
-CONFIG_MFD_SYSCON=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_USERSPACE_CONSUMER_OF=y
diff --git a/arch/arm/configs/tbs_a711_defconfig b/arch/arm/configs/tbs_a711_defconfig
index 58ba99e82522..1665409799d0 100644
--- a/arch/arm/configs/tbs_a711_defconfig
+++ b/arch/arm/configs/tbs_a711_defconfig
@@ -281,7 +281,6 @@ CONFIG_SUNXI_WATCHDOG=y
CONFIG_MFD_SUN4I_GPADC=y
CONFIG_MFD_AC100=y
CONFIG_MFD_AXP20X_RSB=y
-CONFIG_MFD_SYSCON=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_USERSPACE_CONSUMER=y
@@ -503,7 +502,6 @@ CONFIG_CRYPTO_DEV_SUN8I_CE=m
CONFIG_CRYPTO_DEV_SUN8I_SS=m
CONFIG_PKCS8_PRIVATE_KEY_PARSER=y
CONFIG_CRC_CCITT=y
-CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y
CONFIG_DMA_CMA=y
diff --git a/arch/arm64/configs/orangepi_defconfig b/arch/arm64/configs/orangepi_defconfig
index 4ee0756cef5f..cd3703629d8c 100644
--- a/arch/arm64/configs/orangepi_defconfig
+++ b/arch/arm64/configs/orangepi_defconfig
@@ -106,7 +106,6 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
CONFIG_CPUFREQ_DT=y
CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y
CONFIG_ARM_SCPI_CPUFREQ=y
-CONFIG_ARM_ROCKCHIP_CPUFREQ=y
CONFIG_ARM_SCMI_CPUFREQ=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
@@ -352,7 +351,7 @@ CONFIG_PCIE_ROCKCHIP_DW_HOST=y
CONFIG_UEVENT_HELPER=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
-#CONFIG_EXTRA_FIRMWARE="regulatory.db regulatory.db.p7s edid/asus.bin brcm/brcmfmac43456-sdio.bin brcm/brcmfmac43456-sdio.clm_blob brcm/brcmfmac43456-sdio.txt brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt brcm/BCM4345C5.hcd brcm/brcmfmac43456-sdio.xunlong,orangepi-3.txt anx7688-fw.bin rtl_bt/rtl8723cs_xx_config.bin rtl_bt/rtl8723cs_xx_fw.bin ov5640_af.bin brcm/brcmfmac43455-sdio.bin brcm/brcmfmac43455-sdio.pine64,pinephone-pro.txt brcm/brcmfmac43455-sdio.pine64,pinebook-pro.txt brcm/brcmfmac43455-sdio.clm_blob brcm/BCM4345C0.hcd rockchip/dptx.bin rt2870.bin rtw88/rtw8822c_fw.bin rtw88/rtw8822c_wow_fw.bin rtw89/rtw8852a_fw.bin rtl_nic/rtl8125a-3.fw rtl_nic/rtl8125b-2.fw rtl_nic/rtl8153a-4.fw rtl_nic/rtl8168h-2.fw brcm/brcmfmac43752-pcie.clm_blob brcm/brcmfmac43752-pcie.bin brcm/brcmfmac43752-pcie.txt bes2600/bes2600_factory.txt bes2600/best2002_fw_boot_sdio.bin bes2600/best2002_fw_sdio.bin bes2600/best2002_fw_sdio_btrf.bin bes2600/best2002_fw_sdio_nosignal.bin bes2600/sdd.bin bes2600/factory.bin rtl_bt/rtl8821c_fw.bin rtl_bt/rtl8821c_config.bin rtl_bt/rtl8822b_fw.bin rtl_bt/rtl8822b_config.bin rtw88/rtw8821c_fw.bin rtw88/rtw8822b_fw.bin"
+#CONFIG_EXTRA_FIRMWARE="regulatory.db regulatory.db.p7s edid/asus.bin brcm/brcmfmac43456-sdio.bin brcm/brcmfmac43456-sdio.clm_blob brcm/brcmfmac43456-sdio.txt brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt brcm/BCM4345C5.hcd brcm/brcmfmac43456-sdio.xunlong,orangepi-3.txt anx7688-fw.bin rtl_bt/rtl8723cs_xx_config.bin rtl_bt/rtl8723cs_xx_fw.bin ov5640_af.bin brcm/brcmfmac43455-sdio.bin brcm/brcmfmac43455-sdio.pine64,pinephone-pro.txt brcm/brcmfmac43455-sdio.pine64,pinebook-pro.txt brcm/brcmfmac43455-sdio.clm_blob brcm/BCM4345C0.hcd rockchip/dptx.bin rt2870.bin rtw88/rtw8822c_fw.bin rtw88/rtw8822c_wow_fw.bin rtw89/rtw8852a_fw.bin rtl_nic/rtl8125a-3.fw rtl_nic/rtl8125b-2.fw rtl_nic/rtl8153a-4.fw rtl_nic/rtl8168h-2.fw brcm/brcmfmac43752-pcie.clm_blob brcm/brcmfmac43752-pcie.bin brcm/brcmfmac43752-pcie.txt bes2600/bes2600_factory.txt bes2600/best2002_fw_boot_sdio.bin bes2600/best2002_fw_sdio.bin bes2600/best2002_fw_sdio_btrf.bin bes2600/best2002_fw_sdio_nosignal.bin bes2600/sdd.bin bes2600/factory.bin rtl_bt/rtl8821c_fw.bin rtl_bt/rtl8821c_config.bin rtl_bt/rtl8822b_fw.bin rtl_bt/rtl8822b_config.bin rtw88/rtw8821c_fw.bin rtw88/rtw8822b_fw.bin arm/mali/arch10.8/mali_csffw.bin"
#CONFIG_EXTRA_FIRMWARE_DIR="/workspace/megous.com/orangepi-pc/firmware"
CONFIG_ARM_SCMI_PROTOCOL=y
CONFIG_ARM_SCPI_PROTOCOL=y
@@ -376,6 +375,7 @@ CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
+CONFIG_SATA_MOBILE_LPM_POLICY=0
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_AHCI_DWC=y
# CONFIG_ATA_SFF is not set
@@ -515,6 +515,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_SERIAL_DEV_BUS=y
+CONFIG_HW_RANDOM_CN10K=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_GPIO=y
CONFIG_I2C_MV64XXX=y
@@ -555,9 +556,6 @@ CONFIG_ROCKCHIP_THERMAL=y
CONFIG_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
CONFIG_SUNXI_WATCHDOG=y
-CONFIG_SSB=y
-CONFIG_SSB_SDIOHOST=y
-CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_BCMA=y
CONFIG_MFD_SUN4I_GPADC=y
CONFIG_MFD_AXP20X_I2C=y
@@ -622,6 +620,7 @@ CONFIG_ROCKCHIP_VOP2=y
CONFIG_ROCKCHIP_ANALOGIX_DP=y
CONFIG_ROCKCHIP_CDN_DP=y
CONFIG_ROCKCHIP_DW_HDMI=y
+CONFIG_ROCKCHIP_DW_HDMI_QP=y
CONFIG_ROCKCHIP_DW_MIPI_DSI=y
CONFIG_ROCKCHIP_INNO_HDMI=y
CONFIG_ROCKCHIP_LVDS=y
@@ -642,6 +641,7 @@ CONFIG_DRM_DW_HDMI_GP_AUDIO=y
CONFIG_DRM_DW_HDMI_CEC=y
CONFIG_DRM_LIMA=y
CONFIG_DRM_PANFROST=y
+CONFIG_DRM_PANTHOR=y
CONFIG_FB=y
CONFIG_FB_SIMPLE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
@@ -655,6 +655,8 @@ CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_HRTIMER=y
+CONFIG_SND_DUMMY=y
+CONFIG_SND_ALOOP=y
# CONFIG_SND_SPI is not set
CONFIG_SND_USB_AUDIO=y
CONFIG_SND_SOC=y
@@ -757,6 +759,7 @@ CONFIG_USB_CONFIGFS_F_MIDI=y
CONFIG_USB_CONFIGFS_F_HID=y
CONFIG_USB_CONFIGFS_F_UVC=y
CONFIG_USB_CONFIGFS_F_PRINTER=y
+CONFIG_TYPEC=y
CONFIG_TYPEC_TCPM=y
CONFIG_TYPEC_TCPCI=y
CONFIG_TYPEC_HUSB311=y
@@ -870,6 +873,7 @@ CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY=y
CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY=y
CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
CONFIG_PHY_ROCKCHIP_PCIE=y
+CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX=y
CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PHY_ROCKCHIP_USB=y
@@ -928,7 +932,6 @@ CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_NFS_FS=y
-# CONFIG_NFS_V2 is not set
# CONFIG_NFS_V3 is not set
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
@@ -937,6 +940,7 @@ CONFIG_NFS_FSCACHE=y
CONFIG_NFSD=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
+# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set
CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2=y
CONFIG_CIFS=y
# CONFIG_CIFS_STATS2 is not set
diff --git a/arch/arm64/configs/pinephone_defconfig b/arch/arm64/configs/pinephone_defconfig
index 74e9abbf09a3..e53c92087405 100644
--- a/arch/arm64/configs/pinephone_defconfig
+++ b/arch/arm64/configs/pinephone_defconfig
@@ -333,7 +333,6 @@ CONFIG_SUN8I_THERMAL=y
CONFIG_MFD_SUN4I_GPADC=y
CONFIG_MFD_AXP20X_RSB=y
CONFIG_MFD_SUN6I_PRCM=y
-CONFIG_MFD_SYSCON=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_AXP20X=y
diff --git a/arch/arm64/configs/pinephone_multidist_defconfig b/arch/arm64/configs/pinephone_multidist_defconfig
index 9f65f896e251..633924e11882 100644
--- a/arch/arm64/configs/pinephone_multidist_defconfig
+++ b/arch/arm64/configs/pinephone_multidist_defconfig
@@ -330,7 +330,6 @@ CONFIG_SUNXI_WATCHDOG=y
CONFIG_MFD_SUN4I_GPADC=y
CONFIG_MFD_AXP20X_RSB=y
CONFIG_MFD_SUN6I_PRCM=y
-CONFIG_MFD_SYSCON=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_AXP20X=y
--
2.35.3

View File

@@ -0,0 +1,35 @@
From 46dae9648e7f91f6c09ab86dfa3f271b592c1323 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Mon, 20 Jul 2020 01:11:34 +0800
Subject: arm64: allwinner: dts: a64: enable K101-IM2BYL02 panel for PineTab
Newer PineTab may switch to K101-IM2BYL02.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
index 50a0e1916743..6056c965baf6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
@@ -200,12 +200,10 @@ &dsi {
status = "okay";
panel@0 {
- compatible = "feixin,k101-im2ba02";
+ compatible = "feixin,k101-im2byl02";
reg = <0>;
- avdd-supply = <&reg_dc1sw>;
- dvdd-supply = <&reg_dc1sw>;
- cvdd-supply = <&reg_ldo_io1>;
- reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
+ power-supply = <&reg_dc1sw>;
+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
backlight = <&backlight>;
};
};
--
2.35.3

View File

@@ -0,0 +1,66 @@
From 1963818db6b86da837ed31effed750f490c903b1 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 6 Dec 2020 11:15:34 -0600
Subject: arm64: dts: allwinner: Enforce consistent MMC numbering
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++++++
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 6 ++++++
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 7e48d6519364..a288311af21b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -18,6 +18,12 @@ / {
#address-cells = <1>;
#size-cells = <1>;
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ };
+
chosen {
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
index a6a2e2a19e75..080c3d10fdfa 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
@@ -6,6 +6,12 @@
#include <dt-bindings/thermal/thermal.h>
/ {
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index c4e35a255643..1596ff1edce4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -17,6 +17,12 @@ / {
#address-cells = <1>;
#size-cells = <1>;
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
--
2.35.3

View File

@@ -0,0 +1,48 @@
From 44fa99e3735bbadba27bcba0c4db903cc3719e02 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 10:39:56 +0200
Subject: arm64: dts: allwinner: a64: Add hdmi sound card
A64 supports HDMI audio. Add a sound card node for it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index e868ca5ae753..69593e05f2e9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -196,6 +196,20 @@ link0_codec: codec {
};
};
+ sound_hdmi: sound_hdmi {
+ compatible = "allwinner,sun9i-a80-hdmi-audio",
+ "allwinner,sun50i-a64-hdmi-audio";
+ status = "disabled";
+
+ codec {
+ sound-dai = <&hdmi>;
+ };
+
+ cpu {
+ sound-dai = <&i2s2>;
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
allwinner,erratum-unknown1;
@@ -1243,6 +1257,7 @@ deinterlace: deinterlace@1e00000 {
};
hdmi: hdmi@1ee0000 {
+ #sound-dai-cells = <0>;
compatible = "allwinner,sun50i-a64-dw-hdmi",
"allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
--
2.35.3

View File

@@ -0,0 +1,204 @@
From a7d0bc20f907eab7427dbf48d13dca3f0719337b Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 10:42:16 +0200
Subject: arm64: dts: allwinner: a64: Enable hdmi sound card on boards with
hdmi
Each board that has HDMI connector can also transmit audio through it.
Enable HDMI sound card on all A64 boards with HDMI connector.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 7 +++++++
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 8 ++++++++
.../boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 8 ++++++++
7 files changed, 55 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index d1f415acd7b5..0b68888c9eef 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -130,6 +130,10 @@ &i2c1_pins {
bias-pull-up;
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -341,6 +345,10 @@ &sound {
"MIC1", "Onboard Microphone";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index dec9960a7440..b6142224c329 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -102,6 +102,10 @@ &i2c1_pins {
bias-pull-up;
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -252,6 +256,10 @@ &simplefb_hdmi {
vcc-hdmi-supply = <&reg_dldo1>;
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index fd3794678c33..0cc2e11dcb92 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -120,6 +120,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -355,6 +359,9 @@ &sound {
"MIC1", "Microphone Jack Left",
"Microphone Jack Right", "MBIAS",
"MIC2", "Microphone Jack Right";
+};
+
+&sound_hdmi {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index c8303a66438d..9194ca4b1e19 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -137,6 +137,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -340,6 +344,10 @@ &sound {
"MIC1", "Onboard Microphone";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&spi0 {
status = "okay";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 09e71fd60785..51bedd34fc25 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -107,6 +107,10 @@ &i2c1_pins {
bias-pull-up;
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
ext_rmii_phy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -270,6 +274,10 @@ &sound {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
/* On Euler connector */
&spdif {
status = "disabled";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index be2347c8f267..70c7f8ff49ad 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -96,6 +96,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -169,6 +173,10 @@ &sound {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index b407e1dd08a7..d323b52a186d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -150,6 +150,10 @@ anx6345_in: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mixer0 {
status = "okay";
};
@@ -366,6 +370,10 @@ &sound {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&tcon0 {
pinctrl-names = "default";
pinctrl-0 = <&lcd_rgb666_pins>;
--
2.35.3

View File

@@ -0,0 +1,32 @@
From 30b4abdffd4279b4d41db582c63deaf2a175b31b Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Sun, 30 Jun 2019 22:45:34 +0800
Subject: arm64: dts: allwinner: a64: Fix LRADC compatible
The LRADC reference voltage of A64 is 2.0V, and AVCC is 3.0V. So the
internal voltage divider is 2/3 (the A10 value), not 3/4 (the A83T
value).
Fix the compatible string of the A64 LRADC.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 210eb28f8f70..7e48d6519364 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -921,7 +921,7 @@ spdif: spdif@1c21000 {
lradc: lradc@1c21800 {
compatible = "allwinner,sun50i-a64-lradc",
- "allwinner,sun8i-a83t-r-lradc";
+ "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c21800 0x400>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
--
2.35.3

View File

@@ -0,0 +1,99 @@
From 5b396b432ccee6b34049a6f96b82b5242a3ce427 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 17 Nov 2020 01:06:30 +0100
Subject: arm64: dts: allwinner: a64: pinetab: add front camera
---
.../boot/dts/allwinner/sun50i-a64-pinetab.dts | 50 ++++++++++++++++---
1 file changed, 44 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
index f5fb1ee32dad..50a0e1916743 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
@@ -55,12 +55,35 @@ i2c-csi {
#address-cells = <1>;
#size-cells = <0>;
+ /* Front camera */
+ gc2145: front-camera@3c {
+ compatible = "galaxycore,gc2145";
+ reg = <0x3c>;
+ clocks = <&ccu CLK_CSI_MCLK>;
+ clock-names = "xclk";
+
+ AVDD-supply = <&reg_dldo3>;
+ DVDD-supply = <&reg_aldo1>;
+ IOVDD-supply = <&reg_eldo3>;
+ reset-gpios = <&pio 4 16 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE16 */
+ enable-gpios = <&pio 4 17 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE17 */
+
+ port {
+ gc2145_ep: endpoint {
+ remote-endpoint = <&csi_gc2145_ep>;
+ bus-width = <8>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ data-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+ };
+
/* Rear camera */
- ov5640: camera@3c {
+ ov5640: rear-camera@4c {
compatible = "ovti,ov5640";
- reg = <0x3c>;
- pinctrl-names = "default";
- pinctrl-0 = <&csi_mclk_pin>;
+ reg = <0x4c>;
clocks = <&ccu CLK_CSI_MCLK>;
clock-names = "xclk";
@@ -72,7 +95,7 @@ ov5640: camera@3c {
port {
ov5640_ep: endpoint {
- remote-endpoint = <&csi_ep>;
+ remote-endpoint = <&csi_ov5640_ep>;
bus-width = <8>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
@@ -131,10 +154,15 @@ &cpu3 {
};
&csi {
+ pinctrl-0 = <&csi_pins>, <&csi_mclk_pin>;
status = "okay";
port {
- csi_ep: endpoint {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi_ov5640_ep: endpoint@0 {
+ reg = <0>;
remote-endpoint = <&ov5640_ep>;
bus-width = <8>;
hsync-active = <1>; /* Active high */
@@ -142,6 +170,16 @@ csi_ep: endpoint {
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
+
+ csi_gc2145_ep: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&gc2145_ep>;
+ bus-width=<8>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <1>; /* Active high */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
};
};
--
2.35.3

View File

@@ -0,0 +1,113 @@
From e643d144aaee9c59e2377ae15ea5889944e93b84 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Sun, 9 May 2021 12:40:31 +0200
Subject: arm64: dts: allwinner: h5: Enable hdmi sound card on boards with hdmi
Each board that has HDMI connector can also transmit audio through it.
Enable HDMI sound card on all H5 boards with HDMI connector.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
.../dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 8 ++++++++
.../arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 8 ++++++++
.../boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 8 ++++++++
4 files changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts
index 076a0b983101..5882b62097a9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts
@@ -69,3 +69,11 @@ hdmi_out_con: endpoint {
&i2c1 {
status = "okay";
};
+
+&i2s2 {
+ status = "okay";
+};
+
+&sound_hdmi {
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
index ce3ae19e72db..460c0e3d2f97 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -145,6 +145,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -190,6 +194,10 @@ reg_vdd_cpux: regulator@65 {
};
};
+&sound_hdmi {
+ status = "okay";
+};
+
&spi0 {
status = "okay";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
index b699bb900e13..b21bfc3f8624 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
@@ -145,6 +145,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>;
@@ -182,6 +186,10 @@ &ohci3 {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index 734481e998b8..c4b79e88163d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -77,6 +77,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s2 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
@@ -115,6 +119,10 @@ &ohci0 {
status = "okay";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
--
2.35.3

View File

@@ -0,0 +1,56 @@
From 6b9768f0b45070a0e57f0790d7d94ba4b00d732b Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Tue, 10 Nov 2020 20:43:28 +0100
Subject: arm64: dts: allwinner: h6: Add hdmi sound card
H6 supports HDMI audio. Add a sound card node for it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 2301c59b41b1..13fe21b00711 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -126,6 +126,20 @@ psci {
method = "smc";
};
+ sound_hdmi: sound_hdmi {
+ compatible = "allwinner,sun9i-a80-hdmi-audio",
+ "allwinner,sun50i-h6-hdmi-audio";
+ status = "disabled";
+
+ codec {
+ sound-dai = <&hdmi>;
+ };
+
+ cpu {
+ sound-dai = <&i2s1>;
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
arm,no-tick-in-suspend;
@@ -139,6 +153,7 @@ timer {
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -817,6 +832,7 @@ ohci3: usb@5311400 {
};
hdmi: hdmi@6000000 {
+ #sound-dai-cells = <0>;
compatible = "allwinner,sun50i-h6-dw-hdmi";
reg = <0x06000000 0x10000>;
reg-io-width = <1>;
--
2.35.3

View File

@@ -0,0 +1,123 @@
From a4e3a9ebb1447408212f2519a788d60547ecf8ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 11 Jan 2022 13:08:47 +0100
Subject: arm64: dts: allwinner: h6: Enable hdmi sound card on boards with hdmi
Each board that has HDMI connector can also transmit audio through it.
Enable HDMI sound card on all H6 boards with HDMI connector.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 8 ++++++++
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 8 ++++++++
4 files changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 3be1e8c2fdb9..10d0bd39c94f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -119,6 +119,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s1 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -290,6 +294,10 @@ sw {
};
};
+&sound_hdmi {
+ status = "okay";
+};
+
&spdif {
pinctrl-names = "default";
pinctrl-0 = <&spdif_tx_pin>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index f32f95c8ed5e..a8eaa98fef1b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -167,6 +167,10 @@ ext_rgmii_phy: ethernet-phy@1 {
};
};
+&i2s1 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_cldo1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
@@ -339,6 +343,10 @@ &rtc {
clocks = <&ext_osc32k>;
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 13b07141c334..e5b7c7f2f7f7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -91,6 +91,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s1 {
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <&reg_cldo1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
@@ -244,6 +248,10 @@ &rtc {
clocks = <&ext_osc32k>;
};
+&sound_hdmi {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index c8b275552872..3ae1bc5fee33 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -123,6 +123,10 @@ hdmi_out_con: endpoint {
};
};
+&i2s1 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -298,6 +302,10 @@ &rtc {
clocks = <&ext_osc32k>;
};
+&sound_hdmi {
+ status = "okay";
+};
+
/*
* The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI
* flash and eMMC at the same time, as one of them would fail probing.
--
2.35.3

View File

@@ -0,0 +1,105 @@
From d5e75dd61a760db819598a901c12e7adcb1debe5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 20 Aug 2019 14:54:48 +0200
Subject: arm64: dts: allwinner: orange-pi-3: Enable ethernet
Orange Pi 3 has two regulators that power the Realtek RTL8211E
PHY. According to the datasheet, both regulators need to be enabled
at the same time, or that "phy-io" should be enabled slightly earlier
than "phy" regulator.
RTL8211E/RTL8211EG datasheet says:
Note 4: 2.5V (or 1.8/1.5V) RGMII power should be risen simultaneously
or slightly earlier than 3.3V power. Rising 2.5V (or 1.8/1.5V) power
later than 3.3V power may lead to errors.
The driver ensures the regulator enable ordering. The timing is set
in DT via startup-delay-us.
We also need to wait at least 30ms after power-up/reset, before
accessing the PHY registers.
All values of RX/TX delay were tested exhaustively and a middle one
of the range of working values was chosen.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-h6-orangepi-3.dts | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index 6c3bfe3d09d9..f32f95c8ed5e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -15,6 +15,7 @@ / {
aliases {
serial0 = &uart0;
serial1 = &uart1;
+ ethernet0 = &emac;
};
chosen {
@@ -64,6 +65,15 @@ reg_vcc5v: vcc5v {
regulator-always-on;
};
+ reg_gmac_2v5: gmac-2v5 {
+ compatible = "regulator-fixed";
+ regulator-name = "gmac-2v5";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ enable-active-high;
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+ };
+
reg_vcc33_wifi: vcc33-wifi {
/* Always on 3.3V regulator for WiFi and BT */
compatible = "regulator-fixed";
@@ -128,6 +138,35 @@ hdmi_out_con: endpoint {
};
};
+&emac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ext_rgmii_pins>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&ext_rgmii_phy>;
+ /*
+ * The board uses 2.5V RGMII signalling. Power sequence to enable
+ * the phy is to enable GMAC-2V5 and GMAC-3V (aldo2) power rails
+ * at the same time and to wait 100ms. The driver enables phy-io
+ * first. Delay is achieved with enable-ramp-delay on reg_aldo2.
+ */
+ phy-supply = <&reg_aldo2>;
+ phy-io-supply = <&reg_gmac_2v5>;
+ allwinner,rx-delay-ps = <200>;
+ allwinner,tx-delay-ps = <200>;
+ status = "okay";
+};
+
+&mdio {
+ ext_rgmii_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+
+ reset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
+ reset-assert-us = <15000>;
+ reset-deassert-us = <40000>;
+ };
+};
+
&mmc0 {
vmmc-supply = <&reg_cldo1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
@@ -211,6 +250,7 @@ reg_aldo2: aldo2 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc33-audio-tv-ephy-mac";
+ regulator-enable-ramp-delay = <100000>;
};
/* ALDO3 is shorted to CLDO1 */
--
2.35.3

View File

@@ -0,0 +1,47 @@
From 1d5cdff31847a8985052a0c0f5c5a343e186c009 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 24 Sep 2022 21:59:07 +0200
Subject: arm64: dts: rockchip: rk356x: Fix PCIe register map and ranges
I have two Realtek PCIe wifi cards connected over the 4 port PCIe bridge
to Quartz64-A. The cards fail to work, when nvme SSD is connected at the
same time to the bridge. Without nvme connected, cards work fine. The
issue seems to be related to mixed use of devices which make use of I/O
ranges and memory ranges.
This patch changes I/O, MEM and config mappings so that config and I/O
mappings use the 0xf4000000 outbound address space, and MEM range uses
the whole 0x300000000 outbound space.
These values were suggested by pgwipeout:
https://lore.kernel.org/lkml/875ygbsrf3.fsf@bloch.sibelius.xs4all.nl/T/#m84b5f6992cc26dffe0d3783c0d8c9c86e5e10c10
This is identical to how BSP does the mappings.
This change to the regs/ranges makes the issue go away and both nvme and
wifi cards work when connected at the same time to the bridge. I tested
the nvme with large amount of reads/writes, both behind the PCIe bridge
and when directly connected to Quartz64-A board.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index c72b3a608edd..c1f2b6f780de 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -1036,7 +1036,7 @@ pcie2x1: pcie@fe260000 {
<0 0 0 4 &pcie_intc 3>;
linux,pci-domain = <0>;
num-ib-windows = <6>;
- num-ob-windows = <2>;
+ num-ob-windows = <8>;
max-link-speed = <2>;
msi-map = <0x0 &gic 0x0 0x1000>;
num-lanes = <1>;
--
2.35.3

View File

@@ -0,0 +1,30 @@
From 8402b018c11891698e5be34d9aee5a989d645dbd Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 14 May 2024 10:47:05 +0200
Subject: arm64: dts: sun50-a64-pinephone: Define jack pins in DT
To restore pre v6.8 behavior of the sound card.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 9cdef78a4abd..f82116abfecd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -978,6 +978,10 @@ &sound {
"MIC1", "Internal Microphone",
"Headset Microphone", "HBIAS",
"MIC2", "Headset Microphone";
+ simple-audio-card,jack-pins =
+ "1c22e00.codec", "Headphone Jack",
+ "1c22e00.codec", "Headset Microphone";
+ simple-audio-card,jack-pins-mask = <1>, <2>;
simple-audio-card,dai-link@1 {
format = "dsp_a";
--
2.35.3

View File

@@ -0,0 +1,51 @@
From c5cc34ea47087beb72f2c30628f05fbd42c14090 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 16 Oct 2022 23:20:59 +0200
Subject: arm64: dts: sun50i-a64: Add missing trip points for GPU
Linux 6.1 requires them.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 126a5a401b2f..210eb28f8f70 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -277,6 +277,15 @@ gpu0_thermal: gpu0-thermal {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&ths 1>;
+
+ trips {
+ gpu0_crit: gpu-crit {
+ /* milliCelsius */
+ temperature = <110000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
};
gpu1_thermal: gpu1-thermal {
@@ -284,6 +293,15 @@ gpu1_thermal: gpu1-thermal {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&ths 2>;
+
+ trips {
+ gpu1_crit: gpu-crit {
+ /* milliCelsius */
+ temperature = <110000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
};
};
--
2.35.3

View File

@@ -0,0 +1,59 @@
From 2c6b1149c76bffd51ce34b90e7351ff7a50c9f66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 1 Feb 2020 23:41:18 +0100
Subject: arm64: dts: sun50i-a64: Set fifo-size for uarts
Boot time optimization.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 69593e05f2e9..126a5a401b2f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -994,6 +994,7 @@ uart0: serial@1c28000 {
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
status = "disabled";
@@ -1005,6 +1006,7 @@ uart1: serial@1c28400 {
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART1>;
resets = <&ccu RST_BUS_UART1>;
status = "disabled";
@@ -1016,6 +1018,7 @@ uart2: serial@1c28800 {
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART2>;
resets = <&ccu RST_BUS_UART2>;
status = "disabled";
@@ -1027,6 +1030,7 @@ uart3: serial@1c28c00 {
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART3>;
resets = <&ccu RST_BUS_UART3>;
status = "disabled";
@@ -1038,6 +1042,7 @@ uart4: serial@1c29000 {
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
+ fifo-size = <64>;
clocks = <&ccu CLK_BUS_UART4>;
resets = <&ccu RST_BUS_UART4>;
status = "disabled";
--
2.35.3

View File

@@ -0,0 +1,40 @@
From e81bd878b8762e16703e6164074054d9d5e58984 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Thu, 18 Mar 2021 20:22:05 +0800
Subject: arm64: dts: sun50i-a64-pinephone: Add AF8133J to PinePhone
New batches of PinePhones switched the magnetometer to AF8133J from
LIS3MDL because lack of ST components.
Add this magnetometer to the device tree. These two sensors do not
conflict with each other, and the non-existent sensor's driver won't
just get probed properly.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 0a8352147280..694d715ff875 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -499,6 +499,15 @@ &i2c1 {
status = "okay";
clock-frequency = <400000>;
+ /* Alternative magnetometer */
+ af8133j: magnetometer@1c {
+ compatible = "voltafield,af8133j";
+ reg = <0x1c>;
+ reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
+ avdd-supply = <&reg_dldo1>;
+ dvdd-supply = <&reg_dldo1>;
+ };
+
/* Magnetometer */
lis3mdl: magnetometer@1e {
compatible = "st,lis3mdl-magn";
--
2.35.3

View File

@@ -0,0 +1,416 @@
From 2e4d0327518840be82765b4c951fb7731ed460a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 8 Jul 2020 00:58:16 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add Type-C support for all PP
variants 1.0-1.2
There are differences in GPIO and how VBUS is handled. Describe them
in DTS. Thankfully we can support both unmodded and modded variants
of 1.0 and 1.1 boards with one DTS. No need for more subvariants.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../allwinner/sun50i-a64-pinephone-1.0.dts | 86 +++++++++++++++++++
.../allwinner/sun50i-a64-pinephone-1.1.dts | 86 +++++++++++++++++++
.../allwinner/sun50i-a64-pinephone-1.2.dts | 60 +++++++++++++
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 68 ++++++++++++++-
4 files changed, 299 insertions(+), 1 deletion(-)
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
index 219f720b8b7d..498ae493d176 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -8,6 +8,92 @@
/ {
model = "Pine64 PinePhone Developer Batch (1.0)";
compatible = "pine64,pinephone-1.0", "pine64,pinephone", "allwinner,sun50i-a64";
+
+ reg_vbus: usb0-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+ enable-active-high;
+ vin-supply = <&reg_drivevbus>;
+ };
+};
+
+&axp803 {
+ x-powers,drive-vbus-en;
+};
+
+&i2c0 {
+ hdmi-bridge@28 {
+ compatible = "analogix,anx7688";
+ reg = <0x28>;
+
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 11 IRQ_TYPE_EDGE_FALLING>; /* PL11 */
+
+ enable-gpios = <&pio 3 10 GPIO_ACTIVE_LOW>; /* PD10 */
+ reset-gpios = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
+
+ cabledet-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+
+ avdd10-supply = <&reg_anx1v0>;
+ dvdd10-supply = <&reg_anx1v0>;
+ /* This is for the HW hack variant, but will also work for non-modified version. */
+ avdd18-supply = <&reg_ldo_io1>;
+ dvdd18-supply = <&reg_ldo_io1>;
+ avdd33-supply = <&reg_dldo1>;
+ vconn-supply = <&reg_vconn5v0>;
+ hdmi_vt-supply = <&reg_dldo1>;
+
+ source-caps = <
+ PDO_FIXED(5000, 500, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
+ >;
+
+ sink-caps = <
+ PDO_FIXED(5000, 3000, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
+ >;
+
+ /*
+ * ANX7688 can't enable/disable USB-5V <-> DCIN switch by
+ * itself, and PMIC's N_VBUSEN is not connected anywhere either,
+ * so we need to configure everything in software:
+ *
+ * - get the VBUS status from ANX7688 via I2C
+ * - configure PMIC to let it know vbus drive status (via
+ * reg_drivevbus)
+ * - enable VBUS switch and USB-5V regulator (via reg_vbus
+ * and reg_usb_5v)
+ */
+ vbus-supply = <&reg_vbus>;
+ vbus_in-supply = <&usb_power_supply>;
+
+ port {
+ typec0_dr_sw: endpoint {
+ remote-endpoint = <&usb0_drd_sw>;
+ };
+ };
+ };
+};
+
+/*
+ * The N_VBUSEN pin is disconnected, but we need to inform the PMIC about
+ * the VBUS status anyway. To avoid the pin from floating and to inform
+ * the PMIC, about VBUS status, we couple reg_drivevbus with reg_vbus.
+ */
+&reg_drivevbus {
+ vin-supply = <&reg_usb_5v>;
+ status = "okay";
+};
+
+&usbphy {
+ usb-role-switch;
+
+ port {
+ usb0_drd_sw: endpoint {
+ remote-endpoint = <&typec0_dr_sw>;
+ };
+ };
};
&codec_analog {
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
index 723af64a9cee..73275308f484 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -8,6 +8,20 @@
/ {
model = "Pine64 PinePhone Braveheart (1.1)";
compatible = "pine64,pinephone-1.1", "pine64,pinephone", "allwinner,sun50i-a64";
+
+ reg_vbus: usb0-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+ enable-active-high;
+ vin-supply = <&reg_drivevbus>;
+ };
+};
+
+&axp803 {
+ x-powers,drive-vbus-en;
};
&backlight {
@@ -33,7 +47,79 @@ &codec_analog {
allwinner,internal-bias-resistor;
};
+&i2c0 {
+ hdmi-bridge@28 {
+ compatible = "analogix,anx7688";
+ reg = <0x28>;
+
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 11 IRQ_TYPE_EDGE_FALLING>; /* PL11 */
+
+ enable-gpios = <&pio 3 10 GPIO_ACTIVE_LOW>; /* PD10 */
+ reset-gpios = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
+
+ cabledet-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+
+ avdd10-supply = <&reg_anx1v0>;
+ dvdd10-supply = <&reg_anx1v0>;
+ /* This is for the HW hack variant, but will also work for non-modified version. */
+ avdd18-supply = <&reg_ldo_io1>;
+ dvdd18-supply = <&reg_ldo_io1>;
+ avdd33-supply = <&reg_dldo1>;
+ vconn-supply = <&reg_vconn5v0>;
+ hdmi_vt-supply = <&reg_dldo1>;
+
+ source-caps = <
+ PDO_FIXED(5000, 500, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
+ >;
+
+ sink-caps = <
+ PDO_FIXED(5000, 3000, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
+ >;
+
+ /*
+ * ANX7688 can't enable/disable USB-5V <-> DCIN switch by
+ * itself, and PMIC's N_VBUSEN is not connected anywhere either,
+ * so we need to configure everything in software:
+ *
+ * - get the VBUS status from ANX7688 via I2C
+ * - configure PMIC to let it know vbus drive status (via
+ * reg_drivevbus)
+ * - enable VBUS switch and USB-5V regulator (via reg_vbus
+ * and reg_usb_5v)
+ */
+ vbus-supply = <&reg_vbus>;
+ vbus_in-supply = <&usb_power_supply>;
+
+ port {
+ typec0_dr_sw: endpoint {
+ remote-endpoint = <&usb0_drd_sw>;
+ };
+ };
+ };
+};
+
+/*
+ * The N_VBUSEN pin is disconnected, but we need to inform the PMIC about
+ * the VBUS status anyway. To avoid the pin from floating and to inform
+ * the PMIC, about VBUS status, we couple reg_drivevbus with reg_vbus.
+ */
+&reg_drivevbus {
+ vin-supply = <&reg_usb_5v>;
+ status = "okay";
+};
+
&sgm3140 {
enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
+
+&usbphy {
+ usb-role-switch;
+
+ port {
+ usb0_drd_sw: endpoint {
+ remote-endpoint = <&typec0_dr_sw>;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index 4e7e237cb46a..40127186606f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -48,7 +48,67 @@ &mmc1 {
mmc-pwrseq = <&wifi_pwrseq>;
};
+&i2c0 {
+ hdmi-bridge@28 {
+ compatible = "analogix,anx7688";
+ reg = <0x28>;
+
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 11 IRQ_TYPE_EDGE_FALLING>; /* PL11 */
+
+ enable-gpios = <&pio 3 10 GPIO_ACTIVE_LOW>; /* PD10 */
+ reset-gpios = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+
+ cabledet-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+
+ avdd10-supply = <&reg_anx1v0>;
+ dvdd10-supply = <&reg_anx1v0>;
+ avdd18-supply = <&reg_ldo_io1>;
+ dvdd18-supply = <&reg_ldo_io1>;
+ avdd33-supply = <&reg_dcdc1>;
+ vconn-supply = <&reg_vconn5v0>;
+ hdmi_vt-supply = <&reg_dldo1>;
+
+ source-caps = <
+ PDO_FIXED(5000, 500, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
+ >;
+
+ sink-caps = <
+ PDO_FIXED(5000, 3000, PDO_FIXED_DATA_SWAP | PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
+ >;
+
+ /*
+ * ANX7688 will enable/disable USB-5V <-> DCIN switch by itself
+ * via VBUS_CTRL pin. The driver just has to enable the USB-5V
+ * so that the switch has power.
+ */
+ vbus-supply = <&reg_usb_5v>;
+ vbus_in-supply = <&usb_power_supply>;
+
+ port {
+ typec0_dr_sw: endpoint {
+ remote-endpoint = <&usb0_drd_sw>;
+ };
+ };
+ };
+};
+
+&reg_anx1v0 {
+ gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
+ enable-active-high;
+};
+
&sgm3140 {
enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
+
+&usbphy {
+ usb-role-switch;
+
+ port {
+ usb0_drd_sw: endpoint {
+ remote-endpoint = <&typec0_dr_sw>;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 44b18d5a9d93..d126c9e9a605 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/usb/pd.h>
/ {
chassis-type = "handset";
@@ -70,6 +71,24 @@ led2: led-2 {
};
};
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ reg_anx1v0: anx1v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "anx1v0";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ };
+
multi-led {
compatible = "leds-group-multicolor";
color = <LED_COLOR_ID_RGB>;
@@ -85,6 +104,24 @@ reg_ps: ps-regulator {
regulator-boot-on;
};
+ reg_usb_5v: usb-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "usb-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 3 8 GPIO_ACTIVE_HIGH>; /* PD8 */
+ enable-active-high;
+ };
+
+ reg_vbat_bb: vbat-bb {
+ compatible = "regulator-fixed";
+ regulator-name = "vbat-bb";
+ regulator-min-microvolt = <3500000>;
+ regulator-max-microvolt = <3500000>;
+ gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
+ enable-active-high;
+ };
+
reg_vbat_wifi: vbat-wifi {
compatible = "regulator-fixed";
regulator-min-microvolt = <3300000>;
@@ -92,6 +129,16 @@ reg_vbat_wifi: vbat-wifi {
regulator-name = "vbat-wifi";
};
+ /* This is a charge pump for CC1 and CC2 pins on USB-C connector. */
+ reg_vconn5v0: vconn5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vconn5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 3 9 GPIO_ACTIVE_HIGH>; /* PD9 */
+ enable-active-high;
+ };
+
sgm3140: led-controller {
compatible = "sgmicro,sgm3140";
vin-supply = <&reg_dcdc1>;
@@ -207,6 +254,21 @@ &ehci1 {
status = "okay";
};
+&hdmi {
+ hvcc-supply = <&reg_dldo1>;
+ status = "okay";
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&sound_hdmi {
+ status = "okay";
+};
+
&i2c_csi {
gc2145: front-camera@3c {
compatible = "galaxycore,gc2145";
@@ -309,6 +371,10 @@ &i2c2 {
status = "okay";
};
+&i2s2 {
+ status = "okay";
+};
+
&lradc {
vref-supply = <&reg_aldo3>;
wakeup-source;
@@ -602,7 +668,7 @@ &uart3 {
};
&usb_otg {
- dr_mode = "peripheral";
+ dr_mode = "otg";
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,187 @@
From 8e83155e6ee9dfe4af67cc9bc0bba969c7c8d4c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 28 Sep 2020 04:35:13 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add detailed OCV to capactiy
conversion table
This ensures that discharging stops at 3V, and that charging current
limits are enforced. It also allows for more precise capacity reporting
(on my device at the very least, at room temperature).
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 151 ++++++++++++++++++
1 file changed, 151 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index d126c9e9a605..5437fc514e7b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -28,6 +28,156 @@ backlight: backlight {
/* Backlight configuration differs per PinePhone revision. */
};
+ bat: battery {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3000000>;
+ voltage-max-design-microvolt = <4350000>;
+ energy-full-design-microwatt-hours = <12000000>;
+ charge-full-design-microamp-hours = <2750000>;
+ precharge-current-microamp = <130000>;
+ charge-term-current-microamp = <50000>;
+ constant-charge-current-max-microamp = <1300000>;
+ constant-charge-voltage-max-microvolt = <4350000>;
+ factory-internal-resistance-micro-ohms = <150000>;
+ resistance-temp-table = <20 150>;
+ ocv-capacity-celsius = <20>;
+ ocv-capacity-table-0 =
+ <4334000 100>,
+ <4319700 99>,
+ <4304300 98>,
+ <4292200 97>,
+ <4280100 96>,
+ <4269100 95>,
+ <4253700 94>,
+ <4242700 93>,
+ <4232800 92>,
+ <4222900 91>,
+ <4211900 90>,
+ <4203100 89>,
+ <4192100 88>,
+ <4177800 87>,
+ <4167900 86>,
+ <4155800 85>,
+ <4147000 84>,
+ <4136000 83>,
+ <4126100 82>,
+ <4111800 81>,
+ <4102999 80>,
+ <4093100 79>,
+ <4084300 78>,
+ <4075500 77>,
+ <4064500 76>,
+ <4054600 75>,
+ <4042500 74>,
+ <4035900 73>,
+ <4029300 72>,
+ <4018300 71>,
+ <4006200 70>,
+ <3993000 69>,
+ <3974300 68>,
+ <3964400 67>,
+ <3956700 66>,
+ <3949000 65>,
+ <3943500 64>,
+ <3938000 63>,
+ <3931400 62>,
+ <3923700 61>,
+ <3917100 60>,
+ <3903900 59>,
+ <3895100 58>,
+ <3887400 57>,
+ <3878600 56>,
+ <3870900 55>,
+ <3863200 54>,
+ <3855500 53>,
+ <3848900 52>,
+ <3837900 51>,
+ <3830200 50>,
+ <3825800 49>,
+ <3821400 48>,
+ <3815900 47>,
+ <3810400 46>,
+ <3806000 45>,
+ <3801600 44>,
+ <3797200 43>,
+ <3792800 42>,
+ <3789500 41>,
+ <3786200 40>,
+ <3781800 39>,
+ <3778500 38>,
+ <3775200 37>,
+ <3770800 36>,
+ <3764200 35>,
+ <3760900 34>,
+ <3758700 33>,
+ <3755400 32>,
+ <3754300 31>,
+ <3752100 30>,
+ <3748800 29>,
+ <3749900 28>,
+ <3745500 27>,
+ <3742200 26>,
+ <3741100 25>,
+ <3737800 24>,
+ <3734500 23>,
+ <3731200 22>,
+ <3730100 21>,
+ <3724600 20>,
+ <3722400 19>,
+ <3718000 18>,
+ <3713600 17>,
+ <3708100 16>,
+ <3701500 15>,
+ <3689400 14>,
+ <3682800 13>,
+ <3674000 12>,
+ <3666300 11>,
+ <3659700 10>,
+ <3653100 9>,
+ <3647600 8>,
+ <3641000 7>,
+ <3625600 6>,
+ <3613500 5>,
+ <3591500 4>,
+ <3554100 3>,
+ <3489200 2>,
+ <3393500 1>,
+ <3256000 0>;
+ x-powers,ocv-capacity-table =
+ <0xc0 0>,
+ <0xc1 1>,
+ <0xc2 1>,
+ <0xc3 2>,
+ <0xc4 2>,
+ <0xc5 4>,
+ <0xc6 4>,
+ <0xc7 5>,
+ <0xc8 6>,
+ <0xc9 8>,
+ <0xca 11>,
+ <0xcb 15>,
+ <0xcc 22>,
+ <0xcd 36>,
+ <0xce 44>,
+ <0xcf 48>,
+ <0xd0 51>,
+ <0xd1 53>,
+ <0xd2 56>,
+ <0xd3 60>,
+ <0xd4 64>,
+ <0xd5 69>,
+ <0xd6 71>,
+ <0xd7 75>,
+ <0xd8 78>,
+ <0xd9 82>,
+ <0xda 84>,
+ <0xdb 85>,
+ <0xdc 88>,
+ <0xdd 92>,
+ <0xde 95>,
+ <0xdf 98>;
+ };
+
bt_sco_codec: bt-sco-codec {
#sound-dai-cells = <1>;
compatible = "linux,bt-sco";
@@ -478,6 +628,7 @@ axp803: pmic@3a3 {
&battery_power_supply {
status = "okay";
+ monitored-battery = <&bat>;
};
&reg_aldo1 {
--
2.35.3

View File

@@ -0,0 +1,130 @@
From 8628fc415c13d5785e6fc78a8ec6310e9779bc35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 8 Apr 2020 14:13:08 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add front/back cameras
Pinephone has OV5640 back camera and GC2145 front camera. Add support
for both.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 89 +++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 6eab61a12cd8..44b18d5a9d93 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -36,6 +36,15 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ i2c_csi: i2c-csi {
+ compatible = "i2c-gpio";
+ sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE13 */
+ scl-gpios = <&pio 4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE12 */
+ i2c-gpio,delay-us = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
leds {
compatible = "gpio-leds";
@@ -134,6 +143,36 @@ &cpu3 {
cpu-supply = <&reg_dcdc2>;
};
+&csi {
+ pinctrl-0 = <&csi_pins>, <&csi_mclk_pin>;
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi_ov5640_ep: endpoint@0 {
+ reg = <0>;
+ 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 */
+ };
+
+ csi_gc2145_ep: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&gc2145_ep>;
+ bus-width = <8>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ data-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+};
+
&dai {
status = "okay";
};
@@ -168,6 +207,56 @@ &ehci1 {
status = "okay";
};
+&i2c_csi {
+ gc2145: front-camera@3c {
+ compatible = "galaxycore,gc2145";
+ reg = <0x3c>;
+ clocks = <&ccu CLK_CSI_MCLK>;
+ clock-names = "xclk";
+
+ AVDD-supply = <&reg_dldo3>;
+ DVDD-supply = <&reg_aldo1>;
+ IOVDD-supply = <&reg_eldo3>;
+ reset-gpios = <&pio 4 16 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE16 */
+ enable-gpios = <&pio 4 17 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE17 */
+
+ port {
+ gc2145_ep: endpoint {
+ remote-endpoint = <&csi_gc2145_ep>;
+ bus-width = <8>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ data-active = <1>;
+ pclk-sample = <1>;
+ };
+ };
+ };
+
+ ov5640: rear-camera@4c {
+ compatible = "ovti,ov5640";
+ reg = <0x4c>;
+ clocks = <&ccu CLK_CSI_MCLK>;
+ clock-names = "xclk";
+
+ AVDD-supply = <&reg_dldo3>;
+ DOVDD-supply = <&reg_aldo1>; /* shared with AFVCC */
+ DVDD-supply = <&reg_eldo3>;
+ reset-gpios = <&pio 3 3 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PD3 */
+ powerdown-gpios = <&pio 2 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PC0 */
+
+ port {
+ ov5640_ep: endpoint {
+ remote-endpoint = <&csi_ov5640_ep>;
+ bus-width = <8>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+ };
+};
+
&i2c0 {
status = "okay";
--
2.35.3

View File

@@ -0,0 +1,26 @@
From c2c81f6273b94eb3e159452d8d6e34e86a2e7ee1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 17 Jan 2021 23:06:03 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Add interrupt pin for WiFi
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 10efafb282cd..1b2de298990f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -581,6 +581,8 @@ &mmc1 {
rtl8723cs: wifi@1 {
reg = <1>;
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 3 IRQ_TYPE_EDGE_FALLING>; /* PL3 */
};
};
--
2.35.3

View File

@@ -0,0 +1,119 @@
From 26fa3d0314f172deff86c08bbc00250e0b6aec23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 8 Jul 2020 01:00:48 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add modem power manager
Pinephone has a EG25-G modem that needs a special powerup/powerdown
sequence. Add a power manager to manage the modem power.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../allwinner/sun50i-a64-pinephone-1.0.dts | 22 ++++++++++++++++++
.../allwinner/sun50i-a64-pinephone-1.1.dts | 23 +++++++++++++++++++
.../allwinner/sun50i-a64-pinephone-1.2.dts | 23 +++++++++++++++++++
3 files changed, 68 insertions(+)
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
index 498ae493d176..ff01e2be26e7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -86,6 +86,28 @@ &reg_drivevbus {
status = "okay";
};
+&uart3 {
+ modem {
+ compatible = "quectel,eg25";
+ char-device-name = "modem-power";
+
+ power-supply = <&reg_vbat_bb>; /* PL7 */
+
+ enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
+ reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
+ pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+
+ sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+ wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
+
+ cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
+ dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
+ rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
+
+ quectel,qdai = "1,1,0,1,0,0,1,1";
+ };
+};
+
&usbphy {
usb-role-switch;
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
index 73275308f484..93dc8512fe45 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -114,6 +114,29 @@ &sgm3140 {
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
+&uart3 {
+ modem {
+ compatible = "quectel,eg25";
+ char-device-name = "modem-power";
+
+ power-supply = <&reg_vbat_bb>; /* PL7 */
+
+ enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
+ reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
+ status-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+ status-pwrkey-multiplexed; /* status acts as pwrkey */
+
+ sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+ wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
+
+ dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
+ cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
+ rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
+
+ quectel,qdai = "1,1,0,1,0,0,1,1";
+ };
+};
+
&usbphy {
usb-role-switch;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index 40127186606f..5e988230e6e4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -103,6 +103,29 @@ &sgm3140 {
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
+&uart3 {
+ modem {
+ compatible = "quectel,eg25";
+ char-device-name = "modem-power";
+
+ power-supply = <&reg_vbat_bb>; /* PL7 */
+
+ enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
+ reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
+ status-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+ pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+
+ host-ready-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+ wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-RI */
+
+ dtr-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-DTR */
+ cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
+ rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
+
+ quectel,qdai = "1,1,0,1,0,0,1,1";
+ };
+};
+
&usbphy {
usb-role-switch;
--
2.35.3

View File

@@ -0,0 +1,41 @@
From 154de7ee9570eac3a3430a3853bc0036bd85d147 Mon Sep 17 00:00:00 2001
From: Shoji Keita <awaittrot@shjk.jp>
Date: Wed, 14 Jul 2021 07:17:18 +0900
Subject: arm64: dts: sun50i-a64-pinephone: Add mount-matrix for PinePhone
magnetometers.
For lis3mdl, values are based on datasheet and PCB drawing.
For af8133j, values are from testing on a real device.
Signed-off-by: Shoji Keita <awaittrot@shjk.jp>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 694d715ff875..80a08fa0a52a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -506,6 +506,9 @@ af8133j: magnetometer@1c {
reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
avdd-supply = <&reg_dldo1>;
dvdd-supply = <&reg_dldo1>;
+ mount-matrix = "0", "-1", "0",
+ "-1", "0", "0",
+ "0", "0", "-1";
};
/* Magnetometer */
@@ -514,6 +517,9 @@ lis3mdl: magnetometer@1e {
reg = <0x1e>;
vdd-supply = <&reg_dldo1>;
vddio-supply = <&reg_dldo1>;
+ mount-matrix = "0", "1", "0",
+ "-1", "0", "0",
+ "0", "0", "1";
};
/* Light/proximity sensor */
--
2.35.3

View File

@@ -0,0 +1,29 @@
From 4e52c1f7d21654b5778ac232d10e9c749a5fa09b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 8 Sep 2020 15:31:26 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add mount matrix for accelerometer
Port from pine64 kernel.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index e1e64065ef7a..807e77643bc9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -513,6 +513,9 @@ accelerometer@68 {
interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
vdd-supply = <&reg_dldo1>;
vddio-supply = <&reg_dldo1>;
+ mount-matrix = "0", "1", "0",
+ "-1", "0", "0",
+ "0", "0", "-1";
};
};
--
2.35.3

View File

@@ -0,0 +1,27 @@
From df2cd26e9b5191a22f048dfc40535a11d52e0370 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 20 May 2023 16:58:11 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add power supply to stk3311
This makes the driver disable the supply during sleep.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 657373db86bb..136de65e48b9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -641,6 +641,7 @@ light-sensor@48 {
reg = <0x48>;
interrupt-parent = <&pio>;
interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
+ vdd-supply = <&reg_ldo_io0>;
};
/* Accelerometer/gyroscope */
--
2.35.3

View File

@@ -0,0 +1,80 @@
From d08b50f15feb2af64b8bc3e02437d231d03b8cb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 15 Feb 2021 17:45:13 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Add reboot mode driver
With the latest p-boot (released 2021-02-15), you can reboot to
a particular boot option or to the menu, to FEL, to eMMC bootloader,
regardless of the user defined p-boot defaults.
Call reboot with cmd of LINUX_REBOOT_CMD_RESTART2 and arg:
- fel Reboot to FEL
- emmc-egon Reboot with chainload of bootloader from eMMC
- sd1-8 Reboot to SD bootfs option
- emmc1-8 Reboot to eMMC bootfs option
- menu Reboot to p-boot menu
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 136de65e48b9..f0aab1fd6080 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -423,6 +423,34 @@ sgm3140_flash: led {
};
};
+ /* PinePhone specific reboot modes for p-boot. */
+ reboot-mode {
+ compatible = "nvmem-reboot-mode";
+ nvmem-cells = <&reboot_mode>;
+ nvmem-cell-names = "reboot-mode";
+
+ mode-normal = <0x0>;
+ mode-fel = <0xb0010fe1>;
+ mode-emmc-egon = <0xb001e33c>;
+ mode-sd1 = <0xb0010020>;
+ mode-sd2 = <0xb0010021>;
+ mode-sd3 = <0xb0010022>;
+ mode-sd4 = <0xb0010023>;
+ mode-sd5 = <0xb0010024>;
+ mode-sd6 = <0xb0010025>;
+ mode-sd7 = <0xb0010026>;
+ mode-sd8 = <0xb0010027>;
+ mode-emmc1 = <0xb0010000>;
+ mode-emmc2 = <0xb0010001>;
+ mode-emmc3 = <0xb0010002>;
+ mode-emmc4 = <0xb0010003>;
+ mode-emmc5 = <0xb0010004>;
+ mode-emmc6 = <0xb0010005>;
+ mode-emmc7 = <0xb0010006>;
+ mode-emmc8 = <0xb0010007>;
+ mode-menu = <0xb00100ff>;
+ };
+
speaker_amp: audio-amplifier {
compatible = "simple-audio-amplifier";
enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
@@ -916,6 +944,15 @@ &reg_rtc_ldo {
regulator-name = "vcc-rtc";
};
+&rtc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ reboot_mode: reboot-mode@4 {
+ reg = <0x4 0x4>;
+ };
+};
+
&sound {
status = "okay";
simple-audio-card,name = "PinePhone";
--
2.35.3

View File

@@ -0,0 +1,54 @@
From d99776d9b2b334bb3d4b34bbb54f3fdd57032b25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 18 Oct 2021 17:41:25 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Add supply for i2c bus to anx7688
The bus power needs to be enabled for anx7688 to be able to communicate
with the master.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 1 +
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 1 +
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 1 +
3 files changed, 3 insertions(+)
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
index 8f6ea6b06aa9..cfb9518e057f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -43,6 +43,7 @@ hdmi-bridge@28 {
avdd18-supply = <&reg_ldo_io1>;
dvdd18-supply = <&reg_ldo_io1>;
avdd33-supply = <&reg_dldo1>;
+ i2c-supply = <&reg_ldo_io0>;
vconn-supply = <&reg_vconn5v0>;
hdmi_vt-supply = <&reg_dldo1>;
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
index 63ceae07a0e0..35cb92e3b5f1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -52,6 +52,7 @@ hdmi-bridge@28 {
avdd18-supply = <&reg_ldo_io1>;
dvdd18-supply = <&reg_ldo_io1>;
avdd33-supply = <&reg_dldo1>;
+ i2c-supply = <&reg_ldo_io0>;
vconn-supply = <&reg_vconn5v0>;
hdmi_vt-supply = <&reg_dldo1>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index d28a23e98232..aeb5c69fe51d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -51,6 +51,7 @@ hdmi-bridge@28 {
avdd18-supply = <&reg_ldo_io1>;
dvdd18-supply = <&reg_ldo_io1>;
avdd33-supply = <&reg_dcdc1>;
+ i2c-supply = <&reg_ldo_io0>;
vconn-supply = <&reg_vconn5v0>;
hdmi_vt-supply = <&reg_dldo1>;
--
2.35.3

View File

@@ -0,0 +1,33 @@
From bf0c0a824a3c6569e38d9071d4d58c587cee34e0 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 6 Feb 2020 23:49:27 -0600
Subject: arm64: dts: sun50i-a64-pinephone: Add support for Bluetooth audio
The PinePhone has a Bluetooth chip with its PCM interface connected to
AIF3. Add the DAI link so headeset audio can be routed in hardware.
Even though the link is mono, configuring the link for 2 slots is
required for compatibility with AIF2, which uses a single 32-bit slot,
and which shares its clock dividers with AIF3. Using equal clock
frequencies allows the modem and headset to be used at the same time.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 807e77643bc9..85fe10220017 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -181,6 +181,7 @@ bat: battery {
bt_sco_codec: bt-sco-codec {
#sound-dai-cells = <1>;
compatible = "linux,bt-sco";
+ sound-name-prefix = "Bluetooth";
};
chosen {
--
2.35.3

View File

@@ -0,0 +1,88 @@
From fdc5e44dd56324f3327a69a490f9f6643552ee3f Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Thu, 10 Nov 2022 20:11:10 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Add support for Pinephone 1.2 beta
Beta versions uses a different magnetometer chip.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../allwinner/sun50i-a64-pinephone-1.2b.dts | 29 +++++++++++++++++++
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 12 --------
3 files changed, 30 insertions(+), 12 deletions(-)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2b.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 0db7b60b49a1..0a0ec8a39259 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -12,6 +12,7 @@ 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-pinephone-1.2b.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab-early-adopter.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2b.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2b.dts
new file mode 100644
index 000000000000..bb6e075972d1
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2b.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
+
+/dts-v1/;
+
+#include "sun50i-a64-pinephone-1.2.dts"
+
+/ {
+ model = "Pine64 PinePhone (1.2b)";
+ compatible = "pine64,pinephone-1.2b", "pine64,pinephone", "allwinner,sun50i-a64";
+};
+
+&lis3mdl {
+ status = "disabled";
+};
+
+&i2c1 {
+ /* Alternative magnetometer */
+ af8133j: magnetometer@1c {
+ compatible = "voltafield,af8133j";
+ reg = <0x1c>;
+ reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
+ avdd-supply = <&reg_dldo1>;
+ dvdd-supply = <&reg_dldo1>;
+ mount-matrix = "0", "-1", "0",
+ "-1", "0", "0",
+ "0", "0", "-1";
+ };
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 9585d2ad91f4..657373db86bb 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -624,18 +624,6 @@ &i2c1 {
status = "okay";
clock-frequency = <400000>;
- /* Alternative magnetometer */
- af8133j: magnetometer@1c {
- compatible = "voltafield,af8133j";
- reg = <0x1c>;
- reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
- avdd-supply = <&reg_dldo1>;
- dvdd-supply = <&reg_dldo1>;
- mount-matrix = "0", "-1", "0",
- "-1", "0", "0",
- "0", "0", "-1";
- };
-
/* Magnetometer */
lis3mdl: magnetometer@1e {
compatible = "st,lis3mdl-magn";
--
2.35.3

View File

@@ -0,0 +1,170 @@
From 4310163e843273d80a454850bf96c81605156256 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 21 Jan 2022 23:28:48 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Add support for Pinephone keyboard
Pinephone keyboard can be used with Pinephone. Describe it in
the device tree.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 136 ++++++++++++++++++
1 file changed, 136 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 80a08fa0a52a..6ba56e41d6aa 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -178,6 +178,122 @@ bat: battery {
<0xdf 98>;
};
+ ppkb_battery: keyboard-battery {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3000000>;
+ voltage-max-design-microvolt = <4200000>;
+ energy-full-design-microwatt-hours = <21000000>;
+ charge-full-design-microamp-hours = <6000000>;
+ precharge-current-microamp = <100000>;
+ charge-term-current-microamp = <50000>;
+ constant-charge-current-max-microamp = <2000000>;
+ constant-charge-voltage-max-microvolt = <4200000>;
+ factory-internal-resistance-micro-ohms = <120000>;
+ ocv-capacity-celsius = <20>;
+ ocv-capacity-table-0 =
+ <4147328 100>,
+ <4132636 99>,
+ <4121720 98>,
+ <4110905 97>,
+ <4102063 96>,
+ <4092428 95>,
+ <4082371 94>,
+ <4074137 93>,
+ <4064172 92>,
+ <4056387 91>,
+ <4047198 90>,
+ <4038599 89>,
+ <4030933 88>,
+ <4021831 87>,
+ <4012613 86>,
+ <4003863 85>,
+ <3995132 84>,
+ <3986108 83>,
+ <3977434 82>,
+ <3967977 81>,
+ <3960286 80>,
+ <3951737 79>,
+ <3943518 78>,
+ <3935723 77>,
+ <3928692 76>,
+ <3920093 75>,
+ <3912676 74>,
+ <3905481 73>,
+ <3899881 72>,
+ <3892341 71>,
+ <3887140 70>,
+ <3880005 69>,
+ <3876060 68>,
+ <3869195 67>,
+ <3863234 66>,
+ <3857808 65>,
+ <3851464 64>,
+ <3846976 63>,
+ <3840724 62>,
+ <3835254 61>,
+ <3830946 60>,
+ <3826564 59>,
+ <3821275 58>,
+ <3817413 57>,
+ <3811941 56>,
+ <3808947 55>,
+ <3804959 54>,
+ <3800958 53>,
+ <3797447 52>,
+ <3794303 51>,
+ <3790341 50>,
+ <3787022 49>,
+ <3783436 48>,
+ <3779936 47>,
+ <3776176 46>,
+ <3772160 45>,
+ <3769348 44>,
+ <3766705 43>,
+ <3762481 42>,
+ <3760894 41>,
+ <3758396 40>,
+ <3755803 39>,
+ <3753543 38>,
+ <3749691 37>,
+ <3747026 36>,
+ <3743937 35>,
+ <3741872 34>,
+ <3738529 33>,
+ <3737528 32>,
+ <3734059 31>,
+ <3731586 30>,
+ <3728576 29>,
+ <3725939 28>,
+ <3721208 27>,
+ <3718239 26>,
+ <3713032 25>,
+ <3709785 24>,
+ <3704045 23>,
+ <3701203 22>,
+ <3695965 21>,
+ <3691074 20>,
+ <3684562 19>,
+ <3679140 18>,
+ <3670993 17>,
+ <3664243 16>,
+ <3655383 15>,
+ <3647666 14>,
+ <3642747 13>,
+ <3637775 12>,
+ <3632593 11>,
+ <3627120 10>,
+ <3620923 9>,
+ <3611465 8>,
+ <3597536 7>,
+ <3577366 6>,
+ <3545253 5>,
+ <3497377 4>,
+ <3430377 3>,
+ <3337780 2>,
+ <3183953 1>,
+ <3064061 0>;
+ };
+
bt_sco_codec: bt-sco-codec {
#sound-dai-cells = <1>;
compatible = "linux,bt-sco";
@@ -547,6 +663,26 @@ accelerometer@68 {
/* Connected to pogo pins (external spring based pinheader for user addons) */
&i2c2 {
status = "okay";
+
+ ppkb: keyboard@15 {
+ compatible = "pine64,pinephone-keyboard";
+ reg = <0x15>;
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 12 IRQ_TYPE_EDGE_FALLING>; /* PL12 */
+ vbat-supply = <&reg_usb_5v>;
+ wakeup-source;
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ charger@75 {
+ compatible = "injoinic,ip5209";
+ reg = <0x75>;
+ monitored-battery = <&ppkb_battery>;
+ };
+ };
+ };
};
&i2s2 {
--
2.35.3

View File

@@ -0,0 +1,71 @@
From c702d712b81c7bba98dd49e58f13b5cb475e4f79 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 5 Feb 2020 23:14:27 -0600
Subject: arm64: dts: sun50i-a64-pinephone: Add support for modem audio
The PinePhone has a Quectel EG25-G modem (a variant of the EC25) with
its PCM interface connected to AIF2. Add the DAI link so call audio can
be routed in hardware.
The modem supports two fixed sample rates, and one fixed word size, with
a variable BCLK frequency. Use the minimum supported BCLK frequency,
which corresponds to a slot width of 32 bits.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 25 ++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 85fe10220017..0bd1dfd59441 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -188,6 +188,12 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ ec25_codec: ec25-codec {
+ #sound-dai-cells = <1>;
+ compatible = "quectel,ec25";
+ sound-name-prefix = "Modem";
+ };
+
i2c_csi: i2c-csi {
compatible = "i2c-gpio";
sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE13 */
@@ -316,7 +322,7 @@ vibrator {
&codec {
pinctrl-names = "default";
- pinctrl-0 = <&aif3_pins>;
+ pinctrl-0 = <&aif2_pins>, <&aif3_pins>;
status = "okay";
};
@@ -781,6 +787,23 @@ &sound {
"Headset Microphone", "HBIAS",
"MIC2", "Headset Microphone";
+ simple-audio-card,dai-link@1 {
+ format = "dsp_a";
+ frame-master = <&link1_codec>;
+ bitclock-master = <&link1_codec>;
+ bitclock-inversion;
+
+ link1_cpu: cpu {
+ sound-dai = <&ec25_codec 0>;
+ };
+
+ link1_codec: codec {
+ sound-dai = <&codec 1>;
+ dai-tdm-slot-num = <1>;
+ dai-tdm-slot-width = <32>;
+ };
+ };
+
simple-audio-card,dai-link@2 {
format = "dsp_a";
frame-master = <&link2_codec>;
--
2.35.3

View File

@@ -0,0 +1,35 @@
From 7417fca1a3497a0a233c3ec3fb2f0424dafa5aff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 30 Nov 2020 06:14:07 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Bump I2C frequency to 400kHz
High speed. :)
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 0bd1dfd59441..10efafb282cd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -478,6 +478,7 @@ ov5640_ep: endpoint {
&i2c0 {
status = "okay";
+ clock-frequency = <400000>;
touchscreen@5d {
compatible = "goodix,gt917s";
@@ -495,6 +496,7 @@ touchscreen@5d {
&i2c1 {
status = "okay";
+ clock-frequency = <400000>;
/* Magnetometer */
lis3mdl: magnetometer@1e {
--
2.35.3

View File

@@ -0,0 +1,29 @@
From 61fe7ea4f3fe69b5d35f84337f2f8224056b4d01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 26 Apr 2021 01:31:27 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Don't make lradc keys a wakeup
source
This allow the crust to reach lower suspend state.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index b64b3b65997a..0a8352147280 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -540,7 +540,7 @@ &i2s2 {
&lradc {
vref-supply = <&reg_aldo3>;
- wakeup-source;
+// wakeup-source;
status = "okay";
button-200 {
--
2.35.3

View File

@@ -0,0 +1,34 @@
From 637de7906d901d8af637c9a065e6c4a20f43bc73 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 16 Apr 2022 02:12:06 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Enable Pinephone Keyboard power
manager
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 6ba56e41d6aa..9585d2ad91f4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -434,6 +434,15 @@ vibrator {
enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
vcc-supply = <&reg_dcdc1>;
};
+
+ keyboard-power {
+ compatible = "megi,pinephone-keyboard-power-manager";
+ phone-battery = "axp20x-battery";
+ phone-usb = "axp20x-usb";
+ kb-battery = "ip5xxx-battery";
+ kb-boost = "ip5xxx-boost";
+ kb-usb = "ip5xxx-usb";
+ };
};
&codec {
--
2.35.3

View File

@@ -0,0 +1,29 @@
From 19b4d7bceaa23dbf5b84d01ff2bc99929daab56d Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 23 Sep 2020 00:13:54 -0500
Subject: arm64: dts: sun50i-a64-pinephone: Enable internal HMIC bias
Revisions 1.0 and 1.1 of the PinePhone mainboard do not have an external
resistor connecting HBIAS to MIC2. Enable the internal resistor to
provide the appropriate mic bias.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 4 ++++
1 file changed, 4 insertions(+)
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
index ff01e2be26e7..8f6ea6b06aa9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -126,3 +126,7 @@ &sgm3140 {
enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
};
+
+&codec_analog {
+ allwinner,internal-bias-resistor;
+};
--
2.35.3

View File

@@ -0,0 +1,29 @@
From 7e742d316077974198256cec794efcfddb16caf3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Wed, 5 Aug 2020 11:19:01 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Fix BH modem manager behavior
PP 1.1 has STATUS line multiplexed with POWER KEY, but reading it doesn't
work reliably. Just treat 1.1 as if it was 1.0, and ignore the STATUS.
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
index 93dc8512fe45..d67f31ef529e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -123,8 +123,8 @@ modem {
enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
- status-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
- status-pwrkey-multiplexed; /* status acts as pwrkey */
+ pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+ //status-pwrkey-multiplexed; /* status acts as pwrkey */
sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
--
2.35.3

View File

@@ -0,0 +1,28 @@
From 483a2e8a7dc6fe063230fdc220bdda962adc25a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sun, 25 Apr 2021 03:17:39 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Power off the touch controller in
sleep
Otherwise it stays on and consumes quite a bit of power.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 1b2de298990f..b64b3b65997a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -491,6 +491,7 @@ touchscreen@5d {
VDDIO-supply = <&reg_ldo_io0>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1440>;
+ poweroff-in-suspend;
};
};
--
2.35.3

View File

@@ -0,0 +1,73 @@
From 42f0930f8511114bb8dbbc38586fef47ee291de8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 7 Jun 2021 20:23:52 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Set minimum backlight duty cycle to
10%
Instead of creating our own table, use existing lth_brightness
functionality in the pwm_bl driver.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-a64-pinephone-1.1.dts | 16 +---------------
.../dts/allwinner/sun50i-a64-pinephone-1.2.dts | 17 +----------------
2 files changed, 2 insertions(+), 31 deletions(-)
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
index d67f31ef529e..63ceae07a0e0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -26,21 +26,7 @@ &axp803 {
&backlight {
power-supply = <&reg_ldo_io0>;
- /*
- * PWM backlight circuit on this PinePhone revision was changed since
- * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight
- * being off is around 20%. Duty cycle for the lowest brightness level
- * also varries quite a bit between individual boards, so the lowest
- * value here was chosen as a safe default.
- */
- brightness-levels = <
- 774 793 814 842
- 882 935 1003 1088
- 1192 1316 1462 1633
- 1830 2054 2309 2596
- 2916 3271 3664 4096>;
- num-interpolated-steps = <50>;
- default-brightness-level = <400>;
+ lth-brightness = <10>;
};
&codec_analog {
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index 5e988230e6e4..d28a23e98232 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -17,22 +17,7 @@ wifi_pwrseq: wifi-pwrseq {
&backlight {
power-supply = <&reg_ldo_io0>;
- /*
- * PWM backlight circuit on this PinePhone revision was changed since 1.0,
- * and the lowest PWM duty cycle that doesn't lead to backlight being off
- * is around 10%. Duty cycle for the lowest brightness level also varries
- * quite a bit between individual boards, so the lowest value here was
- * chosen as a safe default.
- */
- brightness-levels = <
- 5000 5248 5506 5858 6345
- 6987 7805 8823 10062 11543
- 13287 15317 17654 20319 23336
- 26724 30505 34702 39335 44427
- 50000
- >;
- num-interpolated-steps = <50>;
- default-brightness-level = <500>;
+ lth-brightness = <10>;
};
&lis3mdl {
--
2.35.3

View File

@@ -0,0 +1,43 @@
From 78bc7586b89cc4de8dd01aa7a2e0c12d0844585c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Thu, 6 Feb 2020 04:58:32 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Shorten post-power-on-delay on mmcs
These are not needed.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 5437fc514e7b..e1e64065ef7a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -553,6 +553,7 @@ &mmc0 {
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
disable-wp;
bus-width = <4>;
+ post-power-on-delay-ms = <1>; /* power is already turned on by the bootloader */
status = "okay";
};
@@ -563,6 +564,7 @@ &mmc1 {
vqmmc-supply = <&reg_dldo4>;
bus-width = <4>;
non-removable;
+ post-power-on-delay-ms = <1>; /* wifi power is always on */
status = "okay";
rtl8723cs: wifi@1 {
@@ -578,6 +580,7 @@ &mmc2 {
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
+ post-power-on-delay-ms = <1>; /* power is already turned on by the bootloader */
status = "okay";
};
--
2.35.3

View File

@@ -0,0 +1,35 @@
From c621729b63ecd9f28fd48647f3d74deb4e1ebbad Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 23 Feb 2024 01:53:14 +0100
Subject: arm64: dts: sun50i-a64-pinephone: Use newer jack detection
implementaion
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index f0aab1fd6080..9cdef78a4abd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -476,6 +476,7 @@ keyboard-power {
&codec {
pinctrl-names = "default";
pinctrl-0 = <&aif2_pins>, <&aif3_pins>;
+ jack-type = "headset";
status = "okay";
};
@@ -956,7 +957,7 @@ reboot_mode: reboot-mode@4 {
&sound {
status = "okay";
simple-audio-card,name = "PinePhone";
- simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
+ simple-audio-card,aux-devs = <&codec_analog>, <&codec>, <&speaker_amp>;
simple-audio-card,widgets = "Microphone", "Headset Microphone",
"Microphone", "Internal Microphone",
"Headphone", "Headphone Jack",
--
2.35.3

View File

@@ -0,0 +1,84 @@
From 41c2707ed2376cf0f6710b9fdabc388ec0162d25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Tue, 26 Oct 2021 01:25:46 +0200
Subject: arm64: dts: sun50i-a64-pinephone: Workaround broken HDMI HPD signal
HDMI HPD signal from ANX7688 to SoC's HDMI PHY is wrongly level
shifted and does not register most of the time at the SoC's input.
We need to do the signalling in software. Link anx7688 to hdmi
driver via extcon interface.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 6 +++++-
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 6 +++++-
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
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
index cfb9518e057f..0530881d8401 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -25,7 +25,7 @@ &axp803 {
};
&i2c0 {
- hdmi-bridge@28 {
+ anx7688: hdmi-bridge@28 {
compatible = "analogix,anx7688";
reg = <0x28>;
@@ -131,3 +131,7 @@ &sgm3140 {
&codec_analog {
allwinner,internal-bias-resistor;
};
+
+&hdmi {
+ extcon = <&anx7688 0>;
+};
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
index 35cb92e3b5f1..053e4add9973 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -34,7 +34,7 @@ &codec_analog {
};
&i2c0 {
- hdmi-bridge@28 {
+ anx7688: hdmi-bridge@28 {
compatible = "analogix,anx7688";
reg = <0x28>;
@@ -133,3 +133,7 @@ usb0_drd_sw: endpoint {
};
};
};
+
+&hdmi {
+ extcon = <&anx7688 0>;
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index aeb5c69fe51d..c4e3547e02e9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -34,7 +34,7 @@ &mmc1 {
};
&i2c0 {
- hdmi-bridge@28 {
+ anx7688: hdmi-bridge@28 {
compatible = "analogix,anx7688";
reg = <0x28>;
@@ -121,3 +121,7 @@ usb0_drd_sw: endpoint {
};
};
};
+
+&hdmi {
+ extcon = <&anx7688 0>;
+};
--
2.35.3

View File

@@ -0,0 +1,38 @@
From c6453ac8312eb00afee2994f5df067cce9909ec7 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 18 Feb 2024 17:39:58 +0100
Subject: arm64: dts: sun50i-a64-pinetab: Add accelerometer
Add accelerometer. Patch picked up from here:
https://github.com/dreemurrs-embedded/Pine64-Arch/blob/master/PKGBUILDS/pine64/linux-megi/pinetab-accelerometer.patch
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
index b7ab7d28914e..8c91ed7083d7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
@@ -237,7 +237,15 @@ &i2c0_pins {
&i2c1 {
status = "okay";
- /* TODO: add Bochs BMA223 accelerometer here */
+ bma223@18 {
+ compatible = "bosch,bma223", "bosch,bma222e";
+ reg = <0x18>;
+ interrupt-parent = <&pio>;
+ interrupts = <7 5 IRQ_TYPE_LEVEL_HIGH>; /* PH5 */
+ mount-matrix = "0", "-1", "0",
+ "-1", "0", "0",
+ "0", "0", "-1";
+ };
};
&lradc {
--
2.35.3

View File

@@ -0,0 +1,28 @@
From cc7e76dad36b8bea02bc0c56799b1eae1e8ccb09 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 18 Feb 2024 17:38:00 +0100
Subject: arm64: dts: sun50i-a64-pinetab: Name sound card PineTab
There's no upstream UCM for PineTab, yet. So I guess we can safely
rename it. Pine64-Arch is using this name.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
index 6056c965baf6..b7ab7d28914e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
@@ -475,6 +475,7 @@ hdmi_out_con: endpoint {
&sound {
status = "okay";
+ simple-audio-card,name = "PineTab";
simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
"Microphone", "Internal Microphone Right",
--
2.35.3

View File

@@ -0,0 +1,44 @@
From cba7c668f00893fce315787b8b20f594f1d814f1 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Sun, 14 Apr 2019 23:46:47 +0800
Subject: arm64: dts: sun50i-a64-pinetab: enable RTL8723CS bluetooth
PineTab has a RTL8723CS Wi-Fi/BT combo chip on board, the bluetooth part
of it communicates with A64 via UART, and the power of it is controlled
with some GPIO at PL bank.
Enable the bluetooth in the device tree.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
.../boot/dts/allwinner/sun50i-a64-pinetab.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
index 8c91ed7083d7..419fe19b4a6f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
@@ -511,6 +511,20 @@ &uart0 {
status = "okay";
};
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+ status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8723cs-bt";
+ reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
+ device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
+ host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+ firmware-postfix = "pinebook";
+ };
+};
+
&usb_otg {
dr_mode = "otg";
status = "okay";
--
2.35.3

Some files were not shown because too many files have changed in this diff Show More