mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-05 22:01:35 +00:00
Meson64 DEV remove deprecated and disable broken patches
This commit is contained in:
parent
f831a2a014
commit
1f0c5c8a81
8 changed files with 199 additions and 506 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,56 +0,0 @@
|
|||
From 4c9cc11e8b99da324f977a25f2d556e9cc3b7633 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 15:35:00 +0200
|
||||
Subject: [PATCH 16/36] drm/meson: dw_hdmi: Add support for an optional
|
||||
external 5V regulator
|
||||
|
||||
On reference boards and derivatives, the HDMI Logic is powered by an external
|
||||
5V regulator.
|
||||
This regulator was set by the Vendor U-Boot, add optional support for it.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
index cef4144..17de3af 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/clk.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_edid.h>
|
||||
@@ -137,6 +138,7 @@ struct meson_dw_hdmi {
|
||||
struct reset_control *hdmitx_phy;
|
||||
struct clk *hdmi_pclk;
|
||||
struct clk *venci_clk;
|
||||
+ struct regulator *hdmi_supply;
|
||||
u32 irq_stat;
|
||||
};
|
||||
#define encoder_to_meson_dw_hdmi(x) \
|
||||
@@ -751,6 +753,17 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
dw_plat_data = &meson_dw_hdmi->dw_plat_data;
|
||||
encoder = &meson_dw_hdmi->encoder;
|
||||
|
||||
+ meson_dw_hdmi->hdmi_supply = devm_regulator_get_optional(dev, "hdmi");
|
||||
+ if (IS_ERR(meson_dw_hdmi->hdmi_supply)) {
|
||||
+ if (PTR_ERR(meson_dw_hdmi->hdmi_supply) == -EPROBE_DEFER)
|
||||
+ return -EPROBE_DEFER;
|
||||
+ meson_dw_hdmi->hdmi_supply = NULL;
|
||||
+ } else {
|
||||
+ ret = regulator_enable(meson_dw_hdmi->hdmi_supply);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
|
||||
"hdmitx_apb");
|
||||
if (IS_ERR(meson_dw_hdmi->hdmitx_apb)) {
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
From 7ce5f752df490a622f7b60b119deb78fe06aa89c Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 15:34:21 +0200
|
||||
Subject: [PATCH 17/36] drm/meson: Add missing VPU init
|
||||
|
||||
The VPU init misses these configurations values.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_drv.c | 9 +++++++++
|
||||
drivers/gpu/drm/meson/meson_registers.h | 4 ++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
|
||||
index 7742c7d..19a0d8d 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_drv.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_drv.c
|
||||
@@ -150,6 +150,14 @@ static struct regmap_config meson_regmap_config = {
|
||||
.max_register = 0x1000,
|
||||
};
|
||||
|
||||
+static void meson_vpu_init(struct meson_drm *priv)
|
||||
+{
|
||||
+ writel_relaxed(0x210000, priv->io_base + _REG(VPU_RDARB_MODE_L1C1));
|
||||
+ writel_relaxed(0x10000, priv->io_base + _REG(VPU_RDARB_MODE_L1C2));
|
||||
+ writel_relaxed(0x900000, priv->io_base + _REG(VPU_RDARB_MODE_L2C1));
|
||||
+ writel_relaxed(0x20000, priv->io_base + _REG(VPU_WRARB_MODE_L2C1));
|
||||
+}
|
||||
+
|
||||
static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
@@ -221,6 +229,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
|
||||
/* Hardware Initialization */
|
||||
|
||||
+ meson_vpu_init(priv);
|
||||
meson_venc_init(priv);
|
||||
meson_vpp_init(priv);
|
||||
meson_viu_init(priv);
|
||||
diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h
|
||||
index 2847381..bca8714 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_registers.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_registers.h
|
||||
@@ -1363,6 +1363,10 @@
|
||||
#define VPU_PROT3_STAT_1 0x277a
|
||||
#define VPU_PROT3_STAT_2 0x277b
|
||||
#define VPU_PROT3_REQ_ONOFF 0x277c
|
||||
+#define VPU_RDARB_MODE_L1C1 0x2790
|
||||
+#define VPU_RDARB_MODE_L1C2 0x2799
|
||||
+#define VPU_RDARB_MODE_L2C1 0x279d
|
||||
+#define VPU_WRARB_MODE_L2C1 0x27a2
|
||||
|
||||
/* osd super scale */
|
||||
#define OSDSR_HV_SIZEIN 0x3130
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
From 8fe651551acad197e8c776612b2fc16664d91f17 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Fri, 13 Oct 2017 14:47:23 +0200
|
||||
Subject: [PATCH 32/36] ARM64: dts: meson-gx: add VPU power domain
|
||||
|
||||
This patch adds support for the VPU Power Domain nodes, and attaches the
|
||||
VPU power domain to the VPU node.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 11 ++++++++
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 43 +++++++++++++++++++++++++++++
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 43 +++++++++++++++++++++++++++++
|
||||
3 files changed, 97 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
index ff27ce0..ace0e4b 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
@@ -393,6 +393,12 @@
|
||||
compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
|
||||
reg = <0x0 0x0 0x0 0x100>;
|
||||
|
||||
+ pwrc_vpu: power-controller-vpu {
|
||||
+ compatible = "amlogic,meson-gx-pwrc-vpu";
|
||||
+ #power-domain-cells = <0>;
|
||||
+ amlogic,hhi-sysctrl = <&sysctrl>;
|
||||
+ };
|
||||
+
|
||||
clkc_AO: clock-controller {
|
||||
compatible = "amlogic,meson-gx-aoclkc";
|
||||
#clock-cells = <1>;
|
||||
@@ -470,6 +476,11 @@
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
|
||||
|
||||
+ sysctrl: system-controller@0 {
|
||||
+ compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
|
||||
+ reg = <0 0 0 0x400>;
|
||||
+ };
|
||||
+
|
||||
mailbox: mailbox@404 {
|
||||
compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
|
||||
reg = <0 0x404 0 0x4c>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
index ef12d67..b5b6b33 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
@@ -692,6 +692,48 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pwrc_vpu {
|
||||
+ resets = <&reset RESET_VIU>,
|
||||
+ <&reset RESET_VENC>,
|
||||
+ <&reset RESET_VCBUS>,
|
||||
+ <&reset RESET_BT656>,
|
||||
+ <&reset RESET_DVIN_RESET>,
|
||||
+ <&reset RESET_RDMA>,
|
||||
+ <&reset RESET_VENCI>,
|
||||
+ <&reset RESET_VENCP>,
|
||||
+ <&reset RESET_VDAC>,
|
||||
+ <&reset RESET_VDI6>,
|
||||
+ <&reset RESET_VENCL>,
|
||||
+ <&reset RESET_VID_LOCK>;
|
||||
+ clocks = <&clkc CLKID_VPU>,
|
||||
+ <&clkc CLKID_VAPB>;
|
||||
+ clock-names = "vpu", "vapb";
|
||||
+ /*
|
||||
+ * VPU clocking is provided by two identical clock paths
|
||||
+ * VPU_0 and VPU_1 muxed to a single clock by a glitch
|
||||
+ * free mux to safely change frequency while running.
|
||||
+ * Same for VAPB but with a final gate after the glitch free mux.
|
||||
+ */
|
||||
+ assigned-clocks = <&clkc CLKID_VPU_0_SEL>,
|
||||
+ <&clkc CLKID_VPU_0>,
|
||||
+ <&clkc CLKID_VPU>, /* Glitch free mux */
|
||||
+ <&clkc CLKID_VAPB_0_SEL>,
|
||||
+ <&clkc CLKID_VAPB_0>,
|
||||
+ <&clkc CLKID_VAPB_SEL>; /* Glitch free mux */
|
||||
+ assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <&clkc CLKID_VPU_0>,
|
||||
+ <&clkc CLKID_FCLK_DIV4>,
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <&clkc CLKID_VAPB_0>;
|
||||
+ assigned-clock-rates = <0>, /* Do Nothing */
|
||||
+ <666666666>,
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <250000000>,
|
||||
+ <0>; /* Do Nothing */
|
||||
+};
|
||||
+
|
||||
&saradc {
|
||||
compatible = "amlogic,meson-gxbb-saradc", "amlogic,meson-saradc";
|
||||
clocks = <&xtal>,
|
||||
@@ -761,4 +803,5 @@
|
||||
|
||||
&vpu {
|
||||
compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
|
||||
+ power-domains = <&pwrc_vpu>;
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
index 02b52b6..d5c8952 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
@@ -721,6 +721,48 @@
|
||||
clock-names = "fast", "iface", "bclks", "mclk";
|
||||
};
|
||||
|
||||
+&pwrc_vpu {
|
||||
+ resets = <&reset RESET_VIU>,
|
||||
+ <&reset RESET_VENC>,
|
||||
+ <&reset RESET_VCBUS>,
|
||||
+ <&reset RESET_BT656>,
|
||||
+ <&reset RESET_DVIN_RESET>,
|
||||
+ <&reset RESET_RDMA>,
|
||||
+ <&reset RESET_VENCI>,
|
||||
+ <&reset RESET_VENCP>,
|
||||
+ <&reset RESET_VDAC>,
|
||||
+ <&reset RESET_VDI6>,
|
||||
+ <&reset RESET_VENCL>,
|
||||
+ <&reset RESET_VID_LOCK>;
|
||||
+ clocks = <&clkc CLKID_VPU>,
|
||||
+ <&clkc CLKID_VAPB>;
|
||||
+ clock-names = "vpu", "vapb";
|
||||
+ /*
|
||||
+ * VPU clocking is provided by two identical clock paths
|
||||
+ * VPU_0 and VPU_1 muxed to a single clock by a glitch
|
||||
+ * free mux to safely change frequency while running.
|
||||
+ * Same for VAPB but with a final gate after the glitch free mux.
|
||||
+ */
|
||||
+ assigned-clocks = <&clkc CLKID_VPU_0_SEL>,
|
||||
+ <&clkc CLKID_VPU_0>,
|
||||
+ <&clkc CLKID_VPU>, /* Glitch free mux */
|
||||
+ <&clkc CLKID_VAPB_0_SEL>,
|
||||
+ <&clkc CLKID_VAPB_0>,
|
||||
+ <&clkc CLKID_VAPB_SEL>; /* Glitch free mux */
|
||||
+ assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <&clkc CLKID_VPU_0>,
|
||||
+ <&clkc CLKID_FCLK_DIV4>,
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <&clkc CLKID_VAPB_0>;
|
||||
+ assigned-clock-rates = <0>, /* Do Nothing */
|
||||
+ <666666666>,
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <0>, /* Do Nothing */
|
||||
+ <250000000>,
|
||||
+ <0>; /* Do Nothing */
|
||||
+};
|
||||
+
|
||||
&saradc {
|
||||
compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
|
||||
clocks = <&xtal>,
|
||||
@@ -790,4 +832,5 @@
|
||||
|
||||
&vpu {
|
||||
compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
|
||||
+ power-domains = <&pwrc_vpu>;
|
||||
};
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
From 9b5feb2460d4f7a2993145de3aef1292c6a09549 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 17:00:59 +0200
|
||||
Subject: [PATCH 34/36] ARM64: dts: meson-gx: grow reset controller memory zone
|
||||
|
||||
Now the Amlogic Meson GX SoCs datasheet documents all the Reset registers,
|
||||
grow the memory in the node to allow usage of the level registers.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
index ace0e4b..2e0ee17 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
@@ -220,7 +220,7 @@
|
||||
|
||||
reset: reset-controller@4404 {
|
||||
compatible = "amlogic,meson-gx-reset", "amlogic,meson-gxbb-reset";
|
||||
- reg = <0x0 0x04404 0x0 0x20>;
|
||||
+ reg = <0x0 0x04404 0x0 0x9c>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
From 5221675b31e8a3c17a94c7f058c33d0751595c2b Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 17:00:26 +0200
|
||||
Subject: [PATCH 35/36] ARM64: dts: odroid-c2: Add HDMI and CEC Nodes
|
||||
|
||||
Now the VPU Power Domain has been fixed while boothing from Mainline U-Boot,
|
||||
VPU and HDMI nodes can finally be added to the Odroid-C2 DTS.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
.../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 30 ++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index c2b6df4..896dfb3 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -135,6 +135,24 @@
|
||||
compatible = "mmc-pwrseq-emmc";
|
||||
reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
+
|
||||
+ hdmi-connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_connector_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cec_AO {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&ao_cec_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
ðmac {
|
||||
@@ -177,6 +195,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&hdmi_tx {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx_tmds_port {
|
||||
+ hdmi_tx_tmds_out: endpoint {
|
||||
+ remote-endpoint = <&hdmi_connector_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c_A {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c_a_pins>;
|
||||
--
|
||||
2.7.4
|
||||
|
Loading…
Add table
Reference in a new issue