mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Allwinner: Update patches for Linux 5.7
This commit is contained in:
@@ -30,8 +30,8 @@ index 8eec8685a50b..5eeb7da7a0ab 100644
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -218,6 +228,10 @@
|
||||
ths_calibration: thermal-sensor-calibration@14 {
|
||||
reg = <0x14 0x8>;
|
||||
cpu_speed_grade: cpu-speed-grade@1c {
|
||||
reg = <0x1c 0x4>;
|
||||
};
|
||||
+
|
||||
+ ephy_calib: ephy_calib@2c {
|
||||
|
||||
@@ -1,179 +1,3 @@
|
||||
From 9b743eadc7adb8a5ffe79742ea3925d2903788f2 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sat, 4 Apr 2020 20:42:41 +0200
|
||||
Subject: [PATCH 1/4] arm64: dts: allwinner: h6: orangepi: Add gpio power
|
||||
supply
|
||||
|
||||
OrangePi Lite2 and One Plus have GPIO ports powered by same power
|
||||
supplies. Add them in common DT.
|
||||
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
|
||||
index 9287976c4a50..f1be3dd558ca 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
|
||||
@@ -106,6 +106,12 @@ &ohci3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&pio {
|
||||
+ vcc-pc-supply = <®_bldo2>;
|
||||
+ vcc-pd-supply = <®_cldo1>;
|
||||
+ vcc-pg-supply = <®_aldo1>;
|
||||
+};
|
||||
+
|
||||
&r_i2c {
|
||||
status = "okay";
|
||||
|
||||
@@ -230,6 +236,10 @@ &r_ir {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&r_pio {
|
||||
+ vcc-pm-supply = <®_bldo3>;
|
||||
+};
|
||||
+
|
||||
&rtc {
|
||||
clocks = <&ext_osc32k>;
|
||||
};
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From d98355dc8de0a3075a49f6ecb103dd67e68ac0c8 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sat, 4 Apr 2020 20:55:52 +0200
|
||||
Subject: [PATCH 2/4] arm64: dts: allwinner: h6: orangepi: Disable OTG mode
|
||||
|
||||
As can be seen from OrangePi Lite 2 and One Plus schematics, VBUS pin on
|
||||
USB OTG port is directly connected to 5 V power supply. This mean that
|
||||
OTG port can safely operate only in host mode, even though these two
|
||||
boards have ID pin connected.
|
||||
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
|
||||
index f1be3dd558ca..ebc120a9232f 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
|
||||
@@ -251,7 +251,12 @@ &uart0 {
|
||||
};
|
||||
|
||||
&usb2otg {
|
||||
- dr_mode = "otg";
|
||||
+ /*
|
||||
+ * OrangePi Lite 2 and One Plus, where this DT is used, don't
|
||||
+ * have a controllable VBUS even though they do have an ID pin.
|
||||
+ * Using it as anything but a USB host is unsafe.
|
||||
+ */
|
||||
+ dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 0e4de8b92b2cab1e4dbeef5ef2913b745b25c39f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Meyer <git-commit@mailhell.seb7.de>
|
||||
Date: Mon, 3 Feb 2020 21:06:07 +0100
|
||||
Subject: [PATCH 3/4] arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI
|
||||
combo module
|
||||
|
||||
OrangePi Lite2 has AP6255 BT+WIFI combo chip. Add support for it.
|
||||
|
||||
Signed-off-by: Sebastian Meyer <git-commit@mailhell.seb7.de>
|
||||
[merged BT and WIFI patches and updated commit message]
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
.../allwinner/sun50i-h6-orangepi-lite2.dts | 65 +++++++++++++++++++
|
||||
1 file changed, 65 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
index e7ca75c0d0f7..e8770858b5d0 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
@@ -6,4 +6,69 @@
|
||||
/ {
|
||||
model = "OrangePi Lite2";
|
||||
compatible = "xunlong,orangepi-lite2", "allwinner,sun50i-h6";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial1 = &uart1; /* BT-UART */
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rtc 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
|
||||
+ post-power-on-delay-ms = <200>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ vmmc-supply = <®_cldo2>;
|
||||
+ vqmmc-supply = <®_bldo3>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcm: sdio-wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&r_pio>;
|
||||
+ interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+®_cldo2 {
|
||||
+ /*
|
||||
+ * This regulator is connected with CLDO3.
|
||||
+ * Before the kernel can support synchronized
|
||||
+ * enable of coupled regulators, keep them
|
||||
+ * both always on as a ugly hack.
|
||||
+ */
|
||||
+ regulator-always-on;
|
||||
+};
|
||||
+
|
||||
+®_cldo3 {
|
||||
+ /*
|
||||
+ * This regulator is connected with CLDO2.
|
||||
+ * See the comments for CLDO2.
|
||||
+ */
|
||||
+ regulator-always-on;
|
||||
+};
|
||||
+
|
||||
+/* There's the BT part of the AP6255 connected to that UART */
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
||||
+ uart-has-rtscts;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm4345c5";
|
||||
+ clocks = <&rtc 1>;
|
||||
+ clock-names = "lpo";
|
||||
+ device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
|
||||
+ host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
|
||||
+ shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
|
||||
+ max-speed = <1500000>;
|
||||
+ };
|
||||
};
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From e087c727b23ed0665136973e24a0292c14522723 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Meyer <git-commit@mailhell.seb7.de>
|
||||
Date: Mon, 3 Feb 2020 21:27:47 +0100
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1244
projects/Allwinner/patches/linux/0001-backport-from-5.8.patch
Normal file
1244
projects/Allwinner/patches/linux/0001-backport-from-5.8.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -555,172 +555,3 @@ index dff27934287c..c922639e25eb 100644
|
||||
|
||||
ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
|
||||
|
||||
From cb6130315f4ae856051725b2de4e208ed90eb740 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 8 Dec 2019 23:41:44 +0000
|
||||
Subject: [PATCH v2 2/4] drm/bridge: dw-hdmi: do not force "none" scan mode
|
||||
|
||||
Setting scan mode to "none" confuses some TVs like LG B8, which randomly
|
||||
change overscan percentage over time. Digital outputs like HDMI and DVI,
|
||||
handled by this controller, don't really need overscan, so we can always
|
||||
set scan mode to underscan. Actually, this is exactly what
|
||||
drm_hdmi_avi_infoframe_from_display_mode() already does, so we can just
|
||||
remove offending line.
|
||||
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
[updated commit message]
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
index 24965e53d351..de2c7ec887c8 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
@@ -1654,8 +1654,6 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
HDMI_EXTENDED_COLORIMETRY_XV_YCC_601;
|
||||
}
|
||||
|
||||
- frame.scan_mode = HDMI_SCAN_MODE_NONE;
|
||||
-
|
||||
/*
|
||||
* The Designware IP uses a different byte format from standard
|
||||
* AVI info frames, though generally the bits are in the correct
|
||||
--
|
||||
2.25.1
|
||||
|
||||
From 3043a1caa3f6d26128c746b991d086bbb85d50c2 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sat, 29 Feb 2020 16:23:38 +0100
|
||||
Subject: [PATCH v2 3/4] drm/bridge: dw-hdmi: Add support for RGB limited range
|
||||
|
||||
CEA 861 standard requestis that RGB quantization range is "limited" for
|
||||
CEA modes. Support that by adding CSC matrix which downscales values.
|
||||
|
||||
This allows proper color reproduction on TV and PC monitor at the same
|
||||
time. In future, override property can be added, like "Broadcast RGB"
|
||||
in i915 driver.
|
||||
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 63 +++++++++++++++++------
|
||||
1 file changed, 46 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
index de2c7ec887c8..c8a02e5b5e1b 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
@@ -92,6 +92,12 @@ static const u16 csc_coeff_rgb_in_eitu709[3][4] = {
|
||||
{ 0x6756, 0x78ab, 0x2000, 0x0200 }
|
||||
};
|
||||
|
||||
+static const u16 csc_coeff_rgb_full_to_rgb_limited[3][4] = {
|
||||
+ { 0x1b7c, 0x0000, 0x0000, 0x0020 },
|
||||
+ { 0x0000, 0x1b7c, 0x0000, 0x0020 },
|
||||
+ { 0x0000, 0x0000, 0x1b7c, 0x0020 }
|
||||
+};
|
||||
+
|
||||
struct hdmi_vmode {
|
||||
bool mdataenablepolarity;
|
||||
|
||||
@@ -109,6 +115,7 @@ struct hdmi_data_info {
|
||||
unsigned int pix_repet_factor;
|
||||
unsigned int hdcp_enable;
|
||||
struct hdmi_vmode video_mode;
|
||||
+ bool rgb_limited_range;
|
||||
};
|
||||
|
||||
struct dw_hdmi_i2c {
|
||||
@@ -956,7 +963,11 @@ static void hdmi_video_sample(struct dw_hdmi *hdmi)
|
||||
|
||||
static int is_color_space_conversion(struct dw_hdmi *hdmi)
|
||||
{
|
||||
- return hdmi->hdmi_data.enc_in_bus_format != hdmi->hdmi_data.enc_out_bus_format;
|
||||
+ return (hdmi->hdmi_data.enc_in_bus_format !=
|
||||
+ hdmi->hdmi_data.enc_out_bus_format) ||
|
||||
+ (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format) &&
|
||||
+ hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format) &&
|
||||
+ hdmi->hdmi_data.rgb_limited_range);
|
||||
}
|
||||
|
||||
static int is_color_space_decimation(struct dw_hdmi *hdmi)
|
||||
@@ -986,25 +997,27 @@ static int is_color_space_interpolation(struct dw_hdmi *hdmi)
|
||||
static void dw_hdmi_update_csc_coeffs(struct dw_hdmi *hdmi)
|
||||
{
|
||||
const u16 (*csc_coeff)[3][4] = &csc_coeff_default;
|
||||
+ bool is_input_rgb, is_output_rgb;
|
||||
unsigned i;
|
||||
u32 csc_scale = 1;
|
||||
|
||||
- if (is_color_space_conversion(hdmi)) {
|
||||
- if (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format)) {
|
||||
- if (hdmi->hdmi_data.enc_out_encoding ==
|
||||
- V4L2_YCBCR_ENC_601)
|
||||
- csc_coeff = &csc_coeff_rgb_out_eitu601;
|
||||
- else
|
||||
- csc_coeff = &csc_coeff_rgb_out_eitu709;
|
||||
- } else if (hdmi_bus_fmt_is_rgb(
|
||||
- hdmi->hdmi_data.enc_in_bus_format)) {
|
||||
- if (hdmi->hdmi_data.enc_out_encoding ==
|
||||
- V4L2_YCBCR_ENC_601)
|
||||
- csc_coeff = &csc_coeff_rgb_in_eitu601;
|
||||
- else
|
||||
- csc_coeff = &csc_coeff_rgb_in_eitu709;
|
||||
- csc_scale = 0;
|
||||
- }
|
||||
+ is_input_rgb = hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format);
|
||||
+ is_output_rgb = hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format);
|
||||
+
|
||||
+ if (!is_input_rgb && is_output_rgb) {
|
||||
+ if (hdmi->hdmi_data.enc_out_encoding == V4L2_YCBCR_ENC_601)
|
||||
+ csc_coeff = &csc_coeff_rgb_out_eitu601;
|
||||
+ else
|
||||
+ csc_coeff = &csc_coeff_rgb_out_eitu709;
|
||||
+ } else if (is_input_rgb && !is_output_rgb) {
|
||||
+ if (hdmi->hdmi_data.enc_out_encoding == V4L2_YCBCR_ENC_601)
|
||||
+ csc_coeff = &csc_coeff_rgb_in_eitu601;
|
||||
+ else
|
||||
+ csc_coeff = &csc_coeff_rgb_in_eitu709;
|
||||
+ csc_scale = 0;
|
||||
+ } else if (is_input_rgb && is_output_rgb &&
|
||||
+ hdmi->hdmi_data.rgb_limited_range) {
|
||||
+ csc_coeff = &csc_coeff_rgb_full_to_rgb_limited;
|
||||
}
|
||||
|
||||
/* The CSC registers are sequential, alternating MSB then LSB */
|
||||
@@ -1614,6 +1627,18 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
drm_hdmi_avi_infoframe_from_display_mode(&frame,
|
||||
&hdmi->connector, mode);
|
||||
|
||||
+ if (hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format)) {
|
||||
+ drm_hdmi_avi_infoframe_quant_range(&frame, &hdmi->connector,
|
||||
+ mode,
|
||||
+ hdmi->hdmi_data.rgb_limited_range ?
|
||||
+ HDMI_QUANTIZATION_RANGE_LIMITED :
|
||||
+ HDMI_QUANTIZATION_RANGE_FULL);
|
||||
+ } else {
|
||||
+ frame.quantization_range = HDMI_QUANTIZATION_RANGE_DEFAULT;
|
||||
+ frame.ycc_quantization_range =
|
||||
+ HDMI_YCC_QUANTIZATION_RANGE_LIMITED;
|
||||
+ }
|
||||
+
|
||||
if (hdmi_bus_fmt_is_yuv444(hdmi->hdmi_data.enc_out_bus_format))
|
||||
frame.colorspace = HDMI_COLORSPACE_YUV444;
|
||||
else if (hdmi_bus_fmt_is_yuv422(hdmi->hdmi_data.enc_out_bus_format))
|
||||
@@ -2099,6 +2124,10 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
/* TOFIX: Default to RGB888 output format */
|
||||
hdmi->hdmi_data.enc_out_bus_format = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
|
||||
+ hdmi->hdmi_data.rgb_limited_range = hdmi->sink_is_hdmi &&
|
||||
+ drm_default_rgb_quant_range(mode) ==
|
||||
+ HDMI_QUANTIZATION_RANGE_LIMITED;
|
||||
+
|
||||
hdmi->hdmi_data.pix_repet_factor = 0;
|
||||
hdmi->hdmi_data.hdcp_enable = 0;
|
||||
hdmi->hdmi_data.video_mode.mdataenablepolarity = true;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
@@ -1,40 +1,3 @@
|
||||
From d36b4160d693a3640be95ebc3aef1dfc9e69ba68 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sun, 15 Mar 2020 09:26:28 +0100
|
||||
Subject: [PATCH 01/11] media: cedrus: h264: Fix 4K decoding on H6
|
||||
|
||||
Due to unknown reason, H6 needs larger intraprediction buffer for 4K
|
||||
videos than other SoCs. This was discovered by playing 4096x2304 video,
|
||||
which is maximum what H6 VPU is supposed to support.
|
||||
|
||||
Fixes: 03e612e701a6 ("media: cedrus: Fix H264 4k support")
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
|
||||
index bfb4a4820a67..54ee2aa423e2 100644
|
||||
--- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
|
||||
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
|
||||
@@ -610,8 +610,12 @@ static int cedrus_h264_start(struct cedrus_ctx *ctx)
|
||||
goto err_mv_col_buf;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * NOTE: Multiplying by two deviates from CedarX logic, but it
|
||||
+ * is for some unknown reason needed for H264 4K decoding on H6.
|
||||
+ */
|
||||
ctx->codec.h264.intra_pred_buf_size =
|
||||
- ALIGN(ctx->src_fmt.width, 64) * 5;
|
||||
+ ALIGN(ctx->src_fmt.width, 64) * 5 * 2;
|
||||
ctx->codec.h264.intra_pred_buf =
|
||||
dma_alloc_coherent(dev->dev,
|
||||
ctx->codec.h264.intra_pred_buf_size,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 51af8e7381275e9b047857bb1269544fa4751ba7 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sat, 26 Oct 2019 13:55:15 +0200
|
||||
|
||||
Reference in New Issue
Block a user