rockchip: backport latest rk3588 patches
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
7298db5a9a
commit
bca580a383
@ -599,16 +599,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdrd3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdrd_dwc3_0 {
|
||||
dr_mode = "host";
|
||||
extcon = <&u2phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@ -616,3 +606,9 @@
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
extcon = <&u2phy0>;
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
From d56de8c9a17d8f5202d0f37dd06ce186cc512586 Mon Sep 17 00:00:00 2001
|
||||
From: Li Jun <jun.li@nxp.com>
|
||||
Date: Tue, 28 Mar 2023 16:23:04 +0800
|
||||
Subject: [PATCH] usb: typec: tcpm: try to get role switch from tcpc fwnode
|
||||
|
||||
Try to get usb role switch from tcpc fwnode if failed to
|
||||
get role switch from port dev, this is for case the port
|
||||
for role switch endpoint is located in connector node,
|
||||
as per connector binding doc, port@0 for HS is required.
|
||||
|
||||
ptn5110: tcpc@50 {
|
||||
compatible = "nxp,ptn5110";
|
||||
...
|
||||
status = "okay";
|
||||
|
||||
connector {
|
||||
compatible = "usb-c-connector";
|
||||
label = "USB-C";
|
||||
...
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
typec_conn: endpoint {
|
||||
remote-endpoint = <&usb2_controller>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Signed-off-by: Li Jun <jun.li@nxp.com>
|
||||
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
|
||||
Link: https://lore.kernel.org/r/1679991784-25500-1-git-send-email-jun.li@nxp.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/typec/tcpm/tcpm.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/usb/typec/tcpm/tcpm.c
|
||||
+++ b/drivers/usb/typec/tcpm/tcpm.c
|
||||
@@ -6541,6 +6541,8 @@ struct tcpm_port *tcpm_register_port(str
|
||||
port->port_type = port->typec_caps.type;
|
||||
|
||||
port->role_sw = usb_role_switch_get(port->dev);
|
||||
+ if (!port->role_sw)
|
||||
+ port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode);
|
||||
if (IS_ERR(port->role_sw)) {
|
||||
err = PTR_ERR(port->role_sw);
|
||||
goto out_destroy_wq;
|
||||
@ -0,0 +1,48 @@
|
||||
From: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
To: mturquette@baylibre.com, sboyd@kernel.org,
|
||||
kever.yang@rock-chips.com, zhangqing@rock-chips.com,
|
||||
heiko@sntech.de
|
||||
Cc: linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
linux-kernel@vger.kernel.org, huangtao@rock-chips.com
|
||||
Subject: [PATCH v3 1/4] clk: gate: export clk_gate_endisable
|
||||
Date: Wed, 2 Aug 2023 15:20:35 +0800 [thread overview]
|
||||
Message-ID: <20230802072038.29996-2-zhangqing@rock-chips.com> (raw)
|
||||
In-Reply-To: <20230802072038.29996-1-zhangqing@rock-chips.com>
|
||||
|
||||
make clk_gate_endisable not static, export API for other use.
|
||||
|
||||
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
---
|
||||
drivers/clk/clk-gate.c | 3 ++-
|
||||
include/linux/clk-provider.h | 1 +
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/clk-gate.c
|
||||
+++ b/drivers/clk/clk-gate.c
|
||||
@@ -53,7 +53,7 @@ static inline void clk_gate_writel(struc
|
||||
*
|
||||
* So, result is always: enable xor set2dis.
|
||||
*/
|
||||
-static void clk_gate_endisable(struct clk_hw *hw, int enable)
|
||||
+void clk_gate_endisable(struct clk_hw *hw, int enable)
|
||||
{
|
||||
struct clk_gate *gate = to_clk_gate(hw);
|
||||
int set = gate->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0;
|
||||
@@ -87,6 +87,7 @@ static void clk_gate_endisable(struct cl
|
||||
else
|
||||
__release(gate->lock);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(clk_gate_endisable);
|
||||
|
||||
static int clk_gate_enable(struct clk_hw *hw)
|
||||
{
|
||||
--- a/include/linux/clk-provider.h
|
||||
+++ b/include/linux/clk-provider.h
|
||||
@@ -609,6 +609,7 @@ struct clk *clk_register_gate(struct dev
|
||||
void clk_unregister_gate(struct clk *clk);
|
||||
void clk_hw_unregister_gate(struct clk_hw *hw);
|
||||
int clk_gate_is_enabled(struct clk_hw *hw);
|
||||
+void clk_gate_endisable(struct clk_hw *hw, int enable);
|
||||
|
||||
struct clk_div_table {
|
||||
unsigned int val;
|
||||
@ -1,72 +0,0 @@
|
||||
From a8dc483b1653a2b99f9b63803b4575ba4a91d8d8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 13 Jun 2023 16:45:05 +0200
|
||||
Subject: [PATCH] clk: rockchip: rk3588: fix pclk_vo0grf and pclk_vo1grf
|
||||
|
||||
Currently pclk_vo1grf is not exposed, but it should be referenced
|
||||
from the vo1_grf syscon, which needs it enabled. That syscon will
|
||||
be required for HDMI-RX functionality among other things.
|
||||
|
||||
Apart from that pclk_vo0grf and pclk_vo1grf are both linked gates
|
||||
and need the VO's hclk enabled in addition to their parent clock.
|
||||
|
||||
No Fixes tag has been added, since the logic requiring these clocks
|
||||
is not yet upstream anyways.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 11 +++++------
|
||||
include/dt-bindings/clock/rockchip,rk3588-cru.h | 3 ++-
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -1851,8 +1851,6 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(56), 0, GFLAGS),
|
||||
GATE(PCLK_TRNG0, "pclk_trng0", "pclk_vo0_root", 0,
|
||||
RK3588_CLKGATE_CON(56), 1, GFLAGS),
|
||||
- GATE(PCLK_VO0GRF, "pclk_vo0grf", "pclk_vo0_root", CLK_IGNORE_UNUSED,
|
||||
- RK3588_CLKGATE_CON(55), 10, GFLAGS),
|
||||
COMPOSITE(CLK_I2S4_8CH_TX_SRC, "clk_i2s4_8ch_tx_src", gpll_aupll_p, 0,
|
||||
RK3588_CLKSEL_CON(118), 5, 1, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(56), 11, GFLAGS),
|
||||
@@ -1998,8 +1996,6 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(60), 9, GFLAGS),
|
||||
GATE(PCLK_TRNG1, "pclk_trng1", "pclk_vo1_root", 0,
|
||||
RK3588_CLKGATE_CON(60), 10, GFLAGS),
|
||||
- GATE(0, "pclk_vo1grf", "pclk_vo1_root", CLK_IGNORE_UNUSED,
|
||||
- RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
GATE(PCLK_S_EDP0, "pclk_s_edp0", "pclk_vo1_s_root", 0,
|
||||
RK3588_CLKGATE_CON(59), 14, GFLAGS),
|
||||
GATE(PCLK_S_EDP1, "pclk_s_edp1", "pclk_vo1_s_root", 0,
|
||||
@@ -2447,12 +2443,15 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", "aclk_vop_low_root", 0, RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", "hclk_vop_root", 0, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", "hclk_vop_root", RK3588_LINKED_CLK, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
GATE_LINK(ACLK_HDCP1_PRE, "aclk_hdcp1_pre", "aclk_hdcp1_root", "aclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(59), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", "hclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", "hclk_vo1usb_top_root", RK3588_LINKED_CLK, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
GATE_LINK(ACLK_AV1_PRE, "aclk_av1_pre", "aclk_av1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(68), 1, GFLAGS),
|
||||
GATE_LINK(PCLK_AV1_PRE, "pclk_av1_pre", "pclk_av1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(68), 4, GFLAGS),
|
||||
GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", "hclk_nvm", 0, RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO0GRF, "pclk_vo0grf", "pclk_vo0_root", "hclk_vo0", CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(55), 10, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO1GRF, "pclk_vo1grf", "pclk_vo1_root", "hclk_vo1", CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
+
|
||||
};
|
||||
|
||||
static void __init rk3588_clk_init(struct device_node *np)
|
||||
--- a/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
+++ b/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
@@ -733,8 +733,9 @@
|
||||
#define ACLK_AV1_PRE 718
|
||||
#define PCLK_AV1_PRE 719
|
||||
#define HCLK_SDIO_PRE 720
|
||||
+#define PCLK_VO1GRF 721
|
||||
|
||||
-#define CLK_NR_CLKS (HCLK_SDIO_PRE + 1)
|
||||
+#define CLK_NR_CLKS (PCLK_VO1GRF + 1)
|
||||
|
||||
/* scmi-clocks indices */
|
||||
|
||||
@ -0,0 +1,226 @@
|
||||
From: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
To: mturquette@baylibre.com, sboyd@kernel.org,
|
||||
kever.yang@rock-chips.com, zhangqing@rock-chips.com,
|
||||
heiko@sntech.de
|
||||
Cc: linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
linux-kernel@vger.kernel.org, huangtao@rock-chips.com
|
||||
Subject: [PATCH v3 2/4] clk: rockchip: add support for gate link
|
||||
Date: Wed, 2 Aug 2023 15:20:36 +0800 [thread overview]
|
||||
Message-ID: <20230802072038.29996-3-zhangqing@rock-chips.com> (raw)
|
||||
In-Reply-To: <20230802072038.29996-1-zhangqing@rock-chips.com>
|
||||
|
||||
Recent Rockchip SoCs have a new hardware block called Native Interface
|
||||
Unit (NIU), which gates clocks to devices behind them. These effectively
|
||||
need two parent clocks.
|
||||
Use GATE_LINK to handle this.
|
||||
|
||||
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
---
|
||||
drivers/clk/rockchip/Makefile | 1 +
|
||||
drivers/clk/rockchip/clk-gate-link.c | 120 +++++++++++++++++++++++++++
|
||||
drivers/clk/rockchip/clk.c | 7 ++
|
||||
drivers/clk/rockchip/clk.h | 22 +++++
|
||||
4 files changed, 150 insertions(+)
|
||||
create mode 100644 drivers/clk/rockchip/clk-gate-link.c
|
||||
|
||||
--- a/drivers/clk/rockchip/Makefile
|
||||
+++ b/drivers/clk/rockchip/Makefile
|
||||
@@ -13,6 +13,7 @@ clk-rockchip-y += clk-inverter.o
|
||||
clk-rockchip-y += clk-mmc-phase.o
|
||||
clk-rockchip-y += clk-muxgrf.o
|
||||
clk-rockchip-y += clk-ddr.o
|
||||
+clk-rockchip-y += clk-gate-link.o
|
||||
clk-rockchip-$(CONFIG_RESET_CONTROLLER) += softrst.o
|
||||
|
||||
obj-$(CONFIG_CLK_PX30) += clk-px30.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/clk/rockchip/clk-gate-link.c
|
||||
@@ -0,0 +1,120 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2023 Fuzhou Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/clk-provider.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/string.h>
|
||||
+#include "clk.h"
|
||||
+
|
||||
+/**
|
||||
+ * struct clk_gate_link - gating link clock
|
||||
+ *
|
||||
+ * @gate: handle clk gate
|
||||
+ * @link: links clk
|
||||
+ */
|
||||
+struct clk_gate_link {
|
||||
+ struct clk_gate gate;
|
||||
+ struct clk *link;
|
||||
+};
|
||||
+
|
||||
+#define to_clk_gate_link(_gate) container_of(_gate, struct clk_gate_link, gate)
|
||||
+
|
||||
+static int clk_gate_link_enable(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct clk_gate_link *gate = to_clk_gate_link(to_clk_gate(hw));
|
||||
+
|
||||
+ clk_gate_endisable(hw, 1);
|
||||
+ clk_enable(gate->link);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void clk_gate_link_disable(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct clk_gate_link *gate = to_clk_gate_link(to_clk_gate(hw));
|
||||
+
|
||||
+ clk_gate_endisable(hw, 0);
|
||||
+ clk_disable(gate->link);
|
||||
+}
|
||||
+
|
||||
+static int clk_gate_link_is_enabled(struct clk_hw *hw)
|
||||
+{
|
||||
+ return clk_gate_is_enabled(hw);
|
||||
+}
|
||||
+
|
||||
+int clk_gate_link_prepare(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct clk_gate_link *gate = to_clk_gate_link(to_clk_gate(hw));
|
||||
+
|
||||
+ return clk_prepare(gate->link);
|
||||
+}
|
||||
+
|
||||
+void clk_gate_link_unprepare(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct clk_gate_link *gate = to_clk_gate_link(to_clk_gate(hw));
|
||||
+
|
||||
+ clk_unprepare(gate->link);
|
||||
+}
|
||||
+
|
||||
+const struct clk_ops clk_gate_link_ops = {
|
||||
+ .prepare = clk_gate_link_prepare,
|
||||
+ .unprepare = clk_gate_link_unprepare,
|
||||
+ .enable = clk_gate_link_enable,
|
||||
+ .disable = clk_gate_link_disable,
|
||||
+ .is_enabled = clk_gate_link_is_enabled,
|
||||
+};
|
||||
+
|
||||
+struct clk *rockchip_clk_register_gate_link(struct rockchip_clk_provider *ctx,
|
||||
+ const char *name, const char *parent_name,
|
||||
+ unsigned int link_id, u8 flags,
|
||||
+ void __iomem *gate_offset, u8 gate_shift,
|
||||
+ u8 gate_flags, spinlock_t *lock)
|
||||
+{
|
||||
+ struct clk_gate_link *gate_link;
|
||||
+ struct clk_init_data init = {};
|
||||
+ struct clk **clks;
|
||||
+ struct clk *clk_link;
|
||||
+
|
||||
+ if (gate_flags & CLK_GATE_HIWORD_MASK) {
|
||||
+ if (gate_shift > 15) {
|
||||
+ pr_err("gate bit exceeds LOWORD field\n");
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* allocate the gate */
|
||||
+ gate_link = kzalloc(sizeof(*gate_link), GFP_KERNEL);
|
||||
+ if (!gate_link)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ clks = ctx->clk_data.clks;
|
||||
+ gate_link->link = clks[link_id];
|
||||
+
|
||||
+ init.name = name;
|
||||
+ init.ops = &clk_gate_link_ops;
|
||||
+ init.flags = flags;
|
||||
+ init.parent_names = parent_name ? &parent_name : NULL;
|
||||
+ init.num_parents = 1;
|
||||
+
|
||||
+ /* struct clk_gate assignments */
|
||||
+ gate_link->gate.reg = gate_offset;
|
||||
+ gate_link->gate.bit_idx = gate_shift;
|
||||
+ gate_link->gate.flags = gate_flags;
|
||||
+ gate_link->gate.lock = lock;
|
||||
+ gate_link->gate.hw.init = &init;
|
||||
+
|
||||
+ clk_link = clk_register(NULL, &gate_link->gate.hw);
|
||||
+ if (IS_ERR(clk_link)) {
|
||||
+ kfree(gate_link);
|
||||
+ pr_err("%s clk_register field\n", name);
|
||||
+ return ERR_CAST(clk_link);
|
||||
+ }
|
||||
+
|
||||
+ return clk_link;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(rockchip_clk_register_gate_link);
|
||||
--- a/drivers/clk/rockchip/clk.c
|
||||
+++ b/drivers/clk/rockchip/clk.c
|
||||
@@ -510,6 +510,13 @@ void rockchip_clk_register_branches(stru
|
||||
ctx->reg_base + list->gate_offset,
|
||||
list->gate_shift, list->gate_flags, &ctx->lock);
|
||||
break;
|
||||
+
|
||||
+ case branch_gate_link:
|
||||
+ clk = rockchip_clk_register_gate_link(ctx, list->name,
|
||||
+ list->parent_names[0], list->link_id, flags,
|
||||
+ ctx->reg_base + list->gate_offset,
|
||||
+ list->gate_shift, list->gate_flags, &ctx->lock);
|
||||
+ break;
|
||||
case branch_composite:
|
||||
clk = rockchip_clk_register_branch(list->name,
|
||||
list->parent_names, list->num_parents,
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -517,6 +517,7 @@ enum rockchip_clk_branch_type {
|
||||
branch_divider,
|
||||
branch_fraction_divider,
|
||||
branch_gate,
|
||||
+ branch_gate_link,
|
||||
branch_mmc,
|
||||
branch_inverter,
|
||||
branch_factor,
|
||||
@@ -529,6 +530,7 @@ struct rockchip_clk_branch {
|
||||
enum rockchip_clk_branch_type branch_type;
|
||||
const char *name;
|
||||
const char *const *parent_names;
|
||||
+ unsigned int link_id;
|
||||
u8 num_parents;
|
||||
unsigned long flags;
|
||||
int muxdiv_offset;
|
||||
@@ -842,6 +844,20 @@ struct rockchip_clk_branch {
|
||||
.gate_flags = gf, \
|
||||
}
|
||||
|
||||
+#define GATE_LINK(_id, cname, pname, _linkid, f, o, b, gf) \
|
||||
+ { \
|
||||
+ .id = _id, \
|
||||
+ .branch_type = branch_gate_link, \
|
||||
+ .name = cname, \
|
||||
+ .parent_names = (const char *[]){ pname }, \
|
||||
+ .num_parents = 1, \
|
||||
+ .link_id = _linkid, \
|
||||
+ .flags = f, \
|
||||
+ .gate_offset = o, \
|
||||
+ .gate_shift = b, \
|
||||
+ .gate_flags = gf, \
|
||||
+ }
|
||||
+
|
||||
#define MMC(_id, cname, pname, offset, shift) \
|
||||
{ \
|
||||
.id = _id, \
|
||||
@@ -1002,6 +1018,12 @@ struct clk *rockchip_clk_register_halfdi
|
||||
unsigned long flags,
|
||||
spinlock_t *lock);
|
||||
|
||||
+struct clk *rockchip_clk_register_gate_link(struct rockchip_clk_provider *ctx,
|
||||
+ const char *name, const char *parent_name,
|
||||
+ unsigned int link_id, u8 flags,
|
||||
+ void __iomem *gate_offset, u8 gate_shift,
|
||||
+ u8 gate_flags, spinlock_t *lock);
|
||||
+
|
||||
#ifdef CONFIG_RESET_CONTROLLER
|
||||
void rockchip_register_softrst_lut(struct device_node *np,
|
||||
const int *lookup_table,
|
||||
@ -0,0 +1,31 @@
|
||||
From: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
To: mturquette@baylibre.com, sboyd@kernel.org,
|
||||
kever.yang@rock-chips.com, zhangqing@rock-chips.com,
|
||||
heiko@sntech.de
|
||||
Cc: linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
linux-kernel@vger.kernel.org, huangtao@rock-chips.com
|
||||
Subject: [PATCH v3 3/4] dt-bindings: clock: rk3588: export PCLK_VO1GRF clk id
|
||||
Date: Wed, 2 Aug 2023 15:20:37 +0800 [thread overview]
|
||||
Message-ID: <20230802072038.29996-4-zhangqing@rock-chips.com> (raw)
|
||||
In-Reply-To: <20230802072038.29996-1-zhangqing@rock-chips.com>
|
||||
|
||||
add PCLK_VO1GRF clk id.
|
||||
|
||||
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
---
|
||||
include/dt-bindings/clock/rockchip,rk3588-cru.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
+++ b/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
@@ -733,8 +733,9 @@
|
||||
#define ACLK_AV1_PRE 718
|
||||
#define PCLK_AV1_PRE 719
|
||||
#define HCLK_SDIO_PRE 720
|
||||
+#define PCLK_VO1GRF 721
|
||||
|
||||
-#define CLK_NR_CLKS (HCLK_SDIO_PRE + 1)
|
||||
+#define CLK_NR_CLKS (PCLK_VO1GRF + 1)
|
||||
|
||||
/* scmi-clocks indices */
|
||||
|
||||
@ -0,0 +1,191 @@
|
||||
From: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
To: mturquette@baylibre.com, sboyd@kernel.org,
|
||||
kever.yang@rock-chips.com, zhangqing@rock-chips.com,
|
||||
heiko@sntech.de
|
||||
Cc: linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
linux-kernel@vger.kernel.org, huangtao@rock-chips.com
|
||||
Subject: [PATCH v3 4/4] clk: rockchip: rk3588: Adjust the GATE_LINK parameter
|
||||
Date: Wed, 2 Aug 2023 15:20:38 +0800 [thread overview]
|
||||
Message-ID: <20230802072038.29996-5-zhangqing@rock-chips.com> (raw)
|
||||
In-Reply-To: <20230802072038.29996-1-zhangqing@rock-chips.com>
|
||||
|
||||
Export PCLK_VO1GRF clk id.
|
||||
Using Id instead of name, if use name needs to use __clk_lookup().
|
||||
But __clk_lookup() is not exported and is not friendly for GKI.
|
||||
|
||||
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 110 ++++++++++++++++--------------
|
||||
1 file changed, 59 insertions(+), 51 deletions(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -12,28 +12,6 @@
|
||||
#include <dt-bindings/clock/rockchip,rk3588-cru.h>
|
||||
#include "clk.h"
|
||||
|
||||
-/*
|
||||
- * Recent Rockchip SoCs have a new hardware block called Native Interface
|
||||
- * Unit (NIU), which gates clocks to devices behind them. These effectively
|
||||
- * need two parent clocks.
|
||||
- *
|
||||
- * Downstream enables the linked clock via runtime PM whenever the gate is
|
||||
- * enabled. This implementation uses separate clock nodes for each of the
|
||||
- * linked gate clocks, which leaks parts of the clock tree into DT.
|
||||
- *
|
||||
- * The GATE_LINK macro instead takes the second parent via 'linkname', but
|
||||
- * ignores the information. Once the clock framework is ready to handle it, the
|
||||
- * information should be passed on here. But since these clocks are required to
|
||||
- * access multiple relevant IP blocks, such as PCIe or USB, we mark all linked
|
||||
- * clocks critical until a better solution is available. This will waste some
|
||||
- * power, but avoids leaking implementation details into DT or hanging the
|
||||
- * system.
|
||||
- */
|
||||
-#define GATE_LINK(_id, cname, pname, linkname, f, o, b, gf) \
|
||||
- GATE(_id, cname, pname, f, o, b, gf)
|
||||
-#define RK3588_LINKED_CLK CLK_IS_CRITICAL
|
||||
-
|
||||
-
|
||||
#define RK3588_GRF_SOC_STATUS0 0x600
|
||||
#define RK3588_PHYREF_ALT_GATE 0xc38
|
||||
|
||||
@@ -1456,7 +1434,7 @@ static struct rockchip_clk_branch rk3588
|
||||
COMPOSITE_NODIV(HCLK_NVM_ROOT, "hclk_nvm_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(77), 0, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(31), 0, GFLAGS),
|
||||
- COMPOSITE(ACLK_NVM_ROOT, "aclk_nvm_root", gpll_cpll_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE(ACLK_NVM_ROOT, "aclk_nvm_root", gpll_cpll_p, 0,
|
||||
RK3588_CLKSEL_CON(77), 7, 1, MFLAGS, 2, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(31), 1, GFLAGS),
|
||||
GATE(ACLK_EMMC, "aclk_emmc", "aclk_nvm_root", 0,
|
||||
@@ -1685,13 +1663,13 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(42), 9, GFLAGS),
|
||||
|
||||
/* vdpu */
|
||||
- COMPOSITE(ACLK_VDPU_ROOT, "aclk_vdpu_root", gpll_cpll_aupll_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE(ACLK_VDPU_ROOT, "aclk_vdpu_root", gpll_cpll_aupll_p, 0,
|
||||
RK3588_CLKSEL_CON(98), 5, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(44), 0, GFLAGS),
|
||||
COMPOSITE_NODIV(ACLK_VDPU_LOW_ROOT, "aclk_vdpu_low_root", mux_400m_200m_100m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(98), 7, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(44), 1, GFLAGS),
|
||||
- COMPOSITE_NODIV(HCLK_VDPU_ROOT, "hclk_vdpu_root", mux_200m_100m_50m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(HCLK_VDPU_ROOT, "hclk_vdpu_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(98), 9, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(44), 2, GFLAGS),
|
||||
COMPOSITE(ACLK_JPEG_DECODER_ROOT, "aclk_jpeg_decoder_root", gpll_cpll_aupll_spll_p, 0,
|
||||
@@ -1742,9 +1720,9 @@ static struct rockchip_clk_branch rk3588
|
||||
COMPOSITE(ACLK_RKVENC0_ROOT, "aclk_rkvenc0_root", gpll_cpll_npll_p, 0,
|
||||
RK3588_CLKSEL_CON(102), 7, 2, MFLAGS, 2, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(47), 1, GFLAGS),
|
||||
- GATE(HCLK_RKVENC0, "hclk_rkvenc0", "hclk_rkvenc0_root", RK3588_LINKED_CLK,
|
||||
+ GATE(HCLK_RKVENC0, "hclk_rkvenc0", "hclk_rkvenc0_root", 0,
|
||||
RK3588_CLKGATE_CON(47), 4, GFLAGS),
|
||||
- GATE(ACLK_RKVENC0, "aclk_rkvenc0", "aclk_rkvenc0_root", RK3588_LINKED_CLK,
|
||||
+ GATE(ACLK_RKVENC0, "aclk_rkvenc0", "aclk_rkvenc0_root", 0,
|
||||
RK3588_CLKGATE_CON(47), 5, GFLAGS),
|
||||
COMPOSITE(CLK_RKVENC0_CORE, "clk_rkvenc0_core", gpll_cpll_aupll_npll_p, 0,
|
||||
RK3588_CLKSEL_CON(102), 14, 2, MFLAGS, 9, 5, DFLAGS,
|
||||
@@ -1754,10 +1732,10 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(48), 6, GFLAGS),
|
||||
|
||||
/* vi */
|
||||
- COMPOSITE(ACLK_VI_ROOT, "aclk_vi_root", gpll_cpll_npll_aupll_spll_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE(ACLK_VI_ROOT, "aclk_vi_root", gpll_cpll_npll_aupll_spll_p, 0,
|
||||
RK3588_CLKSEL_CON(106), 5, 3, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(49), 0, GFLAGS),
|
||||
- COMPOSITE_NODIV(HCLK_VI_ROOT, "hclk_vi_root", mux_200m_100m_50m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(HCLK_VI_ROOT, "hclk_vi_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(106), 8, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(49), 1, GFLAGS),
|
||||
COMPOSITE_NODIV(PCLK_VI_ROOT, "pclk_vi_root", mux_100m_50m_24m_p, 0,
|
||||
@@ -1929,10 +1907,10 @@ static struct rockchip_clk_branch rk3588
|
||||
COMPOSITE(ACLK_VOP_ROOT, "aclk_vop_root", gpll_cpll_dmyaupll_npll_spll_p, 0,
|
||||
RK3588_CLKSEL_CON(110), 5, 3, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(52), 0, GFLAGS),
|
||||
- COMPOSITE_NODIV(ACLK_VOP_LOW_ROOT, "aclk_vop_low_root", mux_400m_200m_100m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(ACLK_VOP_LOW_ROOT, "aclk_vop_low_root", mux_400m_200m_100m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(110), 8, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(52), 1, GFLAGS),
|
||||
- COMPOSITE_NODIV(HCLK_VOP_ROOT, "hclk_vop_root", mux_200m_100m_50m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(HCLK_VOP_ROOT, "hclk_vop_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(110), 10, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(52), 2, GFLAGS),
|
||||
COMPOSITE_NODIV(PCLK_VOP_ROOT, "pclk_vop_root", mux_100m_50m_24m_p, 0,
|
||||
@@ -2433,26 +2411,56 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE(ACLK_AV1, "aclk_av1", "aclk_av1_pre", 0,
|
||||
RK3588_CLKGATE_CON(68), 2, GFLAGS),
|
||||
|
||||
- GATE_LINK(ACLK_ISP1_PRE, "aclk_isp1_pre", "aclk_isp1_root", "aclk_vi_root", 0, RK3588_CLKGATE_CON(26), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_ISP1_PRE, "hclk_isp1_pre", "hclk_isp1_root", "hclk_vi_root", 0, RK3588_CLKGATE_CON(26), 8, GFLAGS),
|
||||
- GATE_LINK(HCLK_NVM, "hclk_nvm", "hclk_nvm_root", "aclk_nvm_root", RK3588_LINKED_CLK, RK3588_CLKGATE_CON(31), 2, GFLAGS),
|
||||
- GATE_LINK(ACLK_USB, "aclk_usb", "aclk_usb_root", "aclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(42), 2, GFLAGS),
|
||||
- GATE_LINK(HCLK_USB, "hclk_usb", "hclk_usb_root", "hclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(42), 3, GFLAGS),
|
||||
- GATE_LINK(ACLK_JPEG_DECODER_PRE, "aclk_jpeg_decoder_pre", "aclk_jpeg_decoder_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(44), 7, GFLAGS),
|
||||
- GATE_LINK(ACLK_VDPU_LOW_PRE, "aclk_vdpu_low_pre", "aclk_vdpu_low_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(44), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_RKVENC1_PRE, "aclk_rkvenc1_pre", "aclk_rkvenc1_root", "aclk_rkvenc0", 0, RK3588_CLKGATE_CON(48), 3, GFLAGS),
|
||||
- GATE_LINK(HCLK_RKVENC1_PRE, "hclk_rkvenc1_pre", "hclk_rkvenc1_root", "hclk_rkvenc0", 0, RK3588_CLKGATE_CON(48), 2, GFLAGS),
|
||||
- GATE_LINK(HCLK_RKVDEC0_PRE, "hclk_rkvdec0_pre", "hclk_rkvdec0_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(40), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_RKVDEC0_PRE, "aclk_rkvdec0_pre", "aclk_rkvdec0_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(40), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
- GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", "aclk_vop_low_root", 0, RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", "hclk_vop_root", 0, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_HDCP1_PRE, "aclk_hdcp1_pre", "aclk_hdcp1_root", "aclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(59), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", "hclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
- GATE_LINK(ACLK_AV1_PRE, "aclk_av1_pre", "aclk_av1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(68), 1, GFLAGS),
|
||||
- GATE_LINK(PCLK_AV1_PRE, "pclk_av1_pre", "pclk_av1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(68), 4, GFLAGS),
|
||||
- GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", "hclk_nvm", 0, RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
+ /*
|
||||
+ * Recent Rockchip SoCs have a new hardware block called Native Interface
|
||||
+ * Unit (NIU), which gates clocks to devices behind them. These effectively
|
||||
+ * need two parent clocks.
|
||||
+ */
|
||||
+ GATE_LINK(ACLK_ISP1_PRE, "aclk_isp1_pre", "aclk_isp1_root", ACLK_VI_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(26), 6, GFLAGS),
|
||||
+ GATE_LINK(HCLK_ISP1_PRE, "hclk_isp1_pre", "hclk_isp1_root", HCLK_VI_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(26), 8, GFLAGS),
|
||||
+ GATE_LINK(HCLK_NVM, "hclk_nvm", "hclk_nvm_root", ACLK_NVM_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(31), 2, GFLAGS),
|
||||
+ GATE_LINK(ACLK_USB, "aclk_usb", "aclk_usb_root", ACLK_VO1USB_TOP_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(42), 2, GFLAGS),
|
||||
+ GATE_LINK(HCLK_USB, "hclk_usb", "hclk_usb_root", HCLK_VO1USB_TOP_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(42), 3, GFLAGS),
|
||||
+ GATE_LINK(ACLK_JPEG_DECODER_PRE, "aclk_jpeg_decoder_pre", "aclk_jpeg_decoder_root",
|
||||
+ ACLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(44), 7, GFLAGS),
|
||||
+ GATE_LINK(ACLK_VDPU_LOW_PRE, "aclk_vdpu_low_pre", "aclk_vdpu_low_root", ACLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(44), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_RKVENC1_PRE, "aclk_rkvenc1_pre", "aclk_rkvenc1_root", ACLK_RKVENC0, 0,
|
||||
+ RK3588_CLKGATE_CON(48), 3, GFLAGS),
|
||||
+ GATE_LINK(HCLK_RKVENC1_PRE, "hclk_rkvenc1_pre", "hclk_rkvenc1_root", HCLK_RKVENC0, 0,
|
||||
+ RK3588_CLKGATE_CON(48), 2, GFLAGS),
|
||||
+ GATE_LINK(HCLK_RKVDEC0_PRE, "hclk_rkvdec0_pre", "hclk_rkvdec0_root", HCLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(40), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_RKVDEC0_PRE, "aclk_rkvdec0_pre", "aclk_rkvdec0_root", ACLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(40), 6, GFLAGS),
|
||||
+ GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", HCLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
+ GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", ACLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", ACLK_VOP_LOW_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", HCLK_VOP_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_HDCP1_PRE, "aclk_hdcp1_pre", "aclk_hdcp1_root", ACLK_VO1USB_TOP_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(59), 6, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", HCLK_VO1USB_TOP_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
+ GATE_LINK(ACLK_AV1_PRE, "aclk_av1_pre", "aclk_av1_root", ACLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(68), 1, GFLAGS),
|
||||
+ GATE_LINK(PCLK_AV1_PRE, "pclk_av1_pre", "pclk_av1_root", HCLK_VDPU_ROOT, 0,
|
||||
+ RK3588_CLKGATE_CON(68), 4, GFLAGS),
|
||||
+ GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", HCLK_NVM, 0,
|
||||
+ RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO0GRF, "pclk_vo0grf", "pclk_vo0_root", HCLK_VO0, CLK_IGNORE_UNUSED,
|
||||
+ RK3588_CLKGATE_CON(55), 10, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO1GRF, "pclk_vo1grf", "pclk_vo1_root", HCLK_VO1, CLK_IGNORE_UNUSED,
|
||||
+ RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
};
|
||||
|
||||
static void __init rk3588_clk_init(struct device_node *np)
|
||||
@ -1,4 +1,4 @@
|
||||
From 3a68da76b9f07f81f59e61e4c21d405373bbd1fa Mon Sep 17 00:00:00 2001
|
||||
From b4174689243599ca10187ec1c98c9e045c9d19d5 Mon Sep 17 00:00:00 2001
|
||||
From: Frank Wang <frank.wang@rock-chips.com>
|
||||
Date: Tue, 25 Apr 2023 15:55:54 +0200
|
||||
Subject: [PATCH] phy: rockchip: add usbdp combo phy driver
|
||||
|
||||
@ -0,0 +1,86 @@
|
||||
From c686cce2ef2634168938e37caa2a0f8e1de65a94 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 20 Jul 2023 18:59:37 +0200
|
||||
Subject: [PATCH] usb: dwc3: add optional PHY interface clocks
|
||||
|
||||
On Rockchip RK3588 one of the DWC3 cores is integrated weirdly and
|
||||
requires two extra clocks to be enabled. Without these extra clocks
|
||||
hot-plugging USB devices is broken.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/usb/dwc3/core.c | 26 ++++++++++++++++++++++++++
|
||||
drivers/usb/dwc3/core.h | 4 ++++
|
||||
2 files changed, 30 insertions(+)
|
||||
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -821,8 +821,20 @@ static int dwc3_clk_enable(struct dwc3 *
|
||||
if (ret)
|
||||
goto disable_ref_clk;
|
||||
|
||||
+ ret = clk_prepare_enable(dwc->utmi_clk);
|
||||
+ if (ret)
|
||||
+ goto disable_susp_clk;
|
||||
+
|
||||
+ ret = clk_prepare_enable(dwc->pipe_clk);
|
||||
+ if (ret)
|
||||
+ goto disable_utmi_clk;
|
||||
+
|
||||
return 0;
|
||||
|
||||
+disable_utmi_clk:
|
||||
+ clk_disable_unprepare(dwc->utmi_clk);
|
||||
+disable_susp_clk:
|
||||
+ clk_disable_unprepare(dwc->susp_clk);
|
||||
disable_ref_clk:
|
||||
clk_disable_unprepare(dwc->ref_clk);
|
||||
disable_bus_clk:
|
||||
@@ -832,6 +844,8 @@ disable_bus_clk:
|
||||
|
||||
static void dwc3_clk_disable(struct dwc3 *dwc)
|
||||
{
|
||||
+ clk_disable_unprepare(dwc->pipe_clk);
|
||||
+ clk_disable_unprepare(dwc->utmi_clk);
|
||||
clk_disable_unprepare(dwc->susp_clk);
|
||||
clk_disable_unprepare(dwc->ref_clk);
|
||||
clk_disable_unprepare(dwc->bus_clk);
|
||||
@@ -1854,6 +1868,18 @@ static int dwc3_probe(struct platform_de
|
||||
goto put_usb_psy;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ dwc->utmi_clk = devm_clk_get_optional(dev, "utmi");
|
||||
+ if (IS_ERR(dwc->utmi_clk)) {
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->utmi_clk),
|
||||
+ "could not get utmi clock\n");
|
||||
+ }
|
||||
+
|
||||
+ dwc->pipe_clk = devm_clk_get_optional(dev, "pipe");
|
||||
+ if (IS_ERR(dwc->pipe_clk)) {
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->pipe_clk),
|
||||
+ "could not get pipe clock\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
ret = reset_control_deassert(dwc->reset);
|
||||
--- a/drivers/usb/dwc3/core.h
|
||||
+++ b/drivers/usb/dwc3/core.h
|
||||
@@ -989,6 +989,8 @@ struct dwc3_scratchpad_array {
|
||||
* @bus_clk: clock for accessing the registers
|
||||
* @ref_clk: reference clock
|
||||
* @susp_clk: clock used when the SS phy is in low power (S3) state
|
||||
+ * @utmi_clk: clock used for USB2 PHY communication
|
||||
+ * @pipe_clk: clock used for USB3 PHY communication
|
||||
* @reset: reset control
|
||||
* @regs: base address for our registers
|
||||
* @regs_size: address space size
|
||||
@@ -1153,6 +1155,8 @@ struct dwc3 {
|
||||
struct clk *bus_clk;
|
||||
struct clk *ref_clk;
|
||||
struct clk *susp_clk;
|
||||
+ struct clk *utmi_clk;
|
||||
+ struct clk *pipe_clk;
|
||||
|
||||
struct reset_control *reset;
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
From 2d51b382bcd4b05d944b55d483caac1fda338908 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 28 Jul 2023 16:43:16 +0200
|
||||
Subject: [PATCH] usb: typec: tcpm: avoid graph warning
|
||||
|
||||
When using a devicetree as described in commit d56de8c9a17d ("usb:
|
||||
typec: tcpm: try to get role switch from tcpc fwnode"), the kernel
|
||||
will print an error when probing the TCPM driver, which looks
|
||||
similar to this:
|
||||
|
||||
OF: graph: no port node found in /i2c@feac0000/usb-typec@22
|
||||
|
||||
This is a false positive, since the code first tries to find a ports
|
||||
node for the device and only then checks the fwnode. Fix this by
|
||||
swapping the order.
|
||||
|
||||
Note, that this will now generate a error message for devicetrees with
|
||||
a role-switch ports node directly in the TCPM node instead of in the
|
||||
connectors sub-node, before falling back to the legacy behaviour. These
|
||||
devicetrees generate warnings when being checked against the bindings,
|
||||
and should be fixed.
|
||||
|
||||
Fixes: d56de8c9a17d ("usb: typec: tcpm: try to get role switch from tcpc fwnode")
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/usb/typec/tcpm/tcpm.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/usb/typec/tcpm/tcpm.c
|
||||
+++ b/drivers/usb/typec/tcpm/tcpm.c
|
||||
@@ -6540,9 +6540,9 @@ struct tcpm_port *tcpm_register_port(str
|
||||
port->partner_desc.identity = &port->partner_ident;
|
||||
port->port_type = port->typec_caps.type;
|
||||
|
||||
- port->role_sw = usb_role_switch_get(port->dev);
|
||||
+ port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode);
|
||||
if (!port->role_sw)
|
||||
- port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode);
|
||||
+ port->role_sw = usb_role_switch_get(port->dev);
|
||||
if (IS_ERR(port->role_sw)) {
|
||||
err = PTR_ERR(port->role_sw);
|
||||
goto out_destroy_wq;
|
||||
@ -1,4 +1,4 @@
|
||||
From 9afd072bbcb97efccf1be82515cbe4ba682cce38 Mon Sep 17 00:00:00 2001
|
||||
From 28ecb034639296ac27116d4d021ad0ece172cab1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Mon, 17 Apr 2023 20:03:08 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588: add PCIe2 support
|
||||
@ -8,15 +8,17 @@ also has two PCIe3 IP blocks, that will be handled separately.
|
||||
|
||||
Co-developed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
Tested-by: Jagan Teki <jagan@edgeble.ai> # edgeble-neu6a, 6b
|
||||
Reviewed-by: Jagan Teki <jagan@edgeble.ai>
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 54 +++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 108 ++++++++++++++++++++++
|
||||
2 files changed, 162 insertions(+)
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 51 +++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 102 ++++++++++++++++++++++
|
||||
2 files changed, 153 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -187,6 +187,60 @@
|
||||
@@ -187,6 +187,57 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -45,9 +47,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ <0 0 0 3 &pcie2x1l0_intc 2>,
|
||||
+ <0 0 0 4 &pcie2x1l0_intc 3>;
|
||||
+ linux,pci-domain = <2>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-ob-windows = <8>;
|
||||
+ num-viewport = <4>;
|
||||
+ max-link-speed = <2>;
|
||||
+ msi-map = <0x2000 &its0 0x2000 0x1000>;
|
||||
+ num-lanes = <1>;
|
||||
@ -79,7 +78,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
reg = <0x0 0xfe1b0000 0x0 0x10000>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -1670,6 +1670,114 @@
|
||||
@@ -1670,6 +1670,108 @@
|
||||
reg = <0x0 0xfdf82200 0x0 0x20>;
|
||||
};
|
||||
|
||||
@ -108,9 +107,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ <0 0 0 3 &pcie2x1l1_intc 2>,
|
||||
+ <0 0 0 4 &pcie2x1l1_intc 3>;
|
||||
+ linux,pci-domain = <3>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-ob-windows = <8>;
|
||||
+ num-viewport = <4>;
|
||||
+ max-link-speed = <2>;
|
||||
+ msi-map = <0x3000 &its0 0x3000 0x1000>;
|
||||
+ num-lanes = <1>;
|
||||
@ -162,9 +158,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ <0 0 0 3 &pcie2x1l2_intc 2>,
|
||||
+ <0 0 0 4 &pcie2x1l2_intc 3>;
|
||||
+ linux,pci-domain = <4>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-ob-windows = <8>;
|
||||
+ num-viewport = <4>;
|
||||
+ max-link-speed = <2>;
|
||||
+ msi-map = <0x4000 &its0 0x4000 0x1000>;
|
||||
+ num-lanes = <1>;
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
From 78432c7d9799a549c185482ac65f08d671098d4c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 18 Jul 2023 18:57:15 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s: Add USB3 host controller
|
||||
|
||||
RK3588 has three USB3 controllers. This adds the host-only controller,
|
||||
which is using the naneng-combphy shared with PCIe and SATA.
|
||||
|
||||
The other two are dual-role and using a different PHY that is not yet
|
||||
supported upstream.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -876,6 +876,27 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ usb_host2_xhci: usb@fcd00000 {
|
||||
+ compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
|
||||
+ reg = <0x0 0xfcd00000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ clocks = <&cru REF_CLK_USB3OTG2>, <&cru SUSPEND_CLK_USB3OTG2>,
|
||||
+ <&cru ACLK_USB3OTG2>, <&cru CLK_UTMI_OTG2>,
|
||||
+ <&cru CLK_PIPEPHY2_PIPE_U3_G>;
|
||||
+ clock-names = "ref_clk", "suspend_clk", "bus_clk", "utmi", "pipe";
|
||||
+ dr_mode = "host";
|
||||
+ phys = <&combphy2_psu PHY_TYPE_USB3>;
|
||||
+ phy-names = "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ resets = <&cru SRST_A_USB3OTG2>;
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ snps,dis_rxdet_inp3_quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
sys_grf: syscon@fd58c000 {
|
||||
compatible = "rockchip,rk3588-sys-grf", "syscon";
|
||||
reg = <0x0 0xfd58c000 0x0 0x1000>;
|
||||
@ -1,141 +0,0 @@
|
||||
From c062260a0e652da798f7130ec25c6452957456d5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Apr 2023 18:17:19 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s: Add USB3 controllers
|
||||
|
||||
Add all USB3 controllers.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 29 ++++++++++-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 60 ++++++++++++++++++++++-
|
||||
2 files changed, 87 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -7,6 +7,34 @@
|
||||
#include "rk3588-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
+ usbdrd3_1: usb@fc400000 {
|
||||
+ compatible = "rockchip,rk3588-dwc3-otg", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru REF_CLK_USB3OTG1>, <&cru SUSPEND_CLK_USB3OTG1>,
|
||||
+ <&cru ACLK_USB3OTG1>;
|
||||
+ clock-names = "ref", "suspend", "bus";
|
||||
+ ranges;
|
||||
+ resets = <&cru SRST_A_USB3OTG1>;
|
||||
+ reset-names = "usb3-otg";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdrd_dwc3_1: usb@fc400000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xfc400000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ power-domains = <&power RK3588_PD_USB>;
|
||||
+ dr_mode = "host";
|
||||
+ phys = <&u2phy1_otg>, <&usbdp_phy1_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pcie30_phy_grf: syscon@fd5b8000 {
|
||||
compatible = "rockchip,rk3588-pcie3-phy-grf", "syscon";
|
||||
reg = <0x0 0xfd5b8000 0x0 0x10000>;
|
||||
@@ -39,7 +67,6 @@
|
||||
clock-names = "phyclk";
|
||||
clock-output-names = "usb480m_phy1";
|
||||
#clock-cells = <0>;
|
||||
- rockchip,usbctrl-grf = <&usb_grf>;
|
||||
status = "disabled";
|
||||
|
||||
u2phy1_otg: otg-port {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -832,6 +832,36 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ usbdrd3_0: usb@fc000000 {
|
||||
+ compatible = "rockchip,rk3588-dwc3-otg", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru REF_CLK_USB3OTG0>, <&cru SUSPEND_CLK_USB3OTG0>,
|
||||
+ <&cru ACLK_USB3OTG0>;
|
||||
+ clock-names = "ref", "suspend", "bus";
|
||||
+ ranges;
|
||||
+ resets = <&cru SRST_A_USB3OTG0>;
|
||||
+ reset-names = "usb3-otg";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdrd_dwc3_0: usb@fc000000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xfc000000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ power-domains = <&power RK3588_PD_USB>;
|
||||
+ dr_mode = "otg";
|
||||
+ phys = <&u2phy0_otg>, <&usbdp_phy0_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u1-entry-quirk;
|
||||
+ snps,dis-u2-entry-quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb_host0_ehci: usb@fc800000 {
|
||||
compatible = "rockchip,rk3588-ehci", "generic-ehci";
|
||||
reg = <0x0 0xfc800000 0x0 0x40000>;
|
||||
@@ -876,6 +906,35 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ usbhost3_0: usb@fcd00000 {
|
||||
+ compatible = "rockchip,rk3588-dwc3-host", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru REF_CLK_USB3OTG2>, <&cru SUSPEND_CLK_USB3OTG2>,
|
||||
+ <&cru ACLK_USB3OTG2>, <&cru CLK_UTMI_OTG2>,
|
||||
+ <&cru PCLK_PHP_ROOT>, <&cru CLK_PIPEPHY2_PIPE_U3_G>;
|
||||
+ clock-names = "ref", "suspend", "bus", "utmi", "php", "pipe";
|
||||
+ ranges;
|
||||
+ resets = <&cru SRST_A_USB3OTG2>;
|
||||
+ reset-names = "usb3-host";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbhost_dwc3_0: usb@fcd00000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xfcd00000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ dr_mode = "host";
|
||||
+ phys = <&combphy2_psu PHY_TYPE_USB3>;
|
||||
+ phy-names = "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ snps,dis_rxdet_inp3_quirk;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
sys_grf: syscon@fd58c000 {
|
||||
compatible = "rockchip,rk3588-sys-grf", "syscon";
|
||||
reg = <0x0 0xfd58c000 0x0 0x1000>;
|
||||
@@ -923,7 +982,6 @@
|
||||
clock-names = "phyclk";
|
||||
clock-output-names = "usb480m_phy0";
|
||||
#clock-cells = <0>;
|
||||
- rockchip,usbctrl-grf = <&usb_grf>;
|
||||
status = "disabled";
|
||||
|
||||
u2phy0_otg: otg-port {
|
||||
@ -1,4 +1,4 @@
|
||||
From 15e8ed9380726e7f27c886faa43df7be484f61e8 Mon Sep 17 00:00:00 2001
|
||||
From 7406ff837bff290c20e7b69fd08b1ec853e41a7f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Apr 2023 17:49:04 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s: Add USBDP phy nodes
|
||||
@ -7,13 +7,13 @@ Add both USB3-Displayport PHYs from RK3588.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 63 +++++++++++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 74 +++++++++++++++++++++++
|
||||
2 files changed, 137 insertions(+)
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 62 +++++++++++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 73 +++++++++++++++++++++++
|
||||
2 files changed, 135 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -17,6 +17,38 @@
|
||||
@@ -17,6 +17,37 @@
|
||||
reg = <0x0 0xfd5c0000 0x0 0x100>;
|
||||
};
|
||||
|
||||
@ -39,7 +39,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ clock-names = "phyclk";
|
||||
+ clock-output-names = "usb480m_phy1";
|
||||
+ #clock-cells = <0>;
|
||||
+ rockchip,usbctrl-grf = <&usb_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ u2phy1_otg: otg-port {
|
||||
@ -52,7 +51,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
i2s8_8ch: i2s@fddc8000 {
|
||||
compatible = "rockchip,rk3588-i2s-tdm";
|
||||
reg = <0x0 0xfddc8000 0x0 0x1000>;
|
||||
@@ -313,6 +345,37 @@
|
||||
@@ -310,6 +341,37 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -92,10 +91,15 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
reg = <0x0 0xfee10000 0x0 0x100>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -906,6 +906,33 @@
|
||||
@@ -927,6 +927,37 @@
|
||||
reg = <0x0 0xfd5c4000 0x0 0x100>;
|
||||
};
|
||||
|
||||
+ usbdpphy0_grf: syscon@fd5c8000 {
|
||||
+ compatible = "rockchip,rk3588-usbdpphy-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5c8000 0x0 0x4000>;
|
||||
+ };
|
||||
+
|
||||
+ usb2phy0_grf: syscon@fd5d0000 {
|
||||
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon",
|
||||
+ "simple-mfd";
|
||||
@ -113,7 +117,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ clock-names = "phyclk";
|
||||
+ clock-output-names = "usb480m_phy0";
|
||||
+ #clock-cells = <0>;
|
||||
+ rockchip,usbctrl-grf = <&usb_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ u2phy0_otg: otg-port {
|
||||
@ -126,7 +129,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
usb2phy2_grf: syscon@fd5d8000 {
|
||||
compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xfd5d8000 0x0 0x4000>;
|
||||
@@ -931,6 +958,17 @@
|
||||
@@ -952,6 +983,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -144,19 +147,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
usb2phy3_grf: syscon@fd5dc000 {
|
||||
compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xfd5dc000 0x0 0x4000>;
|
||||
@@ -956,6 +994,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ usbdpphy0_grf: syscon@fd5c8000 {
|
||||
+ compatible = "rockchip,rk3588-usbdpphy-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5c8000 0x0 0x4000>;
|
||||
+ };
|
||||
+
|
||||
ioc: syscon@fd5f0000 {
|
||||
compatible = "rockchip,rk3588-ioc", "syscon";
|
||||
reg = <0x0 0xfd5f0000 0x0 0x10000>;
|
||||
@@ -2646,6 +2689,37 @@
|
||||
@@ -2661,6 +2703,37 @@
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
From 2ec7b70a0fa910b0d86636193b1d405ec778aba4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 18 Jul 2023 19:05:38 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s: Add USB3 DRD controllers
|
||||
|
||||
Add both USB3 dual-role controllers to the RK3588 devicetree.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 20 ++++++++++++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 22 ++++++++++++++++++++++
|
||||
2 files changed, 42 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -7,6 +7,26 @@
|
||||
#include "rk3588-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
+ usb_host1_xhci: usb@fc400000 {
|
||||
+ compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
|
||||
+ reg = <0x0 0xfc400000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ clocks = <&cru REF_CLK_USB3OTG1>, <&cru SUSPEND_CLK_USB3OTG1>,
|
||||
+ <&cru ACLK_USB3OTG1>;
|
||||
+ clock-names = "ref_clk", "suspend_clk", "bus_clk";
|
||||
+ dr_mode = "host";
|
||||
+ phys = <&u2phy1_otg>, <&usbdp_phy1_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ power-domains = <&power RK3588_PD_USB>;
|
||||
+ resets = <&cru SRST_A_USB3OTG1>;
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
pcie30_phy_grf: syscon@fd5b8000 {
|
||||
compatible = "rockchip,rk3588-pcie3-phy-grf", "syscon";
|
||||
reg = <0x0 0xfd5b8000 0x0 0x10000>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -832,6 +832,28 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ usb_host0_xhci: usb@fc000000 {
|
||||
+ compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
|
||||
+ reg = <0x0 0xfc000000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ clocks = <&cru REF_CLK_USB3OTG0>, <&cru SUSPEND_CLK_USB3OTG0>,
|
||||
+ <&cru ACLK_USB3OTG0>;
|
||||
+ clock-names = "ref_clk", "suspend_clk", "bus_clk";
|
||||
+ dr_mode = "otg";
|
||||
+ phys = <&u2phy0_otg>, <&usbdp_phy0_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ power-domains = <&power RK3588_PD_USB>;
|
||||
+ resets = <&cru SRST_A_USB3OTG0>;
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u1-entry-quirk;
|
||||
+ snps,dis-u2-entry-quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
usb_host0_ehci: usb@fc800000 {
|
||||
compatible = "rockchip,rk3588-ehci", "generic-ehci";
|
||||
reg = <0x0 0xfc800000 0x0 0x40000>;
|
||||
@ -0,0 +1,97 @@
|
||||
From e6253fdf8d3cdc70424fb8f53929b013a0cc60b3 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 11 Jul 2023 17:20:47 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-evb1: add PCIe3 bus
|
||||
|
||||
Enable PCIe3 support, which is exposed via a PCIe3 connector.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 55 +++++++++++++++++++
|
||||
1 file changed, 55 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -29,6 +29,26 @@
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
};
|
||||
|
||||
+ pcie30_avdd0v75: pcie30-avdd0v75-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie30_avdd0v75";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+ vin-supply = <&avdd_0v75_s0>;
|
||||
+ };
|
||||
+
|
||||
+ pcie30_avdd1v8: pcie30-avdd1v8-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie30_avdd1v8";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ vin-supply = <&avcc_1v8_s0>;
|
||||
+ };
|
||||
+
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
@@ -38,6 +58,19 @@
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie30";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
+ startup-delay-us = <5000>;
|
||||
+ vin-supply = <&vcc12v_dcin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc3v3_pcie30_en>;
|
||||
+ };
|
||||
+
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -209,6 +242,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&pcie30phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie3x4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie3_reset>;
|
||||
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
rtl8111 {
|
||||
rtl8111_isolate: rtl8111-isolate {
|
||||
@@ -229,6 +274,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ pcie3 {
|
||||
+ pcie3_reset: pcie3-reset {
|
||||
+ rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pcie30_en: vcc3v3-pcie30-en {
|
||||
+ rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@ -12,8 +12,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -30,6 +30,26 @@
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
@@ -49,6 +49,26 @@
|
||||
vin-supply = <&avcc_1v8_s0>;
|
||||
};
|
||||
|
||||
+ pcie30_avdd0v75: pcie30-avdd0v75-regulator {
|
||||
@ -39,8 +39,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
@@ -39,6 +59,19 @@
|
||||
regulator-max-microvolt = <12000000>;
|
||||
@@ -71,6 +91,19 @@
|
||||
pinctrl-0 = <&vcc3v3_pcie30_en>;
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -222,6 +255,18 @@
|
||||
@@ -254,6 +287,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -78,7 +78,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&pinctrl {
|
||||
rtl8111 {
|
||||
rtl8111_isolate: rtl8111-isolate {
|
||||
@@ -242,6 +287,16 @@
|
||||
@@ -274,6 +319,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -92,6 +92,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
pcie3 {
|
||||
pcie3_reset: pcie3-reset {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 3b53c3be9599f04e6ac116ea89bd2c93a420b00b Mon Sep 17 00:00:00 2001
|
||||
From 712da43d72dd301f8a6f3fcf6b39031558cb288f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 26 Apr 2023 21:18:43 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-evb1: add USB3
|
||||
@ -8,8 +8,8 @@ connector.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 149 ++++++++++++++++++
|
||||
1 file changed, 149 insertions(+)
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 144 ++++++++++++++++++
|
||||
1 file changed, 144 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -101,6 +102,18 @@
|
||||
@@ -167,6 +168,18 @@
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&avcc_1v8_s0>;
|
||||
};
|
||||
@ -40,103 +40,10 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
@@ -234,6 +247,16 @@
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ usb-typec {
|
||||
+ usbc0_int: usbc0-int {
|
||||
+ rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ typec5v_pwren: typec5v-pwren {
|
||||
+ rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -902,3 +925,129 @@
|
||||
&usb_host1_ohci {
|
||||
@@ -242,6 +255,56 @@
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usbdp_phy0 {
|
||||
+ orientation-switch;
|
||||
+ mode-switch;
|
||||
+ sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usbdp_phy0_orientation_switch: endpoint@0 {
|
||||
+ reg = <0>;
|
||||
+ remote-endpoint = <&usbc0_orien_sw>;
|
||||
+ };
|
||||
+
|
||||
+ usbdp_phy0_dp_altmode_mux: endpoint@1 {
|
||||
+ reg = <1>;
|
||||
+ remote-endpoint = <&dp_altmode_mux>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ dr_mode = "otg";
|
||||
+ usb-role-switch;
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ dwc3_0_role_switch: endpoint@0 {
|
||||
+ reg = <0>;
|
||||
+ remote-endpoint = <&usbc0_role_sw>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1 {
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
|
||||
+ usbc0: usb-typec@22 {
|
||||
+ compatible = "fcs,fusb302";
|
||||
+ reg = <0x22>;
|
||||
@ -186,4 +93,106 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
@@ -344,6 +407,16 @@
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ usb-typec {
|
||||
+ usbc0_int: usbc0-int {
|
||||
+ rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ typec5v_pwren: typec5v-pwren {
|
||||
+ rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -970,6 +1043,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1012,3 +1101,58 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usbdp_phy0 {
|
||||
+ orientation-switch;
|
||||
+ mode-switch;
|
||||
+ sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usbdp_phy0_orientation_switch: endpoint@0 {
|
||||
+ reg = <0>;
|
||||
+ remote-endpoint = <&usbc0_orien_sw>;
|
||||
+ };
|
||||
+
|
||||
+ usbdp_phy0_dp_altmode_mux: endpoint@1 {
|
||||
+ reg = <1>;
|
||||
+ remote-endpoint = <&dp_altmode_mux>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1 {
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "otg";
|
||||
+ usb-role-switch;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ dwc3_0_role_switch: endpoint@0 {
|
||||
+ reg = <0>;
|
||||
+ remote-endpoint = <&usbc0_role_sw>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -0,0 +1,74 @@
|
||||
From 5ebbc365e6a30a5d0b36b82dc67cfc12b5aeaeb4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 15:47:00 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-evb1: add ADC buttons
|
||||
|
||||
The Rockchip EVB1 has a couple of buttons connected via an ADC
|
||||
line. Let's add them to its devicetree.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -7,6 +7,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
#include "rk3588.dtsi"
|
||||
@@ -24,6 +25,38 @@
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
+ adc-keys {
|
||||
+ compatible = "adc-keys";
|
||||
+ io-channels = <&saradc 1>;
|
||||
+ io-channel-names = "buttons";
|
||||
+ keyup-threshold-microvolt = <1800000>;
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ button-vol-up {
|
||||
+ label = "Volume Up";
|
||||
+ linux,code = <KEY_VOLUMEUP>;
|
||||
+ press-threshold-microvolt = <17000>;
|
||||
+ };
|
||||
+
|
||||
+ button-vol-down {
|
||||
+ label = "Volume Down";
|
||||
+ linux,code = <KEY_VOLUMEDOWN>;
|
||||
+ press-threshold-microvolt = <417000>;
|
||||
+ };
|
||||
+
|
||||
+ button-menu {
|
||||
+ label = "Menu";
|
||||
+ linux,code = <KEY_MENU>;
|
||||
+ press-threshold-microvolt = <890000>;
|
||||
+ };
|
||||
+
|
||||
+ button-escape {
|
||||
+ label = "Escape";
|
||||
+ linux,code = <KEY_ESC>;
|
||||
+ press-threshold-microvolt = <1235000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
power-supply = <&vcc12v_dcin>;
|
||||
@@ -423,6 +456,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_1v8_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
@ -0,0 +1,37 @@
|
||||
From 26123b03c3188b29cfd4500a9e0ed0d23dc1625f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 15:19:37 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s-rock5a: add USB3 host
|
||||
|
||||
Enable USB3 host controller for the Radxa ROCK 5 Model A. This adds
|
||||
USB3 for the lower USB3 port (the one closer to the PCB).
|
||||
|
||||
The upper USB3 port uses the RK3588 USB TypeC host controller, which
|
||||
uses a different PHY that is not yet supported upstream.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -114,6 +114,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&combphy2_psu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -735,3 +739,7 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb_host2_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -0,0 +1,58 @@
|
||||
From a6000cf17b43c6e953c9f75bfc05ace3d2fd72fe Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Mon, 24 Jul 2023 15:18:39 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock5a: add cpu mem regulator info
|
||||
|
||||
Add the second supply regulator for the CPU cores, which is used
|
||||
for supplying the memory interface.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -120,34 +120,42 @@
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
@ -0,0 +1,58 @@
|
||||
From 13d151bdf54a84410c27b76ac5dd9c66b9dbaff2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 16:30:46 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s-rock5a: add upper USB3 port
|
||||
|
||||
Enable full support (XHCI, EHCI, OHCI) for the upper USB3 port from
|
||||
Radxa Rock 5 Model A.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588s-rock-5a.dts | 22 +++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -707,6 +707,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -730,6 +738,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy0 {
|
||||
+ status = "okay";
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
@@ -740,6 +757,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@ -1,4 +1,4 @@
|
||||
From 3a0dbc8a3fc183503f847fc21976026044021285 Mon Sep 17 00:00:00 2001
|
||||
From 9d2a342309d3a880b9b6fe53bbb0b563f8aad671 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 28 Feb 2023 14:40:59 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock-5b: add PCIe network controller
|
||||
@ -8,8 +8,8 @@ PCIe.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 20 +++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 27 +++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@ -29,18 +29,42 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -646,3 +655,14 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
@@ -96,6 +105,10 @@
|
||||
};
|
||||
};
|
||||
+
|
||||
|
||||
+&combphy0_ps {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -222,6 +235,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie2x1l2 {
|
||||
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_2_rst>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
@@ -241,6 +262,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ pcie2 {
|
||||
+ pcie2_2_rst: pcie2-2-rst {
|
||||
+ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 72ec5f3a720b860f62d43a82924e75ea5e3cacb0 Mon Sep 17 00:00:00 2001
|
||||
From 94b8daf5572058c8be8ea9445c91d5ea54a1fd2d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 14 Jul 2023 19:19:29 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock-5b: add PCIe 3x4 support
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock-5b: add PCIe for M.2 M-key
|
||||
|
||||
The Radxa Rock 5B has PCIe 3x4 routed to its M.2 M-key connector
|
||||
on the board's back.
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie30: vcc3v3-pcie30 {
|
||||
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie30";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
@ -33,8 +33,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -231,6 +244,18 @@
|
||||
};
|
||||
@@ -243,6 +256,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&pcie30phy {
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&pinctrl {
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
@@ -250,6 +275,16 @@
|
||||
@@ -268,6 +293,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
From 93900c0c70cf280330fa5e7c6e727f77d0677065 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 17:43:58 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock-5b: add PCIe for M.2 E-Key
|
||||
|
||||
Enable PCIe2_0 controller and its voltage supply, which is routed
|
||||
to the M.2 E-Key on the upper side of the Radxa Rock 5B.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 35 +++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -51,6 +51,21 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie2x1l0";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ enable-active-high;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_0_vcc3v3_en>;
|
||||
+ startup-delay-us = <50000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie2x1l2";
|
||||
@@ -122,6 +137,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&combphy1_ps {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -248,6 +267,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie2x1l0 {
|
||||
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_0_rst>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
|
||||
@@ -288,6 +315,14 @@
|
||||
};
|
||||
|
||||
pcie2 {
|
||||
+ pcie2_0_rst: pcie2-0-rst {
|
||||
+ rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ pcie2_0_vcc3v3_en: pcie2-0-vcc-en {
|
||||
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
pcie2_2_rst: pcie2-2-rst {
|
||||
rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
@ -1,4 +1,4 @@
|
||||
From 2dc513256933639c4ffef827244379375179ecbb Mon Sep 17 00:00:00 2001
|
||||
From 78299f59cc6164ca5d57affa3655358f67d6442b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 19 Jul 2023 15:56:42 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-rock5b: add USB3 host
|
||||
@ -17,8 +17,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -118,6 +118,10 @@
|
||||
};
|
||||
@@ -141,6 +141,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&combphy2_psu {
|
||||
@ -28,11 +28,11 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -701,3 +705,7 @@
|
||||
@@ -743,3 +747,7 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
|
||||
};
|
||||
+
|
||||
+&usbhost3_0 {
|
||||
+&usb_host2_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
From 3b70b9529d63d21f0ed03c332d8877b63b968d10 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Mon, 24 Jul 2023 15:07:49 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock5b: add cpu mem regulator info
|
||||
|
||||
Add the second supply regulator for the CPU cores, which is used
|
||||
for supplying the memory interface.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -147,34 +147,42 @@
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
@ -0,0 +1,56 @@
|
||||
From 9d4238932a628f850be3e14ec91d00efe4bb6ba5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 17:18:17 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-rock5b: add lower USB3 port
|
||||
|
||||
Enable full support (XHCI, EHCI, OHCI) for the lower USB3 port from
|
||||
Radxa Rock 5 Model B.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 20 +++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -721,6 +721,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -740,6 +748,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -756,6 +772,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
@ -0,0 +1,190 @@
|
||||
From 691e7aaeca265abd4fdadef3e407c16bebec0ca6 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 18:35:56 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-rock5b: add USB-C support
|
||||
|
||||
Add support for using the Radxa Rock 5 Model B USB-C port for USB in
|
||||
OHCI, EHCI or XHCI mode. Displayport AltMode is not yet supported.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 119 ++++++++++++++++++
|
||||
1 file changed, 119 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -51,6 +52,15 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
+ vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc12v_dcin";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie2x1l0";
|
||||
@@ -120,6 +130,7 @@
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
@@ -225,6 +236,61 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c4m1_xfer>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ usbc0: usb-typec@22 {
|
||||
+ compatible = "fcs,fusb302";
|
||||
+ reg = <0x22>;
|
||||
+ interrupt-parent = <&gpio3>;
|
||||
+ interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&usbc0_int>;
|
||||
+ vbus-supply = <&vcc12v_dcin>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ usb_con: connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
+ label = "USB-C";
|
||||
+ data-role = "dual";
|
||||
+ power-role = "sink";
|
||||
+ try-power-role = "sink";
|
||||
+ op-sink-microwatt = <1000000>;
|
||||
+ sink-pdos =
|
||||
+ <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
|
||||
+ <PDO_VAR(5000, 20000, 5000)>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ usbc0_hs: endpoint {
|
||||
+ remote-endpoint = <&usb_host0_xhci_drd_sw>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ usbc0_ss: endpoint {
|
||||
+ remote-endpoint = <&usbdp_phy0_typec_ss>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ usbc0_sbu: endpoint {
|
||||
+ remote-endpoint = <&usbdp_phy0_typec_sbu>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
|
||||
@@ -354,6 +420,10 @@
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
+
|
||||
+ usbc0_int: usbc0-int {
|
||||
+ rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -721,6 +791,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -756,6 +834,33 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy0 {
|
||||
+ orientation-switch;
|
||||
+ mode-switch;
|
||||
+ sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usbdp_phy0_typec_ss: endpoint@0 {
|
||||
+ reg = <0>;
|
||||
+ remote-endpoint = <&usbc0_ss>;
|
||||
+ };
|
||||
+
|
||||
+ usbdp_phy0_typec_sbu: endpoint@1 {
|
||||
+ reg = <1>;
|
||||
+ remote-endpoint = <&usbc0_sbu>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -764,6 +869,20 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_xhci {
|
||||
+ usb-role-switch;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usb_host0_xhci_drd_sw: endpoint {
|
||||
+ remote-endpoint = <&usbc0_hs>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@ -11,7 +11,7 @@ Change-Id: Ifb8964053daa6b593dd2c2c6a3b8caab8526e56d
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -2025,6 +2025,17 @@
|
||||
@@ -2003,6 +2003,17 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Change-Id: I49994529fcc209c2bc173c1abc497536fb920302
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -2029,7 +2029,7 @@
|
||||
@@ -2007,7 +2007,7 @@
|
||||
compatible = "rockchip,trngv1";
|
||||
reg = <0x0 0xfe378000 0x0 0x200>;
|
||||
interrupts = <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
status = "okay";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -300,6 +300,10 @@
|
||||
@@ -431,6 +431,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user