mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Compare commits
20 Commits
revert-750
...
rk3588-6.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
696fb556ae | ||
|
|
496233e11a | ||
|
|
c868bc16b9 | ||
|
|
71aef28568 | ||
|
|
d5ed3de06f | ||
|
|
c7f6f89c2a | ||
|
|
b4fefa348c | ||
|
|
5ebec11963 | ||
|
|
2baccd6739 | ||
|
|
f9b3aa0010 | ||
|
|
ad99f690df | ||
|
|
78bcfdea68 | ||
|
|
49bc6718f9 | ||
|
|
2724aaf190 | ||
|
|
fa9b0d40bf | ||
|
|
1729ce262c | ||
|
|
d687cfbddb | ||
|
|
b7e9509d93 | ||
|
|
1370ecce48 | ||
|
|
f474d41a81 |
11138
config/kernel/linux-rockchip-rk3588-6.12.config
Normal file
11138
config/kernel/linux-rockchip-rk3588-6.12.config
Normal file
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ case $BRANCH in
|
||||
edge)
|
||||
# Branch based on the latest kernel release including RC releases, to benefit from the latest RK3588 mainline advancements. Might be unstable!
|
||||
LINUXFAMILY=rockchip-rk3588
|
||||
KERNEL_MAJOR_MINOR="6.11" # Major and minor versions of this kernel.
|
||||
KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
|
||||
LINUXCONFIG="linux-rockchip-rk3588-${KERNEL_MAJOR_MINOR}" # Attention: not -${BRANCH} (edge/current/legacy), but -${KERNEL_MAJOR_MINOR} thus 6.8 / 6.10 etc
|
||||
# No need to set KERNELPATCHDIR, since default is: KERNELPATCHDIR='archive/rockchip-rk3588-${KERNEL_MAJOR_MINOR}'
|
||||
;;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
function mainline_kernel_decide_version__upstream_release_candidate_number() {
|
||||
[[ -n "${KERNELBRANCH}" ]] && return 0 # if already set, don't touch it; that way other hooks can run in any order
|
||||
if [[ "${KERNEL_MAJOR_MINOR}" == "6.12" ]]; then # @TODO: roll over to next MAJOR.MINOR and MAJOR.MINOR-rc1 when it is released
|
||||
declare -g KERNELBRANCH="tag:v6.12-rc2"
|
||||
declare -g KERNELBRANCH="tag:v6.12-rc4"
|
||||
display_alert "mainline-kernel: upstream release candidate" "Using KERNELBRANCH='${KERNELBRANCH}' for KERNEL_MAJOR_MINOR='${KERNEL_MAJOR_MINOR}'" "info"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3,6 +3,16 @@ From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Thu, 16 Nov 2023 17:49:42 +0300
|
||||
Subject: hwrng: rockchip: Add support for Rockchip HW RNG
|
||||
|
||||
Note by ColorfulRhino:
|
||||
The driver 'drivers/char/hw_random/rockchip-rng.c' is already
|
||||
implemented in mainline, but only for RK3568 as of kernel v6.12.
|
||||
The hardware RNG in the RK3566 outputs very low entropy, see:
|
||||
https://lore.kernel.org/linux-rockchip/97dfca058858d7a5d933ddf7a84dba61@manjaro.org/
|
||||
|
||||
TODO: Check reliability and quality of entropy for this patched
|
||||
HW RNG driver on RK3588. If it's bad like in the RK3566 case,
|
||||
drop this patch.
|
||||
|
||||
---
|
||||
drivers/char/hw_random/Kconfig | 13 +
|
||||
drivers/char/hw_random/Makefile | 1 +
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
config: # This is file 'patch/kernel/rockchip-rk3588-edge/0000.patching_config.yaml'
|
||||
|
||||
# PATCH NUMBERING INFO
|
||||
#
|
||||
# Patches should be ordered in such a way that general kernel patches are applied first, then SoC-related patches and at last board-specific patches
|
||||
#
|
||||
# Patch numbers in this folder are sorted by category:
|
||||
#
|
||||
# 00** for general patches
|
||||
# 01** for GPU/HDMI related patches
|
||||
# 08** for wireless patches
|
||||
# 1*** for board specific patches:
|
||||
# 101* for Rock-5B, 102* for Rock-5A and so on
|
||||
|
||||
# Just some info stuff; not used by the patching scripts
|
||||
name: rockchip-rk3588-edge
|
||||
kind: kernel
|
||||
type: mainline # or: vendor
|
||||
branch: linux-6.12.y
|
||||
last-known-good-tag: v6.12.0
|
||||
maintainers:
|
||||
- { github: rpardini, name: Ricardo Pardini, email: ricardo@pardini.net, armbian-forum: rpardini }
|
||||
|
||||
# .dts files in these directories will be copied as-is to the build tree; later ones overwrite earlier ones.
|
||||
# This is meant to provide a way to "add a board DTS" without having to null-patch them in.
|
||||
dts-directories:
|
||||
- { source: "dt", target: "arch/arm64/boot/dts/rockchip" }
|
||||
|
||||
# every file in these directories will be copied as-is to the build tree; later ones overwrite earlier ones
|
||||
# This is meant as a way to have overlays, bare, in a directory, without having to null-patch them in.
|
||||
# @TODO need a solution to auto-Makefile the overlays as well
|
||||
overlay-directories:
|
||||
- { source: "overlay", target: "arch/arm64/boot/dts/rockchip/overlay" }
|
||||
|
||||
# the Makefile in each of these directories will be magically patched to include the dts files copied
|
||||
# or patched-in; overlay subdir will be included "-y" if it exists.
|
||||
# No more Makefile patching needed, yay!
|
||||
auto-patch-dt-makefile:
|
||||
- { directory: "arch/arm64/boot/dts/rockchip", config-var: "CONFIG_ARCH_ROCKCHIP" }
|
||||
|
||||
# configuration for when applying patches to git / auto-rewriting patches (development cycle helpers)
|
||||
patches-to-git:
|
||||
do-not-commit-files:
|
||||
- "MAINTAINERS" # constant churn, drop them. sorry.
|
||||
- "Documentation/devicetree/bindings/arm/rockchip.yaml" # constant churn, conflicts on every bump, drop it. sorry.
|
||||
do-not-commit-regexes: # Python-style regexes
|
||||
- "^arch/([a-zA-Z0-9]+)/boot/dts/([a-zA-Z0-9]+)/Makefile$" # ignore DT Makefile patches, we've an auto-patcher now
|
||||
@@ -0,0 +1,66 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Wed, 2 Oct 2024 19:30:34 +0300
|
||||
Subject: compile .scr and install overlays in right path
|
||||
|
||||
---
|
||||
scripts/Makefile.dtbinst | 13 +++++++++-
|
||||
scripts/Makefile.dtbs | 8 +++++-
|
||||
2 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -33,7 +33,18 @@ endef
|
||||
|
||||
$(foreach d, $(sort $(dir $(dtbs))), $(eval $(call gen_install_rules,$(d))))
|
||||
|
||||
-dtbs := $(notdir $(dtbs))
|
||||
+# Very convoluted way to flatten all the device tree
|
||||
+# directories, but keep the "/overlay/" directory
|
||||
+
|
||||
+# topmost directory (ie: from rockchip/overlay/rk322x-emmc.dtbo extracts rockchip)
|
||||
+topmost_dir = $(firstword $(subst /, ,$(dtbs)))
|
||||
+# collect dtbs entries which starts with "$topmost_dir/overlay/", then remove "$topmost_dir"
|
||||
+dtbs_overlays = $(subst $(topmost_dir)/,,$(filter $(topmost_dir)/overlay/%, $(dtbs)))
|
||||
+# collect the non-overlay dtbs
|
||||
+dtbs_regular = $(filter-out $(topmost_dir)/overlay/%, $(dtbs))
|
||||
+# compose the dtbs variable flattening all the non-overlays entries
|
||||
+# and appending the overlays entries
|
||||
+dtbs := $(notdir $(dtbs_regular)) $(dtbs_overlays)
|
||||
|
||||
endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL
|
||||
|
||||
diff --git a/scripts/Makefile.dtbs b/scripts/Makefile.dtbs
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/scripts/Makefile.dtbs
|
||||
+++ b/scripts/Makefile.dtbs
|
||||
@@ -122,17 +122,23 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
|
||||
quiet_cmd_dtc = DTC $(quiet_dtb_check_tag) $@
|
||||
cmd_dtc = \
|
||||
$(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
|
||||
- $(DTC) -o $@ -b 0 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) \
|
||||
+ $(DTC) -@ -o $@ -b 0 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) \
|
||||
$(DTC_FLAGS) -d $(depfile).dtc.tmp $(dtc-tmp) ; \
|
||||
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) \
|
||||
$(cmd_dtb_check)
|
||||
|
||||
+quiet_cmd_scr = MKIMAGE $@
|
||||
+cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
|
||||
+
|
||||
$(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
|
||||
+ $(call if_changed,scr)
|
||||
+
|
||||
# targets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 24 Oct 2023 16:09:35 +0200
|
||||
Subject: math.h: add DIV_ROUND_UP_NO_OVERFLOW
|
||||
|
||||
Add a new DIV_ROUND_UP helper, which cannot overflow when
|
||||
big numbers are being used.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
include/linux/math.h | 11 ++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/linux/math.h b/include/linux/math.h
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/include/linux/math.h
|
||||
+++ b/include/linux/math.h
|
||||
@@ -36,6 +36,17 @@
|
||||
|
||||
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
|
||||
|
||||
+/**
|
||||
+ * DIV_ROUND_UP_NO_OVERFLOW - divide two numbers and always round up
|
||||
+ * @n: numerator / dividend
|
||||
+ * @d: denominator / divisor
|
||||
+ *
|
||||
+ * This functions does the same as DIV_ROUND_UP, but internally uses a
|
||||
+ * division and a modulo operation instead of math tricks. This way it
|
||||
+ * avoids overflowing when handling big numbers.
|
||||
+ */
|
||||
+#define DIV_ROUND_UP_NO_OVERFLOW(n, d) (((n) / (d)) + !!((n) % (d)))
|
||||
+
|
||||
#define DIV_ROUND_DOWN_ULL(ll, d) \
|
||||
({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 24 Oct 2023 16:13:50 +0200
|
||||
Subject: clk: divider: Fix divisor masking on 64 bit platforms
|
||||
|
||||
The clock framework handles clock rates as "unsigned long", so u32 on
|
||||
32-bit architectures and u64 on 64-bit architectures.
|
||||
|
||||
The current code casts the dividend to u64 on 32-bit to avoid a
|
||||
potential overflow. For example DIV_ROUND_UP(3000000000, 1500000000)
|
||||
= (3.0G + 1.5G - 1) / 1.5G = = OVERFLOW / 1.5G, which has been
|
||||
introduced in commit 9556f9dad8f5 ("clk: divider: handle integer overflow
|
||||
when dividing large clock rates").
|
||||
|
||||
On 64 bit platforms this masks the divisor, so that only the lower
|
||||
32 bit are used. Thus requesting a frequency >= 4.3GHz results
|
||||
in incorrect values. For example requesting 4300000000 (4.3 GHz) will
|
||||
effectively request ca. 5 MHz. Requesting clk_round_rate(clk, ULONG_MAX)
|
||||
is a bit of a special case, since that still returns correct values as
|
||||
long as the parent clock is below 8.5 GHz.
|
||||
|
||||
Fix this by switching to DIV_ROUND_UP_NO_OVERFLOW, which cannot
|
||||
overflow. This avoids any requirements on the arguments (except
|
||||
that divisor should not be 0 obviously).
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/clk/clk-divider.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/clk/clk-divider.c
|
||||
+++ b/drivers/clk/clk-divider.c
|
||||
@@ -220,7 +220,7 @@ static int _div_round_up(const struct clk_div_table *table,
|
||||
unsigned long parent_rate, unsigned long rate,
|
||||
unsigned long flags)
|
||||
{
|
||||
- int div = DIV_ROUND_UP_ULL((u64)parent_rate, rate);
|
||||
+ int div = DIV_ROUND_UP_NO_OVERFLOW(parent_rate, rate);
|
||||
|
||||
if (flags & CLK_DIVIDER_POWER_OF_TWO)
|
||||
div = __roundup_pow_of_two(div);
|
||||
@@ -237,7 +237,7 @@ static int _div_round_closest(const struct clk_div_table *table,
|
||||
int up, down;
|
||||
unsigned long up_rate, down_rate;
|
||||
|
||||
- up = DIV_ROUND_UP_ULL((u64)parent_rate, rate);
|
||||
+ up = DIV_ROUND_UP_NO_OVERFLOW(parent_rate, rate);
|
||||
down = parent_rate / rate;
|
||||
|
||||
if (flags & CLK_DIVIDER_POWER_OF_TWO) {
|
||||
@@ -473,7 +473,7 @@ int divider_get_val(unsigned long rate, unsigned long parent_rate,
|
||||
{
|
||||
unsigned int div, value;
|
||||
|
||||
- div = DIV_ROUND_UP_ULL((u64)parent_rate, rate);
|
||||
+ div = DIV_ROUND_UP_NO_OVERFLOW(parent_rate, rate);
|
||||
|
||||
if (!_is_valid_div(table, div, flags))
|
||||
return -EINVAL;
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 24 Oct 2023 18:09:57 +0200
|
||||
Subject: clk: composite: replace open-coded abs_diff()
|
||||
|
||||
Replace the open coded abs_diff() with the existing helper function.
|
||||
|
||||
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/clk/clk-composite.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/clk/clk-composite.c
|
||||
+++ b/drivers/clk/clk-composite.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
+#include <linux/math.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static u8 clk_composite_get_parent(struct clk_hw *hw)
|
||||
@@ -119,10 +120,7 @@ static int clk_composite_determine_rate(struct clk_hw *hw,
|
||||
if (ret)
|
||||
continue;
|
||||
|
||||
- if (req->rate >= tmp_req.rate)
|
||||
- rate_diff = req->rate - tmp_req.rate;
|
||||
- else
|
||||
- rate_diff = tmp_req.rate - req->rate;
|
||||
+ rate_diff = abs_diff(req->rate, tmp_req.rate);
|
||||
|
||||
if (!rate_diff || !req->best_parent_hw
|
||||
|| best_rate_diff > rate_diff) {
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Fri, 11 Aug 2023 17:56:00 +0300
|
||||
Subject: irqchip/irq-gic-v3-its: fix its timeout issue for rk35xx boards
|
||||
|
||||
---
|
||||
drivers/irqchip/irq-gic-v3-its.c | 79 +++++++++-
|
||||
1 file changed, 72 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||
@@ -164,6 +164,7 @@ struct its_device {
|
||||
struct its_node *its;
|
||||
struct event_lpi_map event_map;
|
||||
void *itt;
|
||||
+ u32 itt_sz;
|
||||
u32 nr_ites;
|
||||
u32 device_id;
|
||||
bool shared;
|
||||
@@ -2180,6 +2181,9 @@ static void gic_reset_prop_table(void *va)
|
||||
static struct page *its_allocate_prop_table(gfp_t gfp_flags)
|
||||
{
|
||||
struct page *prop_page;
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
|
||||
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
|
||||
if (!prop_page)
|
||||
@@ -2304,6 +2308,7 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
|
||||
u32 alloc_pages, psz;
|
||||
struct page *page;
|
||||
void *base;
|
||||
+ gfp_t gfp_flags;
|
||||
|
||||
psz = baser->psz;
|
||||
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
|
||||
@@ -2315,7 +2320,11 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
|
||||
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
||||
}
|
||||
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO, order);
|
||||
+ gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags, order);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -2365,6 +2374,15 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
|
||||
its_write_baser(its, baser, val);
|
||||
tmp = baser->val;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588")) {
|
||||
+ if (tmp & GITS_BASER_SHAREABILITY_MASK)
|
||||
+ tmp &= ~GITS_BASER_SHAREABILITY_MASK;
|
||||
+ else
|
||||
+ gic_flush_dcache_to_poc(base, PAGE_ORDER_TO_SIZE(order));
|
||||
+ }
|
||||
+
|
||||
if ((val ^ tmp) & GITS_BASER_SHAREABILITY_MASK) {
|
||||
/*
|
||||
* Shareability didn't stick. Just use
|
||||
@@ -2954,7 +2972,9 @@ static int its_alloc_collections(struct its_node *its)
|
||||
static struct page *its_allocate_pending_table(gfp_t gfp_flags)
|
||||
{
|
||||
struct page *pend_page;
|
||||
-
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
|
||||
get_order(LPI_PENDBASE_SZ));
|
||||
if (!pend_page)
|
||||
@@ -3113,6 +3133,11 @@ static void its_cpu_init_lpis(void)
|
||||
if (!rdists_support_shareable())
|
||||
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
|
||||
+
|
||||
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
|
||||
if (!(tmp & GICR_PROPBASER_SHAREABILITY_MASK)) {
|
||||
/*
|
||||
@@ -3140,6 +3165,11 @@ static void its_cpu_init_lpis(void)
|
||||
if (!rdists_support_shareable())
|
||||
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
|
||||
+
|
||||
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
|
||||
/*
|
||||
* The HW reports non-shareable, we must remove the
|
||||
@@ -3303,7 +3333,11 @@ static bool its_alloc_table_entry(struct its_node *its,
|
||||
|
||||
/* Allocate memory for 2nd level table */
|
||||
if (!table[idx]) {
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO,
|
||||
+ gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags,
|
||||
get_order(baser->psz));
|
||||
if (!page)
|
||||
return false;
|
||||
@@ -3392,6 +3426,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
|
||||
int nr_lpis;
|
||||
int nr_ites;
|
||||
int sz;
|
||||
+ gfp_t gfp_flags;
|
||||
|
||||
if (!its_alloc_device_table(its, dev_id))
|
||||
return NULL;
|
||||
@@ -3407,7 +3442,15 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
|
||||
nr_ites = max(2, nvecs);
|
||||
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
|
||||
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
||||
- itt = kzalloc_node(sz, GFP_KERNEL, its->numa_node);
|
||||
+ gfp_flags = GFP_KERNEL;
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588")) {
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+ itt = (void *)__get_free_pages(gfp_flags, get_order(sz));
|
||||
+ } else {
|
||||
+ itt = kzalloc_node(sz, gfp_flags, its->numa_node);
|
||||
+ }
|
||||
+
|
||||
if (alloc_lpis) {
|
||||
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
|
||||
if (lpi_map)
|
||||
@@ -3421,7 +3464,13 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
|
||||
|
||||
if (!dev || !itt || !col_map || (!lpi_map && alloc_lpis)) {
|
||||
kfree(dev);
|
||||
- kfree(itt);
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ free_pages((unsigned long)itt, get_order(sz));
|
||||
+ else
|
||||
+ kfree(itt);
|
||||
+
|
||||
bitmap_free(lpi_map);
|
||||
kfree(col_map);
|
||||
return NULL;
|
||||
@@ -3431,6 +3480,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
|
||||
|
||||
dev->its = its;
|
||||
dev->itt = itt;
|
||||
+ dev->itt_sz = sz;
|
||||
dev->nr_ites = nr_ites;
|
||||
dev->event_map.lpi_map = lpi_map;
|
||||
dev->event_map.col_map = col_map;
|
||||
@@ -3458,7 +3508,13 @@ static void its_free_device(struct its_device *its_dev)
|
||||
list_del(&its_dev->entry);
|
||||
raw_spin_unlock_irqrestore(&its_dev->its->lock, flags);
|
||||
kfree(its_dev->event_map.col_map);
|
||||
- kfree(its_dev->itt);
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ free_pages((unsigned long)its_dev->itt, get_order(its_dev->itt_sz));
|
||||
+ else
|
||||
+ kfree(its_dev->itt);
|
||||
+
|
||||
kfree(its_dev);
|
||||
}
|
||||
|
||||
@@ -5083,6 +5139,7 @@ static int __init its_probe_one(struct its_node *its)
|
||||
struct page *page;
|
||||
u32 ctlr;
|
||||
int err;
|
||||
+ gfp_t gfp_flags;
|
||||
|
||||
its_enable_quirks(its);
|
||||
|
||||
@@ -5116,7 +5173,10 @@ static int __init its_probe_one(struct its_node *its)
|
||||
}
|
||||
}
|
||||
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO,
|
||||
+ gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags,
|
||||
get_order(ITS_CMD_QUEUE_SZ));
|
||||
if (!page) {
|
||||
err = -ENOMEM;
|
||||
@@ -5145,6 +5205,11 @@ static int __init its_probe_one(struct its_node *its)
|
||||
if (its->flags & ITS_FLAGS_FORCE_NON_SHAREABLE)
|
||||
tmp &= ~GITS_CBASER_SHAREABILITY_MASK;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ tmp &= ~GITS_CBASER_SHAREABILITY_MASK;
|
||||
+
|
||||
if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) {
|
||||
if (!(tmp & GITS_CBASER_SHAREABILITY_MASK)) {
|
||||
/*
|
||||
--
|
||||
Armbian
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: amazingfate <liujianfeng1994@gmail.com>
|
||||
Date: Fri, 21 Jun 2024 16:32:55 +0800
|
||||
Subject: media: v4l2-core: Initialize h264 frame_mbs_only_flag as 1
|
||||
|
||||
---
|
||||
drivers/media/v4l2-core/v4l2-ctrls-core.c | 13 ++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
|
||||
@@ -111,6 +111,7 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
|
||||
struct v4l2_ctrl_vp9_frame *p_vp9_frame;
|
||||
struct v4l2_ctrl_fwht_params *p_fwht_params;
|
||||
struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix;
|
||||
+ struct v4l2_ctrl_h264_sps *p_h264_sps;
|
||||
struct v4l2_ctrl_av1_sequence *p_av1_sequence;
|
||||
void *p = ptr.p + idx * ctrl->elem_size;
|
||||
|
||||
@@ -179,6 +180,18 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
|
||||
*/
|
||||
memset(p_h264_scaling_matrix, 16, sizeof(*p_h264_scaling_matrix));
|
||||
break;
|
||||
+ case V4L2_CTRL_TYPE_H264_SPS:
|
||||
+ p_h264_sps = p;
|
||||
+ /*
|
||||
+ * Without V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY,
|
||||
+ * frame_mbs_only_flag set to 0 will translate to a miniumum
|
||||
+ * height of 32 (see H.264 specification 7-8). Some driver may
|
||||
+ * have a minimum size lower then 32, which would fail
|
||||
+ * validation with the SPS value. Set this flag, so that there
|
||||
+ * is now doubling in the height, allowing a valid default.
|
||||
+ */
|
||||
+ p_h264_sps->flags = V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,547 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Mon, 5 Feb 2024 01:38:48 +0200
|
||||
Subject: [WIP] phy: phy-rockchip-samsung-hdptx: Add FRL & EARC support
|
||||
|
||||
For upstreaming, this requires extending the standard PHY API to support
|
||||
HDMI configuration options [1].
|
||||
|
||||
Currently, the bus_width PHY attribute is used to pass clock rate and
|
||||
flags for 10-bit color depth, FRL and EARC. This is done by the HDMI
|
||||
bridge driver via phy_set_bus_width().
|
||||
|
||||
[1]: https://lore.kernel.org/all/20240306101625.795732-3-alexander.stein@ew.tq-group.com/
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 428 +++++++++-
|
||||
1 file changed, 426 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
|
||||
@@ -193,6 +193,10 @@
|
||||
#define LN3_TX_SER_RATE_SEL_HBR3 BIT(2)
|
||||
|
||||
#define HDMI20_MAX_RATE 600000000
|
||||
+#define DATA_RATE_MASK 0xFFFFFFF
|
||||
+#define COLOR_DEPTH_MASK BIT(31)
|
||||
+#define HDMI_MODE_MASK BIT(30)
|
||||
+#define HDMI_EARC_MASK BIT(29)
|
||||
|
||||
struct lcpll_config {
|
||||
u32 bit_rate;
|
||||
@@ -276,6 +280,7 @@ struct rk_hdptx_phy {
|
||||
struct clk_bulk_data *clks;
|
||||
int nr_clks;
|
||||
struct reset_control_bulk_data rsts[RST_MAX];
|
||||
+ bool earc_en;
|
||||
|
||||
/* clk provider */
|
||||
struct clk_hw hw;
|
||||
@@ -284,6 +289,24 @@ struct rk_hdptx_phy {
|
||||
atomic_t usage_count;
|
||||
};
|
||||
|
||||
+static const struct lcpll_config lcpll_cfg[] = {
|
||||
+ { 48000000, 1, 0, 0, 0x7d, 0x7d, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2,
|
||||
+ 0, 0x13, 0x18, 1, 0, 0x20, 0x0c, 1, 0, },
|
||||
+ { 40000000, 1, 1, 0, 0x68, 0x68, 1, 1, 0, 0, 0, 1, 1, 1, 1, 9, 0, 1, 1,
|
||||
+ 0, 2, 3, 1, 0, 0x20, 0x0c, 1, 0, },
|
||||
+ { 32000000, 1, 1, 1, 0x6b, 0x6b, 1, 1, 0, 1, 2, 1, 1, 1, 1, 9, 1, 2, 1,
|
||||
+ 0, 0x0d, 0x18, 1, 0, 0x20, 0x0c, 1, 1, },
|
||||
+};
|
||||
+
|
||||
+static const struct ropll_config ropll_frl_cfg[] = {
|
||||
+ { 24000000, 0x19, 0x19, 1, 1, 0, 1, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
|
||||
+ { 18000000, 0x7d, 0x7d, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
|
||||
+ { 9000000, 0x7d, 0x7d, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
|
||||
+};
|
||||
+
|
||||
static const struct ropll_config ropll_tmds_cfg[] = {
|
||||
{ 5940000, 124, 124, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
|
||||
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
|
||||
@@ -459,6 +482,73 @@ static const struct reg_sequence rk_hdtpx_tmds_cmn_init_seq[] = {
|
||||
REG_SEQ0(CMN_REG(009b), 0x00),
|
||||
};
|
||||
|
||||
+static const struct reg_sequence rk_hdtpx_frl_cmn_init_seq[] = {
|
||||
+ REG_SEQ0(CMN_REG(0011), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0017), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0026), 0x53),
|
||||
+ REG_SEQ0(CMN_REG(0030), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0031), 0x20),
|
||||
+ REG_SEQ0(CMN_REG(0032), 0x30),
|
||||
+ REG_SEQ0(CMN_REG(0033), 0x0b),
|
||||
+ REG_SEQ0(CMN_REG(0034), 0x23),
|
||||
+ REG_SEQ0(CMN_REG(0042), 0xb8),
|
||||
+ REG_SEQ0(CMN_REG(004e), 0x14),
|
||||
+ REG_SEQ0(CMN_REG(0074), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0081), 0x09),
|
||||
+ REG_SEQ0(CMN_REG(0086), 0x01),
|
||||
+ REG_SEQ0(CMN_REG(0087), 0x0c),
|
||||
+ REG_SEQ0(CMN_REG(009b), 0x10),
|
||||
+};
|
||||
+
|
||||
+static const struct reg_sequence rk_hdtpx_frl_ropll_cmn_init_seq[] = {
|
||||
+ REG_SEQ0(CMN_REG(0008), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(001e), 0x14),
|
||||
+ REG_SEQ0(CMN_REG(0020), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0021), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0022), 0x11),
|
||||
+ REG_SEQ0(CMN_REG(0023), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0025), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0027), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0028), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(002a), 0x01),
|
||||
+ REG_SEQ0(CMN_REG(002b), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(002c), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(002d), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(002e), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(002f), 0x04),
|
||||
+ REG_SEQ0(CMN_REG(003d), 0x40),
|
||||
+ REG_SEQ0(CMN_REG(005c), 0x25),
|
||||
+ REG_SEQ0(CMN_REG(0089), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0094), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0097), 0x02),
|
||||
+ REG_SEQ0(CMN_REG(0099), 0x04),
|
||||
+};
|
||||
+
|
||||
+static const struct reg_sequence rk_hdtpx_frl_lcpll_cmn_init_seq[] = {
|
||||
+ REG_SEQ0(CMN_REG(0025), 0x10),
|
||||
+ REG_SEQ0(CMN_REG(0027), 0x01),
|
||||
+ REG_SEQ0(CMN_REG(0028), 0x0d),
|
||||
+ REG_SEQ0(CMN_REG(002e), 0x02),
|
||||
+ REG_SEQ0(CMN_REG(002f), 0x0d),
|
||||
+ REG_SEQ0(CMN_REG(003d), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0051), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0055), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0059), 0x11),
|
||||
+ REG_SEQ0(CMN_REG(005a), 0x03),
|
||||
+ REG_SEQ0(CMN_REG(005c), 0x05),
|
||||
+ REG_SEQ0(CMN_REG(005e), 0x07),
|
||||
+ REG_SEQ0(CMN_REG(0060), 0x01),
|
||||
+ REG_SEQ0(CMN_REG(0064), 0x07),
|
||||
+ REG_SEQ0(CMN_REG(0065), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0069), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(006c), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0070), 0x01),
|
||||
+ REG_SEQ0(CMN_REG(0089), 0x02),
|
||||
+ REG_SEQ0(CMN_REG(0095), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0097), 0x00),
|
||||
+ REG_SEQ0(CMN_REG(0099), 0x00),
|
||||
+};
|
||||
+
|
||||
static const struct reg_sequence rk_hdtpx_common_sb_init_seq[] = {
|
||||
REG_SEQ0(SB_REG(0114), 0x00),
|
||||
REG_SEQ0(SB_REG(0115), 0x00),
|
||||
@@ -482,6 +572,17 @@ static const struct reg_sequence rk_hdtpx_tmds_lntop_lowbr_seq[] = {
|
||||
REG_SEQ0(LNTOP_REG(0205), 0x1f),
|
||||
};
|
||||
|
||||
+static const struct reg_sequence rk_hdtpx_frl_lntop_init_seq[] = {
|
||||
+ REG_SEQ0(LNTOP_REG(0200), 0x04),
|
||||
+ REG_SEQ0(LNTOP_REG(0201), 0x00),
|
||||
+ REG_SEQ0(LNTOP_REG(0202), 0x00),
|
||||
+ REG_SEQ0(LNTOP_REG(0203), 0xf0),
|
||||
+ REG_SEQ0(LNTOP_REG(0204), 0xff),
|
||||
+ REG_SEQ0(LNTOP_REG(0205), 0xff),
|
||||
+ REG_SEQ0(LNTOP_REG(0206), 0x05),
|
||||
+ REG_SEQ0(LNTOP_REG(0207), 0x0f),
|
||||
+};
|
||||
+
|
||||
static const struct reg_sequence rk_hdtpx_common_lane_init_seq[] = {
|
||||
REG_SEQ0(LANE_REG(0303), 0x0c),
|
||||
REG_SEQ0(LANE_REG(0307), 0x20),
|
||||
@@ -560,6 +661,40 @@ static const struct reg_sequence rk_hdtpx_tmds_lane_init_seq[] = {
|
||||
REG_SEQ0(LANE_REG(0606), 0x1c),
|
||||
};
|
||||
|
||||
+static const struct reg_sequence rk_hdtpx_frl_ropll_lane_init_seq[] = {
|
||||
+ REG_SEQ0(LANE_REG(0312), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0412), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0512), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0612), 0x3c),
|
||||
+};
|
||||
+
|
||||
+static const struct reg_sequence rk_hdtpx_frl_lcpll_lane_init_seq[] = {
|
||||
+ REG_SEQ0(LANE_REG(0312), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0412), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0512), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0612), 0x3c),
|
||||
+ REG_SEQ0(LANE_REG(0303), 0x2f),
|
||||
+ REG_SEQ0(LANE_REG(0403), 0x2f),
|
||||
+ REG_SEQ0(LANE_REG(0503), 0x2f),
|
||||
+ REG_SEQ0(LANE_REG(0603), 0x2f),
|
||||
+ REG_SEQ0(LANE_REG(0305), 0x03),
|
||||
+ REG_SEQ0(LANE_REG(0405), 0x03),
|
||||
+ REG_SEQ0(LANE_REG(0505), 0x03),
|
||||
+ REG_SEQ0(LANE_REG(0605), 0x03),
|
||||
+ REG_SEQ0(LANE_REG(0306), 0xfc),
|
||||
+ REG_SEQ0(LANE_REG(0406), 0xfc),
|
||||
+ REG_SEQ0(LANE_REG(0506), 0xfc),
|
||||
+ REG_SEQ0(LANE_REG(0606), 0xfc),
|
||||
+ REG_SEQ0(LANE_REG(0305), 0x4f),
|
||||
+ REG_SEQ0(LANE_REG(0405), 0x4f),
|
||||
+ REG_SEQ0(LANE_REG(0505), 0x4f),
|
||||
+ REG_SEQ0(LANE_REG(0605), 0x4f),
|
||||
+ REG_SEQ0(LANE_REG(0304), 0x14),
|
||||
+ REG_SEQ0(LANE_REG(0404), 0x14),
|
||||
+ REG_SEQ0(LANE_REG(0504), 0x14),
|
||||
+ REG_SEQ0(LANE_REG(0604), 0x14),
|
||||
+};
|
||||
+
|
||||
static bool rk_hdptx_phy_is_rw_reg(struct device *dev, unsigned int reg)
|
||||
{
|
||||
switch (reg) {
|
||||
@@ -661,6 +796,47 @@ static int rk_hdptx_post_enable_pll(struct rk_hdptx_phy *hdptx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int rk_hdptx_post_power_up(struct rk_hdptx_phy *hdptx)
|
||||
+{
|
||||
+ u32 val;
|
||||
+ int ret;
|
||||
+
|
||||
+ val = (HDPTX_I_BIAS_EN | HDPTX_I_BGR_EN) << 16 |
|
||||
+ HDPTX_I_BIAS_EN | HDPTX_I_BGR_EN;
|
||||
+ regmap_write(hdptx->grf, GRF_HDPTX_CON0, val);
|
||||
+
|
||||
+ usleep_range(10, 15);
|
||||
+ reset_control_deassert(hdptx->rsts[RST_INIT].rstc);
|
||||
+
|
||||
+ usleep_range(10, 15);
|
||||
+ val = HDPTX_I_PLL_EN << 16 | HDPTX_I_PLL_EN;
|
||||
+ regmap_write(hdptx->grf, GRF_HDPTX_CON0, val);
|
||||
+
|
||||
+ usleep_range(10, 15);
|
||||
+ reset_control_deassert(hdptx->rsts[RST_CMN].rstc);
|
||||
+
|
||||
+ ret = regmap_read_poll_timeout(hdptx->grf, GRF_HDPTX_STATUS, val,
|
||||
+ val & HDPTX_O_PLL_LOCK_DONE, 20, 400);
|
||||
+ if (ret) {
|
||||
+ dev_err(hdptx->dev, "Failed to get PHY PLL lock: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ usleep_range(20, 30);
|
||||
+ reset_control_deassert(hdptx->rsts[RST_LANE].rstc);
|
||||
+
|
||||
+ ret = regmap_read_poll_timeout(hdptx->grf, GRF_HDPTX_STATUS, val,
|
||||
+ val & HDPTX_O_PHY_RDY, 100, 5000);
|
||||
+ if (ret) {
|
||||
+ dev_err(hdptx->dev, "Failed to get PHY ready: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ dev_dbg(hdptx->dev, "PHY ready\n");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void rk_hdptx_phy_disable(struct rk_hdptx_phy *hdptx)
|
||||
{
|
||||
u32 val;
|
||||
@@ -690,6 +866,99 @@ static void rk_hdptx_phy_disable(struct rk_hdptx_phy *hdptx)
|
||||
regmap_write(hdptx->grf, GRF_HDPTX_CON0, val);
|
||||
}
|
||||
|
||||
+static void rk_hdptx_earc_config(struct rk_hdptx_phy *hdptx)
|
||||
+{
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0113), SB_RX_RCAL_OPT_CODE_MASK,
|
||||
+ FIELD_PREP(SB_RX_RCAL_OPT_CODE_MASK, 1));
|
||||
+ regmap_write(hdptx->regmap, SB_REG(011c), 0x04);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(011b), SB_AFC_TOL_MASK,
|
||||
+ FIELD_PREP(SB_AFC_TOL_MASK, 3));
|
||||
+ regmap_write(hdptx->regmap, SB_REG(0109), 0x05);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0120),
|
||||
+ SB_EARC_EN_MASK | SB_EARC_AFC_EN_MASK,
|
||||
+ FIELD_PREP(SB_EARC_EN_MASK, 1) |
|
||||
+ FIELD_PREP(SB_EARC_AFC_EN_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(011b), SB_EARC_SIG_DET_BYPASS_MASK,
|
||||
+ FIELD_PREP(SB_EARC_SIG_DET_BYPASS_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(011f),
|
||||
+ SB_PWM_AFC_CTRL_MASK | SB_RCAL_RSTN_MASK,
|
||||
+ FIELD_PREP(SB_PWM_AFC_CTRL_MASK, 0xc) |
|
||||
+ FIELD_PREP(SB_RCAL_RSTN_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0115), SB_READY_DELAY_TIME_MASK,
|
||||
+ FIELD_PREP(SB_READY_DELAY_TIME_MASK, 2));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0113), SB_RX_RTERM_CTRL_MASK,
|
||||
+ FIELD_PREP(SB_RX_RTERM_CTRL_MASK, 3));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0102), ANA_SB_RXTERM_OFFSP_MASK,
|
||||
+ FIELD_PREP(ANA_SB_RXTERM_OFFSP_MASK, 3));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0103), ANA_SB_RXTERM_OFFSN_MASK,
|
||||
+ FIELD_PREP(ANA_SB_RXTERM_OFFSN_MASK, 3));
|
||||
+
|
||||
+ regmap_write(hdptx->regmap, SB_REG(011a), 0x03);
|
||||
+ regmap_write(hdptx->regmap, SB_REG(0118), 0x0a);
|
||||
+ regmap_write(hdptx->regmap, SB_REG(011e), 0x6a);
|
||||
+ regmap_write(hdptx->regmap, SB_REG(011d), 0x67);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0117), FAST_PULSE_TIME_MASK,
|
||||
+ FIELD_PREP(FAST_PULSE_TIME_MASK, 4));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0114),
|
||||
+ SB_TG_SB_EN_DELAY_TIME_MASK | SB_TG_RXTERM_EN_DELAY_TIME_MASK,
|
||||
+ FIELD_PREP(SB_TG_SB_EN_DELAY_TIME_MASK, 2) |
|
||||
+ FIELD_PREP(SB_TG_RXTERM_EN_DELAY_TIME_MASK, 2));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0105), ANA_SB_TX_HLVL_PROG_MASK,
|
||||
+ FIELD_PREP(ANA_SB_TX_HLVL_PROG_MASK, 7));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0106), ANA_SB_TX_LLVL_PROG_MASK,
|
||||
+ FIELD_PREP(ANA_SB_TX_LLVL_PROG_MASK, 7));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(010f), ANA_SB_VREG_GAIN_CTRL_MASK,
|
||||
+ FIELD_PREP(ANA_SB_VREG_GAIN_CTRL_MASK, 0));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0110), ANA_SB_VREG_REF_SEL_MASK,
|
||||
+ FIELD_PREP(ANA_SB_VREG_REF_SEL_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0115), SB_TG_OSC_EN_DELAY_TIME_MASK,
|
||||
+ FIELD_PREP(SB_TG_OSC_EN_DELAY_TIME_MASK, 2));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0116), AFC_RSTN_DELAY_TIME_MASK,
|
||||
+ FIELD_PREP(AFC_RSTN_DELAY_TIME_MASK, 2));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0109), ANA_SB_DMRX_AFC_DIV_RATIO_MASK,
|
||||
+ FIELD_PREP(ANA_SB_DMRX_AFC_DIV_RATIO_MASK, 5));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0103), OVRD_SB_RX_RESCAL_DONE_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_RX_RESCAL_DONE_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0104), OVRD_SB_EN_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_EN_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0102), OVRD_SB_RXTERM_EN_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_RXTERM_EN_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0105), OVRD_SB_EARC_CMDC_EN_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_EARC_CMDC_EN_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(010f),
|
||||
+ OVRD_SB_VREG_EN_MASK | OVRD_SB_VREG_LPF_BYPASS_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_VREG_EN_MASK, 1) |
|
||||
+ FIELD_PREP(OVRD_SB_VREG_LPF_BYPASS_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0123), OVRD_SB_READY_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_READY_MASK, 1));
|
||||
+
|
||||
+ usleep_range(1000, 1100);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0103), SB_RX_RESCAL_DONE_MASK,
|
||||
+ FIELD_PREP(SB_RX_RESCAL_DONE_MASK, 1));
|
||||
+ usleep_range(50, 60);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0104), SB_EN_MASK,
|
||||
+ FIELD_PREP(SB_EN_MASK, 1));
|
||||
+ usleep_range(50, 60);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0102), SB_RXTERM_EN_MASK,
|
||||
+ FIELD_PREP(SB_RXTERM_EN_MASK, 1));
|
||||
+ usleep_range(50, 60);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0105), SB_EARC_CMDC_EN_MASK,
|
||||
+ FIELD_PREP(SB_EARC_CMDC_EN_MASK, 1));
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(010f), SB_VREG_EN_MASK,
|
||||
+ FIELD_PREP(SB_VREG_EN_MASK, 1));
|
||||
+ usleep_range(50, 60);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(010f), OVRD_SB_VREG_LPF_BYPASS_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_VREG_LPF_BYPASS_MASK, 1));
|
||||
+ usleep_range(250, 300);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(010f), OVRD_SB_VREG_LPF_BYPASS_MASK,
|
||||
+ FIELD_PREP(OVRD_SB_VREG_LPF_BYPASS_MASK, 0));
|
||||
+ usleep_range(100, 120);
|
||||
+ regmap_update_bits(hdptx->regmap, SB_REG(0123), SB_READY_MASK,
|
||||
+ FIELD_PREP(SB_READY_MASK, 1));
|
||||
+}
|
||||
+
|
||||
static bool rk_hdptx_phy_clk_pll_calc(unsigned int data_rate,
|
||||
struct ropll_config *cfg)
|
||||
{
|
||||
@@ -765,9 +1034,13 @@ static bool rk_hdptx_phy_clk_pll_calc(unsigned int data_rate,
|
||||
static int rk_hdptx_ropll_tmds_cmn_config(struct rk_hdptx_phy *hdptx,
|
||||
unsigned int rate)
|
||||
{
|
||||
+ int i, bus_width = phy_get_bus_width(hdptx->phy);
|
||||
+ u8 color_depth = (bus_width & COLOR_DEPTH_MASK) ? 1 : 0;
|
||||
const struct ropll_config *cfg = NULL;
|
||||
struct ropll_config rc = {0};
|
||||
- int i;
|
||||
+
|
||||
+ if (color_depth)
|
||||
+ rate = rate * 10 / 8;
|
||||
|
||||
hdptx->rate = rate * 100;
|
||||
|
||||
@@ -825,6 +1098,9 @@ static int rk_hdptx_ropll_tmds_cmn_config(struct rk_hdptx_phy *hdptx,
|
||||
regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_POSTDIV_SEL_MASK,
|
||||
FIELD_PREP(PLL_PCG_POSTDIV_SEL_MASK, cfg->pms_sdiv));
|
||||
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_SEL_MASK,
|
||||
+ FIELD_PREP(PLL_PCG_CLK_SEL_MASK, color_depth));
|
||||
+
|
||||
regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_EN,
|
||||
PLL_PCG_CLK_EN);
|
||||
|
||||
@@ -852,9 +1128,146 @@ static int rk_hdptx_ropll_tmds_mode_config(struct rk_hdptx_phy *hdptx,
|
||||
rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_lane_init_seq);
|
||||
rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_tmds_lane_init_seq);
|
||||
|
||||
+ if (hdptx->earc_en)
|
||||
+ rk_hdptx_earc_config(hdptx);
|
||||
+
|
||||
return rk_hdptx_post_enable_lane(hdptx);
|
||||
}
|
||||
|
||||
+static int rk_hdptx_ropll_frl_mode_config(struct rk_hdptx_phy *hdptx,
|
||||
+ u32 bus_width)
|
||||
+{
|
||||
+ u32 bit_rate = bus_width & DATA_RATE_MASK;
|
||||
+ u8 color_depth = (bus_width & COLOR_DEPTH_MASK) ? 1 : 0;
|
||||
+ const struct ropll_config *cfg = NULL;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(ropll_frl_cfg); i++)
|
||||
+ if (bit_rate == ropll_frl_cfg[i].bit_rate) {
|
||||
+ cfg = &ropll_frl_cfg[i];
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!cfg) {
|
||||
+ dev_err(hdptx->dev, "%s cannot find pll cfg\n", __func__);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ rk_hdptx_pre_power_up(hdptx);
|
||||
+
|
||||
+ reset_control_assert(hdptx->rsts[RST_ROPLL].rstc);
|
||||
+ usleep_range(10, 20);
|
||||
+ reset_control_deassert(hdptx->rsts[RST_ROPLL].rstc);
|
||||
+
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_cmn_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_cmn_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_ropll_cmn_init_seq);
|
||||
+
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0051), cfg->pms_mdiv);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0055), cfg->pms_mdiv_afc);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0059),
|
||||
+ (cfg->pms_pdiv << 4) | cfg->pms_refdiv);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(005a), cfg->pms_sdiv << 4);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(005e), ROPLL_SDM_EN_MASK,
|
||||
+ FIELD_PREP(ROPLL_SDM_EN_MASK, cfg->sdm_en));
|
||||
+ if (!cfg->sdm_en)
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(005e), 0xf, 0);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0064), ROPLL_SDM_NUM_SIGN_RBR_MASK,
|
||||
+ FIELD_PREP(ROPLL_SDM_NUM_SIGN_RBR_MASK, cfg->sdm_num_sign));
|
||||
+
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0060), cfg->sdm_deno);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0065), cfg->sdm_num);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0069), ROPLL_SDC_N_RBR_MASK,
|
||||
+ FIELD_PREP(ROPLL_SDC_N_RBR_MASK, cfg->sdc_n));
|
||||
+
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(006c), cfg->sdc_num);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0070), cfg->sdc_deno);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_POSTDIV_SEL_MASK,
|
||||
+ FIELD_PREP(PLL_PCG_POSTDIV_SEL_MASK, cfg->pms_sdiv));
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_SEL_MASK,
|
||||
+ FIELD_PREP(PLL_PCG_CLK_SEL_MASK, color_depth));
|
||||
+
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_sb_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_lntop_init_seq);
|
||||
+
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_lane_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_ropll_lane_init_seq);
|
||||
+
|
||||
+ if (hdptx->earc_en)
|
||||
+ rk_hdptx_earc_config(hdptx);
|
||||
+
|
||||
+ return rk_hdptx_post_power_up(hdptx);
|
||||
+}
|
||||
+
|
||||
+static int rk_hdptx_lcpll_frl_mode_config(struct rk_hdptx_phy *hdptx,
|
||||
+ u32 bus_width)
|
||||
+{
|
||||
+ u32 bit_rate = bus_width & DATA_RATE_MASK;
|
||||
+ u8 color_depth = (bus_width & COLOR_DEPTH_MASK) ? 1 : 0;
|
||||
+ const struct lcpll_config *cfg = NULL;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(lcpll_cfg); i++)
|
||||
+ if (bit_rate == lcpll_cfg[i].bit_rate) {
|
||||
+ cfg = &lcpll_cfg[i];
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!cfg) {
|
||||
+ dev_err(hdptx->dev, "%s cannot find pll cfg\n", __func__);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ rk_hdptx_pre_power_up(hdptx);
|
||||
+
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_cmn_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_cmn_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_lcpll_cmn_init_seq);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0008),
|
||||
+ LCPLL_EN_MASK | LCPLL_LCVCO_MODE_EN_MASK,
|
||||
+ FIELD_PREP(LCPLL_EN_MASK, 1) |
|
||||
+ FIELD_PREP(LCPLL_LCVCO_MODE_EN_MASK, cfg->lcvco_mode_en));
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(001e),
|
||||
+ LCPLL_PI_EN_MASK | LCPLL_100M_CLK_EN_MASK,
|
||||
+ FIELD_PREP(LCPLL_PI_EN_MASK, cfg->pi_en) |
|
||||
+ FIELD_PREP(LCPLL_100M_CLK_EN_MASK, cfg->clk_en_100m));
|
||||
+
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0020), cfg->pms_mdiv);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0021), cfg->pms_mdiv_afc);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0022),
|
||||
+ (cfg->pms_pdiv << 4) | cfg->pms_refdiv);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(0023),
|
||||
+ (cfg->pms_sdiv << 4) | cfg->pms_sdiv);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(002a), cfg->sdm_deno);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(002b), cfg->sdm_num_sign);
|
||||
+ regmap_write(hdptx->regmap, CMN_REG(002c), cfg->sdm_num);
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(002d), LCPLL_SDC_N_MASK,
|
||||
+ FIELD_PREP(LCPLL_SDC_N_MASK, cfg->sdc_n));
|
||||
+
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_POSTDIV_SEL_MASK,
|
||||
+ FIELD_PREP(PLL_PCG_POSTDIV_SEL_MASK, cfg->pms_sdiv));
|
||||
+ regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_SEL_MASK,
|
||||
+ FIELD_PREP(PLL_PCG_CLK_SEL_MASK, color_depth));
|
||||
+
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_sb_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_lntop_init_seq);
|
||||
+
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_common_lane_init_seq);
|
||||
+ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_frl_lcpll_lane_init_seq);
|
||||
+
|
||||
+ if (hdptx->earc_en)
|
||||
+ rk_hdptx_earc_config(hdptx);
|
||||
+
|
||||
+ return rk_hdptx_post_power_up(hdptx);
|
||||
+}
|
||||
+
|
||||
static int rk_hdptx_phy_consumer_get(struct rk_hdptx_phy *hdptx,
|
||||
unsigned int rate)
|
||||
{
|
||||
@@ -922,11 +1335,22 @@ static int rk_hdptx_phy_power_on(struct phy *phy)
|
||||
* from the HDMI bridge driver until phy_configure_opts_hdmi
|
||||
* becomes available in the PHY API.
|
||||
*/
|
||||
- unsigned int rate = bus_width & 0xfffffff;
|
||||
+ unsigned int rate = bus_width & DATA_RATE_MASK;
|
||||
|
||||
dev_dbg(hdptx->dev, "%s bus_width=%x rate=%u\n",
|
||||
__func__, bus_width, rate);
|
||||
|
||||
+ if (bus_width & HDMI_EARC_MASK)
|
||||
+ hdptx->earc_en = true;
|
||||
+ else
|
||||
+ hdptx->earc_en = false;
|
||||
+
|
||||
+ if (bus_width & HDMI_MODE_MASK) {
|
||||
+ if (rate > 24000000)
|
||||
+ return rk_hdptx_lcpll_frl_mode_config(hdptx, bus_width);
|
||||
+ return rk_hdptx_ropll_frl_mode_config(hdptx, bus_width);
|
||||
+ }
|
||||
+
|
||||
ret = rk_hdptx_phy_consumer_get(hdptx, rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,715 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Wed, 27 Mar 2024 20:36:15 +0200
|
||||
Subject: [WIP] dt-bindings: display: rockchip-drm: Add optional clocks
|
||||
property
|
||||
|
||||
Allow using the clock provided by HDMI0 PHY PLL to improve HDMI output
|
||||
support on RK3588 SoC.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip-drm.yaml | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.yaml
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.yaml
|
||||
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.yaml
|
||||
@@ -28,6 +28,14 @@ properties:
|
||||
of vop devices. vop definitions as defined in
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml
|
||||
|
||||
+ clocks:
|
||||
+ maxItems: 1
|
||||
+ description: Optional clock provided by HDMI0 PLL
|
||||
+
|
||||
+ clock-names:
|
||||
+ items:
|
||||
+ - const: hdmi0_phy_pll
|
||||
+
|
||||
required:
|
||||
- compatible
|
||||
- ports
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Fri, 3 Nov 2023 19:58:02 +0200
|
||||
Subject: [WIP] drm/rockchip: vop2: Improve display modes handling on rk3588
|
||||
|
||||
The initial vop2 support for rk3588 in mainline is not able to handle
|
||||
all display modes supported by connected displays, e.g.
|
||||
2560x1440-75.00Hz, 2048x1152-60.00Hz, 1024x768-60.00Hz.
|
||||
|
||||
Additionally, it doesn't cope with non-integer refresh rates like 59.94,
|
||||
29.97, 23.98, etc.
|
||||
|
||||
Improve HDMI0 clocking in order to support the additional display modes.
|
||||
|
||||
Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588")
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 553 +++++++++-
|
||||
1 file changed, 552 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
@@ -5,6 +5,8 @@
|
||||
*/
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/clk.h>
|
||||
+#include <linux/clk-provider.h>
|
||||
+#include <linux/clkdev.h>
|
||||
#include <linux/component.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/iopoll.h>
|
||||
@@ -212,6 +214,10 @@ struct vop2 {
|
||||
struct clk *hclk;
|
||||
struct clk *aclk;
|
||||
struct clk *pclk;
|
||||
+ // [CC:] hack to support additional display modes
|
||||
+ struct clk *hdmi0_phy_pll;
|
||||
+ /* list_head of internal clk */
|
||||
+ struct list_head clk_list_head;
|
||||
|
||||
/* optional internal rgb encoder */
|
||||
struct rockchip_rgb *rgb;
|
||||
@@ -220,6 +226,19 @@ struct vop2 {
|
||||
struct vop2_win win[];
|
||||
};
|
||||
|
||||
+struct vop2_clk {
|
||||
+ struct vop2 *vop2;
|
||||
+ struct list_head list;
|
||||
+ unsigned long rate;
|
||||
+ struct clk_hw hw;
|
||||
+ struct clk_divider div;
|
||||
+ int div_val;
|
||||
+ u8 parent_index;
|
||||
+};
|
||||
+
|
||||
+#define to_vop2_clk(_hw) container_of(_hw, struct vop2_clk, hw)
|
||||
+#define VOP2_MAX_DCLK_RATE 600000 /* kHz */
|
||||
+
|
||||
#define vop2_output_if_is_hdmi(x) ((x) == ROCKCHIP_VOP2_EP_HDMI0 || \
|
||||
(x) == ROCKCHIP_VOP2_EP_HDMI1)
|
||||
|
||||
@@ -1476,9 +1495,30 @@ static bool vop2_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adj_mode)
|
||||
{
|
||||
+ struct vop2_video_port *vp = to_vop2_video_port(crtc);
|
||||
+ struct drm_connector *connector;
|
||||
+ struct drm_connector_list_iter conn_iter;
|
||||
+ struct drm_crtc_state *new_crtc_state = container_of(mode, struct drm_crtc_state, mode);
|
||||
drm_mode_set_crtcinfo(adj_mode, CRTC_INTERLACE_HALVE_V |
|
||||
CRTC_STEREO_DOUBLE);
|
||||
|
||||
+ if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
+ adj_mode->crtc_clock *= 2;
|
||||
+
|
||||
+ drm_connector_list_iter_begin(crtc->dev, &conn_iter);
|
||||
+ drm_for_each_connector_iter(connector, &conn_iter) {
|
||||
+ if ((new_crtc_state->connector_mask & drm_connector_mask(connector)) &&
|
||||
+ ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) ||
|
||||
+ (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA))) {
|
||||
+ drm_connector_list_iter_end(&conn_iter);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ drm_connector_list_iter_end(&conn_iter);
|
||||
+
|
||||
+ if (adj_mode->crtc_clock <= VOP2_MAX_DCLK_RATE)
|
||||
+ adj_mode->crtc_clock = DIV_ROUND_UP(clk_round_rate(vp->dclk,
|
||||
+ adj_mode->crtc_clock * 1000), 1000);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1663,6 +1703,31 @@ static unsigned long rk3588_calc_dclk(unsigned long child_clk, unsigned long max
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static struct vop2_clk *vop2_clk_get(struct vop2 *vop2, const char *name);
|
||||
+
|
||||
+static int vop2_cru_set_rate(struct vop2_clk *if_pixclk, struct vop2_clk *if_dclk)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (if_pixclk) {
|
||||
+ ret = clk_set_rate(if_pixclk->hw.clk, if_pixclk->rate);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(if_pixclk->vop2->dev, "set %s to %ld failed: %d\n",
|
||||
+ clk_hw_get_name(&if_pixclk->hw), if_pixclk->rate, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (if_dclk) {
|
||||
+ ret = clk_set_rate(if_dclk->hw.clk, if_dclk->rate);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(if_dclk->vop2->dev, "set %s to %ld failed %d\n",
|
||||
+ clk_hw_get_name(&if_dclk->hw), if_dclk->rate, ret);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* 4 pixclk/cycle on rk3588
|
||||
* RGB/eDP/HDMI: if_pixclk >= dclk_core
|
||||
@@ -1686,6 +1751,72 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
|
||||
int K = 1;
|
||||
|
||||
if (vop2_output_if_is_hdmi(id)) {
|
||||
+ if (vop2->data->soc_id == 3588 && id == ROCKCHIP_VOP2_EP_HDMI0 &&
|
||||
+ vop2->hdmi0_phy_pll) {
|
||||
+ const char *clk_src_name = "hdmi_edp0_clk_src";
|
||||
+ const char *clk_parent_name = "dclk";
|
||||
+ const char *pixclk_name = "hdmi_edp0_pixclk";
|
||||
+ const char *dclk_name = "hdmi_edp0_dclk";
|
||||
+ struct vop2_clk *if_clk_src, *if_clk_parent, *if_pixclk, *if_dclk, *dclk, *dclk_core, *dclk_out;
|
||||
+ char clk_name[32];
|
||||
+ int ret;
|
||||
+
|
||||
+ if_clk_src = vop2_clk_get(vop2, clk_src_name);
|
||||
+ snprintf(clk_name, sizeof(clk_name), "%s%d", clk_parent_name, vp->id);
|
||||
+ if_clk_parent = vop2_clk_get(vop2, clk_name);
|
||||
+ if_pixclk = vop2_clk_get(vop2, pixclk_name);
|
||||
+ if_dclk = vop2_clk_get(vop2, dclk_name);
|
||||
+ if (!if_pixclk || !if_clk_parent) {
|
||||
+ DRM_DEV_ERROR(vop2->dev, "failed to get connector interface clk\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ ret = clk_set_parent(if_clk_src->hw.clk, if_clk_parent->hw.clk);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(vop2->dev, "failed to set parent(%s) for %s: %d\n",
|
||||
+ __clk_get_name(if_clk_parent->hw.clk),
|
||||
+ __clk_get_name(if_clk_src->hw.clk), ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (output_mode == ROCKCHIP_OUT_MODE_YUV420)
|
||||
+ K = 2;
|
||||
+
|
||||
+ if_pixclk->rate = (dclk_core_rate << 1) / K;
|
||||
+ if_dclk->rate = dclk_core_rate / K;
|
||||
+
|
||||
+ snprintf(clk_name, sizeof(clk_name), "dclk_core%d", vp->id);
|
||||
+ dclk_core = vop2_clk_get(vop2, clk_name);
|
||||
+
|
||||
+ snprintf(clk_name, sizeof(clk_name), "dclk_out%d", vp->id);
|
||||
+ dclk_out = vop2_clk_get(vop2, clk_name);
|
||||
+
|
||||
+ snprintf(clk_name, sizeof(clk_name), "dclk%d", vp->id);
|
||||
+ dclk = vop2_clk_get(vop2, clk_name);
|
||||
+ if (v_pixclk <= (VOP2_MAX_DCLK_RATE * 1000)) {
|
||||
+ if (output_mode == ROCKCHIP_OUT_MODE_YUV420)
|
||||
+ v_pixclk = v_pixclk >> 1;
|
||||
+ } else {
|
||||
+ v_pixclk = v_pixclk >> 2;
|
||||
+ }
|
||||
+ clk_set_rate(dclk->hw.clk, v_pixclk);
|
||||
+
|
||||
+ if (dclk_core_rate > if_pixclk->rate) {
|
||||
+ clk_set_rate(dclk_core->hw.clk, dclk_core_rate);
|
||||
+ ret = vop2_cru_set_rate(if_pixclk, if_dclk);
|
||||
+ } else {
|
||||
+ ret = vop2_cru_set_rate(if_pixclk, if_dclk);
|
||||
+ clk_set_rate(dclk_core->hw.clk, dclk_core_rate);
|
||||
+ }
|
||||
+
|
||||
+ *dclk_core_div = dclk_core->div_val;
|
||||
+ *dclk_out_div = dclk_out->div_val;
|
||||
+ *if_pixclk_div = if_pixclk->div_val;
|
||||
+ *if_dclk_div = if_dclk->div_val;
|
||||
+
|
||||
+ return dclk->rate;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* K = 2: dclk_core = if_pixclk_rate > if_dclk_rate
|
||||
* K = 1: dclk_core = hdmie_edp_dclk > if_pixclk_rate
|
||||
@@ -1917,6 +2048,22 @@ static int us_to_vertical_line(struct drm_display_mode *mode, int us)
|
||||
return us * mode->clock / mode->htotal / 1000;
|
||||
}
|
||||
|
||||
+// [CC:] rework virtual clock
|
||||
+static struct vop2_clk *vop2_clk_get(struct vop2 *vop2, const char *name)
|
||||
+{
|
||||
+ struct vop2_clk *clk, *n;
|
||||
+
|
||||
+ if (!name)
|
||||
+ return NULL;
|
||||
+
|
||||
+ list_for_each_entry_safe(clk, n, &vop2->clk_list_head, list) {
|
||||
+ if (!strcmp(clk_hw_get_name(&clk->hw), name))
|
||||
+ return clk;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
@@ -1944,6 +2091,8 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
u32 val, polflags;
|
||||
int ret;
|
||||
struct drm_encoder *encoder;
|
||||
+ char clk_name[32];
|
||||
+ struct vop2_clk *dclk;
|
||||
|
||||
drm_dbg(vop2->drm, "Update mode to %dx%d%s%d, type: %d for vp%d\n",
|
||||
hdisplay, vdisplay, mode->flags & DRM_MODE_FLAG_INTERLACE ? "i" : "p",
|
||||
@@ -2044,11 +2193,38 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
|
||||
dsp_ctrl |= RK3568_VP_DSP_CTRL__CORE_DCLK_DIV;
|
||||
- clock *= 2;
|
||||
+ // [CC:] done via mode_fixup
|
||||
+ // clock *= 2;
|
||||
}
|
||||
|
||||
vop2_vp_write(vp, RK3568_VP_MIPI_CTRL, 0);
|
||||
|
||||
+ snprintf(clk_name, sizeof(clk_name), "dclk%d", vp->id);
|
||||
+ dclk = vop2_clk_get(vop2, clk_name);
|
||||
+ if (dclk) {
|
||||
+ /*
|
||||
+ * use HDMI_PHY_PLL as dclk source under 4K@60 if it is available,
|
||||
+ * otherwise use system cru as dclk source.
|
||||
+ */
|
||||
+ drm_for_each_encoder_mask(encoder, crtc->dev, crtc_state->encoder_mask) {
|
||||
+ struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
|
||||
+
|
||||
+ // [CC:] Using PHY PLL to handle all display modes
|
||||
+ if (rkencoder->crtc_endpoint_id == ROCKCHIP_VOP2_EP_HDMI0) {
|
||||
+ clk_get_rate(vop2->hdmi0_phy_pll);
|
||||
+
|
||||
+ if (mode->crtc_clock <= VOP2_MAX_DCLK_RATE) {
|
||||
+ ret = clk_set_parent(vp->dclk, vop2->hdmi0_phy_pll);
|
||||
+ if (ret < 0)
|
||||
+ DRM_WARN("failed to set clock parent for %s\n",
|
||||
+ __clk_get_name(vp->dclk));
|
||||
+ }
|
||||
+
|
||||
+ clock = dclk->rate;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
clk_set_rate(vp->dclk, clock);
|
||||
|
||||
vop2_post_config(crtc);
|
||||
@@ -2504,7 +2680,43 @@ static void vop2_crtc_atomic_flush(struct drm_crtc *crtc,
|
||||
spin_unlock_irq(&crtc->dev->event_lock);
|
||||
}
|
||||
|
||||
+static enum drm_mode_status
|
||||
+vop2_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode)
|
||||
+{
|
||||
+ struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(crtc->state);
|
||||
+ struct vop2_video_port *vp = to_vop2_video_port(crtc);
|
||||
+ struct vop2 *vop2 = vp->vop2;
|
||||
+ const struct vop2_data *vop2_data = vop2->data;
|
||||
+ const struct vop2_video_port_data *vp_data = &vop2_data->vp[vp->id];
|
||||
+ int request_clock = mode->clock;
|
||||
+ int clock;
|
||||
+
|
||||
+ if (mode->hdisplay > vp_data->max_output.width)
|
||||
+ return MODE_BAD_HVALUE;
|
||||
+
|
||||
+ if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
+ request_clock *= 2;
|
||||
+
|
||||
+ if (request_clock <= VOP2_MAX_DCLK_RATE) {
|
||||
+ clock = request_clock;
|
||||
+ } else {
|
||||
+ request_clock = request_clock >> 2;
|
||||
+ clock = clk_round_rate(vp->dclk, request_clock * 1000) / 1000;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Hdmi or DisplayPort request a Accurate clock.
|
||||
+ */
|
||||
+ if (vcstate->output_type == DRM_MODE_CONNECTOR_HDMIA ||
|
||||
+ vcstate->output_type == DRM_MODE_CONNECTOR_DisplayPort)
|
||||
+ if (clock != request_clock)
|
||||
+ return MODE_CLOCK_RANGE;
|
||||
+
|
||||
+ return MODE_OK;
|
||||
+}
|
||||
+
|
||||
static const struct drm_crtc_helper_funcs vop2_crtc_helper_funcs = {
|
||||
+ .mode_valid = vop2_crtc_mode_valid,
|
||||
.mode_fixup = vop2_crtc_mode_fixup,
|
||||
.atomic_check = vop2_crtc_atomic_check,
|
||||
.atomic_begin = vop2_crtc_atomic_begin,
|
||||
@@ -3074,6 +3286,336 @@ static const struct regmap_config vop2_regmap_config = {
|
||||
.cache_type = REGCACHE_MAPLE,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * BEGIN virtual clock
|
||||
+ */
|
||||
+#define PLL_RATE_MIN 30000000
|
||||
+
|
||||
+#define cru_dbg(format, ...) do { \
|
||||
+ if (cru_debug) \
|
||||
+ pr_info("%s: " format, __func__, ## __VA_ARGS__); \
|
||||
+ } while (0)
|
||||
+
|
||||
+#define PNAME(x) static const char *const x[]
|
||||
+
|
||||
+enum vop_clk_branch_type {
|
||||
+ branch_mux,
|
||||
+ branch_divider,
|
||||
+ branch_factor,
|
||||
+ branch_virtual,
|
||||
+};
|
||||
+
|
||||
+#define VIR(cname) \
|
||||
+ { \
|
||||
+ .branch_type = branch_virtual, \
|
||||
+ .name = cname, \
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+#define MUX(cname, pnames, f) \
|
||||
+ { \
|
||||
+ .branch_type = branch_mux, \
|
||||
+ .name = cname, \
|
||||
+ .parent_names = pnames, \
|
||||
+ .num_parents = ARRAY_SIZE(pnames), \
|
||||
+ .flags = f, \
|
||||
+ }
|
||||
+
|
||||
+#define FACTOR(cname, pname, f) \
|
||||
+ { \
|
||||
+ .branch_type = branch_factor, \
|
||||
+ .name = cname, \
|
||||
+ .parent_names = (const char *[]){ pname }, \
|
||||
+ .num_parents = 1, \
|
||||
+ .flags = f, \
|
||||
+ }
|
||||
+
|
||||
+#define DIV(cname, pname, f, w) \
|
||||
+ { \
|
||||
+ .branch_type = branch_divider, \
|
||||
+ .name = cname, \
|
||||
+ .parent_names = (const char *[]){ pname }, \
|
||||
+ .num_parents = 1, \
|
||||
+ .flags = f, \
|
||||
+ .div_width = w, \
|
||||
+ }
|
||||
+
|
||||
+struct vop2_clk_branch {
|
||||
+ enum vop_clk_branch_type branch_type;
|
||||
+ const char *name;
|
||||
+ const char *const *parent_names;
|
||||
+ u8 num_parents;
|
||||
+ unsigned long flags;
|
||||
+ u8 div_shift;
|
||||
+ u8 div_width;
|
||||
+ u8 div_flags;
|
||||
+};
|
||||
+
|
||||
+PNAME(mux_port0_dclk_src_p) = { "dclk0", "dclk1" };
|
||||
+PNAME(mux_port2_dclk_src_p) = { "dclk2", "dclk1" };
|
||||
+PNAME(mux_dp_pixclk_p) = { "dclk_out0", "dclk_out1", "dclk_out2" };
|
||||
+PNAME(mux_hdmi_edp_clk_src_p) = { "dclk0", "dclk1", "dclk2" };
|
||||
+PNAME(mux_mipi_clk_src_p) = { "dclk_out1", "dclk_out2", "dclk_out3" };
|
||||
+PNAME(mux_dsc_8k_clk_src_p) = { "dclk0", "dclk1", "dclk2", "dclk3" };
|
||||
+PNAME(mux_dsc_4k_clk_src_p) = { "dclk0", "dclk1", "dclk2", "dclk3" };
|
||||
+
|
||||
+/*
|
||||
+ * We only use this clk driver calculate the div
|
||||
+ * of dclk_core/dclk_out/if_pixclk/if_dclk and
|
||||
+ * the rate of the dclk from the soc.
|
||||
+ *
|
||||
+ * We don't touch the cru in the vop here, as
|
||||
+ * these registers has special read andy write
|
||||
+ * limits.
|
||||
+ */
|
||||
+static struct vop2_clk_branch rk3588_vop_clk_branches[] = {
|
||||
+ VIR("dclk0"),
|
||||
+ VIR("dclk1"),
|
||||
+ VIR("dclk2"),
|
||||
+ VIR("dclk3"),
|
||||
+
|
||||
+ MUX("port0_dclk_src", mux_port0_dclk_src_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("dclk_core0", "port0_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+ DIV("dclk_out0", "port0_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+
|
||||
+ FACTOR("port1_dclk_src", "dclk1", CLK_SET_RATE_PARENT),
|
||||
+ DIV("dclk_core1", "port1_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+ DIV("dclk_out1", "port1_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+
|
||||
+ MUX("port2_dclk_src", mux_port2_dclk_src_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("dclk_core2", "port2_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+ DIV("dclk_out2", "port2_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+
|
||||
+ FACTOR("port3_dclk_src", "dclk3", CLK_SET_RATE_PARENT),
|
||||
+ DIV("dclk_core3", "port3_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+ DIV("dclk_out3", "port3_dclk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+
|
||||
+ MUX("dp0_pixclk", mux_dp_pixclk_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ MUX("dp1_pixclk", mux_dp_pixclk_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+
|
||||
+ MUX("hdmi_edp0_clk_src", mux_hdmi_edp_clk_src_p,
|
||||
+ CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("hdmi_edp0_dclk", "hdmi_edp0_clk_src", 0, 2),
|
||||
+ DIV("hdmi_edp0_pixclk", "hdmi_edp0_clk_src", CLK_SET_RATE_PARENT, 1),
|
||||
+
|
||||
+ MUX("hdmi_edp1_clk_src", mux_hdmi_edp_clk_src_p,
|
||||
+ CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("hdmi_edp1_dclk", "hdmi_edp1_clk_src", 0, 2),
|
||||
+ DIV("hdmi_edp1_pixclk", "hdmi_edp1_clk_src", CLK_SET_RATE_PARENT, 1),
|
||||
+
|
||||
+ MUX("mipi0_clk_src", mux_mipi_clk_src_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("mipi0_pixclk", "mipi0_clk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+
|
||||
+ MUX("mipi1_clk_src", mux_mipi_clk_src_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("mipi1_pixclk", "mipi1_clk_src", CLK_SET_RATE_PARENT, 2),
|
||||
+
|
||||
+ FACTOR("rgb_pixclk", "port3_dclk_src", CLK_SET_RATE_PARENT),
|
||||
+
|
||||
+ MUX("dsc_8k_txp_clk_src", mux_dsc_8k_clk_src_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("dsc_8k_txp_clk", "dsc_8k_txp_clk_src", 0, 2),
|
||||
+ DIV("dsc_8k_pxl_clk", "dsc_8k_txp_clk_src", 0, 2),
|
||||
+ DIV("dsc_8k_cds_clk", "dsc_8k_txp_clk_src", 0, 2),
|
||||
+
|
||||
+ MUX("dsc_4k_txp_clk_src", mux_dsc_4k_clk_src_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT),
|
||||
+ DIV("dsc_4k_txp_clk", "dsc_4k_txp_clk_src", 0, 2),
|
||||
+ DIV("dsc_4k_pxl_clk", "dsc_4k_txp_clk_src", 0, 2),
|
||||
+ DIV("dsc_4k_cds_clk", "dsc_4k_txp_clk_src", 0, 2),
|
||||
+};
|
||||
+
|
||||
+static unsigned long clk_virtual_recalc_rate(struct clk_hw *hw,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+
|
||||
+ return (unsigned long)vop2_clk->rate;
|
||||
+}
|
||||
+
|
||||
+static long clk_virtual_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long *prate)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+
|
||||
+ vop2_clk->rate = rate;
|
||||
+
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static int clk_virtual_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+const struct clk_ops clk_virtual_ops = {
|
||||
+ .round_rate = clk_virtual_round_rate,
|
||||
+ .set_rate = clk_virtual_set_rate,
|
||||
+ .recalc_rate = clk_virtual_recalc_rate,
|
||||
+};
|
||||
+
|
||||
+static u8 vop2_mux_get_parent(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+
|
||||
+ // cru_dbg("%s index: %d\n", clk_hw_get_name(hw), vop2_clk->parent_index);
|
||||
+ return vop2_clk->parent_index;
|
||||
+}
|
||||
+
|
||||
+static int vop2_mux_set_parent(struct clk_hw *hw, u8 index)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+
|
||||
+ vop2_clk->parent_index = index;
|
||||
+
|
||||
+ // cru_dbg("%s index: %d\n", clk_hw_get_name(hw), index);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int vop2_clk_mux_determine_rate(struct clk_hw *hw,
|
||||
+ struct clk_rate_request *req)
|
||||
+{
|
||||
+ // cru_dbg("%s %ld(min: %ld max: %ld)\n",
|
||||
+ // clk_hw_get_name(hw), req->rate, req->min_rate, req->max_rate);
|
||||
+ return __clk_mux_determine_rate(hw, req);
|
||||
+}
|
||||
+
|
||||
+static const struct clk_ops vop2_mux_clk_ops = {
|
||||
+ .get_parent = vop2_mux_get_parent,
|
||||
+ .set_parent = vop2_mux_set_parent,
|
||||
+ .determine_rate = vop2_clk_mux_determine_rate,
|
||||
+};
|
||||
+
|
||||
+#define div_mask(width) ((1 << (width)) - 1)
|
||||
+
|
||||
+static int vop2_div_get_val(unsigned long rate, unsigned long parent_rate)
|
||||
+{
|
||||
+ unsigned int div, value;
|
||||
+
|
||||
+ div = DIV_ROUND_UP_ULL((u64)parent_rate, rate);
|
||||
+
|
||||
+ value = ilog2(div);
|
||||
+
|
||||
+ return value;
|
||||
+}
|
||||
+
|
||||
+static unsigned long vop2_clk_div_recalc_rate(struct clk_hw *hw,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+ unsigned long rate;
|
||||
+ unsigned int div;
|
||||
+
|
||||
+ div = 1 << vop2_clk->div_val;
|
||||
+ rate = parent_rate / div;
|
||||
+
|
||||
+ // cru_dbg("%s rate: %ld(prate: %ld)\n", clk_hw_get_name(hw), rate, parent_rate);
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static long vop2_clk_div_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long *prate)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+
|
||||
+ if (clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT) {
|
||||
+ if (*prate < rate)
|
||||
+ *prate = rate;
|
||||
+ if ((*prate >> vop2_clk->div.width) > rate)
|
||||
+ *prate = rate;
|
||||
+
|
||||
+ if ((*prate % rate))
|
||||
+ *prate = rate;
|
||||
+
|
||||
+ /* SOC PLL can't output a too low pll freq */
|
||||
+ if (*prate < PLL_RATE_MIN)
|
||||
+ *prate = rate << vop2_clk->div.width;
|
||||
+ }
|
||||
+
|
||||
+ // cru_dbg("%s rate: %ld(prate: %ld)\n", clk_hw_get_name(hw), rate, *prate);
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static int vop2_clk_div_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate)
|
||||
+{
|
||||
+ struct vop2_clk *vop2_clk = to_vop2_clk(hw);
|
||||
+ int div_val;
|
||||
+
|
||||
+ div_val = vop2_div_get_val(rate, parent_rate);
|
||||
+ vop2_clk->div_val = div_val;
|
||||
+
|
||||
+ // cru_dbg("%s prate: %ld rate: %ld div_val: %d\n",
|
||||
+ // clk_hw_get_name(hw), parent_rate, rate, div_val);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct clk_ops vop2_div_clk_ops = {
|
||||
+ .recalc_rate = vop2_clk_div_recalc_rate,
|
||||
+ .round_rate = vop2_clk_div_round_rate,
|
||||
+ .set_rate = vop2_clk_div_set_rate,
|
||||
+};
|
||||
+
|
||||
+static struct clk *vop2_clk_register(struct vop2 *vop2, struct vop2_clk_branch *branch)
|
||||
+{
|
||||
+ struct clk_init_data init = {};
|
||||
+ struct vop2_clk *vop2_clk;
|
||||
+ struct clk *clk;
|
||||
+
|
||||
+ vop2_clk = devm_kzalloc(vop2->dev, sizeof(*vop2_clk), GFP_KERNEL);
|
||||
+ if (!vop2_clk)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ vop2_clk->vop2 = vop2;
|
||||
+ vop2_clk->hw.init = &init;
|
||||
+ vop2_clk->div.shift = branch->div_shift;
|
||||
+ vop2_clk->div.width = branch->div_width;
|
||||
+
|
||||
+ init.name = branch->name;
|
||||
+ init.flags = branch->flags;
|
||||
+ init.num_parents = branch->num_parents;
|
||||
+ init.parent_names = branch->parent_names;
|
||||
+ if (branch->branch_type == branch_divider) {
|
||||
+ init.ops = &vop2_div_clk_ops;
|
||||
+ } else if (branch->branch_type == branch_virtual) {
|
||||
+ init.ops = &clk_virtual_ops;
|
||||
+ init.num_parents = 0;
|
||||
+ init.parent_names = NULL;
|
||||
+ } else {
|
||||
+ init.ops = &vop2_mux_clk_ops;
|
||||
+ }
|
||||
+
|
||||
+ clk = devm_clk_register(vop2->dev, &vop2_clk->hw);
|
||||
+ if (!IS_ERR(clk))
|
||||
+ list_add_tail(&vop2_clk->list, &vop2->clk_list_head);
|
||||
+ else
|
||||
+ DRM_DEV_ERROR(vop2->dev, "Register %s failed\n", branch->name);
|
||||
+
|
||||
+ return clk;
|
||||
+}
|
||||
+
|
||||
+static int vop2_clk_init(struct vop2 *vop2)
|
||||
+{
|
||||
+ struct vop2_clk_branch *branch = rk3588_vop_clk_branches;
|
||||
+ unsigned int nr_clk = ARRAY_SIZE(rk3588_vop_clk_branches);
|
||||
+ unsigned int idx;
|
||||
+ struct vop2_clk *clk, *n;
|
||||
+
|
||||
+ INIT_LIST_HEAD(&vop2->clk_list_head);
|
||||
+
|
||||
+ if (vop2->data->soc_id < 3588 || vop2->hdmi0_phy_pll == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ list_for_each_entry_safe(clk, n, &vop2->clk_list_head, list) {
|
||||
+ list_del(&clk->list);
|
||||
+ }
|
||||
+
|
||||
+ for (idx = 0; idx < nr_clk; idx++, branch++)
|
||||
+ vop2_clk_register(vop2, branch);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+/*
|
||||
+ * END virtual clock
|
||||
+ */
|
||||
+
|
||||
static int vop2_bind(struct device *dev, struct device *master, void *data)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
@@ -3167,6 +3709,12 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
|
||||
return PTR_ERR(vop2->pclk);
|
||||
}
|
||||
|
||||
+ vop2->hdmi0_phy_pll = devm_clk_get_optional(vop2->drm->dev, "hdmi0_phy_pll");
|
||||
+ if (IS_ERR(vop2->hdmi0_phy_pll)) {
|
||||
+ DRM_DEV_ERROR(vop2->dev, "failed to get hdmi0_phy_pll source\n");
|
||||
+ return PTR_ERR(vop2->hdmi0_phy_pll);
|
||||
+ }
|
||||
+
|
||||
vop2->irq = platform_get_irq(pdev, 0);
|
||||
if (vop2->irq < 0) {
|
||||
drm_err(vop2->drm, "cannot find irq for vop2\n");
|
||||
@@ -3183,6 +3731,9 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ // [CC:] rework virtual clock
|
||||
+ vop2_clk_init(vop2);
|
||||
+
|
||||
ret = vop2_find_rgb_encoder(vop2);
|
||||
if (ret >= 0) {
|
||||
vop2->rgb = rockchip_rgb_init(dev, &vop2->vps[ret].crtc,
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 19 Oct 2024 13:12:10 +0300
|
||||
Subject: arm64: dts: rockchip: Add HDMI0 node to rk3588
|
||||
|
||||
Add support for the HDMI0 output port found on RK3588 SoC.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 41 ++++++++++
|
||||
1 file changed, 41 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
@@ -1404,6 +1404,47 @@ i2s9_8ch: i2s@fddfc000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hdmi0: hdmi@fde80000 {
|
||||
+ compatible = "rockchip,rk3588-dw-hdmi-qp";
|
||||
+ reg = <0x0 0xfde80000 0x0 0x20000>;
|
||||
+ clocks = <&cru PCLK_HDMITX0>,
|
||||
+ <&cru CLK_HDMITX0_EARC>,
|
||||
+ <&cru CLK_HDMITX0_REF>,
|
||||
+ <&cru MCLK_I2S5_8CH_TX>,
|
||||
+ <&cru CLK_HDMIHDP0>,
|
||||
+ <&cru HCLK_VO1>;
|
||||
+ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
||||
+ interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
||||
+ phys = <&hdptxphy_hdmi0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmim0_tx0_cec &hdmim0_tx0_hpd
|
||||
+ &hdmim0_tx0_scl &hdmim0_tx0_sda>;
|
||||
+ power-domains = <&power RK3588_PD_VO1>;
|
||||
+ resets = <&cru SRST_HDMITX0_REF>, <&cru SRST_HDMIHDP0>;
|
||||
+ reset-names = "ref", "hdp";
|
||||
+ rockchip,grf = <&sys_grf>;
|
||||
+ rockchip,vo-grf = <&vo1_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ hdmi0_in: port@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi0_out: port@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
qos_gpu_m0: qos@fdf35000 {
|
||||
compatible = "rockchip,rk3588-qos", "syscon";
|
||||
reg = <0x0 0xfdf35000 0x0 0x20>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,215 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Wed, 16 Oct 2024 23:06:52 +0300
|
||||
Subject: dt-bindings: display: rockchip: Add schema for RK3588 HDMI TX
|
||||
Controller
|
||||
|
||||
Rockchip RK3588 SoC integrates the Synopsys DesignWare HDMI 2.1
|
||||
Quad-Pixel (QP) TX controller IP.
|
||||
|
||||
Since this is a new IP block, quite different from those used in the
|
||||
previous generations of Rockchip SoCs, add a dedicated binding file.
|
||||
|
||||
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml | 188 ++++++++++
|
||||
1 file changed, 188 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml
|
||||
new file mode 100644
|
||||
index 000000000000..111111111111
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml
|
||||
@@ -0,0 +1,188 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Rockchip DW HDMI QP TX Encoder
|
||||
+
|
||||
+maintainers:
|
||||
+ - Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
+
|
||||
+description: |
|
||||
+ Rockchip RK3588 SoC integrates the Synopsys DesignWare HDMI QP TX controller
|
||||
+ IP and a HDMI/eDP TX Combo PHY based on a Samsung IP block, providing the
|
||||
+ following features, among others:
|
||||
+
|
||||
+ * Fixed Rate Link (FRL)
|
||||
+ * Display Stream Compression (DSC)
|
||||
+ * 4K@120Hz and 8K@60Hz video modes
|
||||
+ * Variable Refresh Rate (VRR) including Quick Media Switching (QMS)
|
||||
+ * Fast Vactive (FVA)
|
||||
+ * SCDC I2C DDC access
|
||||
+ * Multi-stream audio
|
||||
+ * Enhanced Audio Return Channel (EARC)
|
||||
+
|
||||
+allOf:
|
||||
+ - $ref: /schemas/sound/dai-common.yaml#
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ enum:
|
||||
+ - rockchip,rk3588-dw-hdmi-qp
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ clocks:
|
||||
+ items:
|
||||
+ - description: Peripheral/APB bus clock
|
||||
+ - description: EARC RX biphase clock
|
||||
+ - description: Reference clock
|
||||
+ - description: Audio interface clock
|
||||
+ - description: TMDS/FRL link clock
|
||||
+ - description: Video datapath clock
|
||||
+
|
||||
+ clock-names:
|
||||
+ items:
|
||||
+ - const: pclk
|
||||
+ - const: earc
|
||||
+ - const: ref
|
||||
+ - const: aud
|
||||
+ - const: hdp
|
||||
+ - const: hclk_vo1
|
||||
+
|
||||
+ interrupts:
|
||||
+ items:
|
||||
+ - description: AVP Unit interrupt
|
||||
+ - description: CEC interrupt
|
||||
+ - description: eARC RX interrupt
|
||||
+ - description: Main Unit interrupt
|
||||
+ - description: HPD interrupt
|
||||
+
|
||||
+ interrupt-names:
|
||||
+ items:
|
||||
+ - const: avp
|
||||
+ - const: cec
|
||||
+ - const: earc
|
||||
+ - const: main
|
||||
+ - const: hpd
|
||||
+
|
||||
+ phys:
|
||||
+ maxItems: 1
|
||||
+ description: The HDMI/eDP PHY
|
||||
+
|
||||
+ ports:
|
||||
+ $ref: /schemas/graph.yaml#/properties/ports
|
||||
+
|
||||
+ properties:
|
||||
+ port@0:
|
||||
+ $ref: /schemas/graph.yaml#/properties/port
|
||||
+ description: Video port for RGB/YUV input.
|
||||
+
|
||||
+ port@1:
|
||||
+ $ref: /schemas/graph.yaml#/properties/port
|
||||
+ description: Video port for HDMI/eDP output.
|
||||
+
|
||||
+ required:
|
||||
+ - port@0
|
||||
+ - port@1
|
||||
+
|
||||
+ power-domains:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ resets:
|
||||
+ maxItems: 2
|
||||
+
|
||||
+ reset-names:
|
||||
+ items:
|
||||
+ - const: ref
|
||||
+ - const: hdp
|
||||
+
|
||||
+ "#sound-dai-cells":
|
||||
+ const: 0
|
||||
+
|
||||
+ rockchip,grf:
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ description:
|
||||
+ Some HDMI QP related data is accessed through SYS GRF regs.
|
||||
+
|
||||
+ rockchip,vo-grf:
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ description:
|
||||
+ Additional HDMI QP related data is accessed through VO GRF regs.
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+ - clocks
|
||||
+ - clock-names
|
||||
+ - interrupts
|
||||
+ - interrupt-names
|
||||
+ - phys
|
||||
+ - ports
|
||||
+ - resets
|
||||
+ - reset-names
|
||||
+ - rockchip,grf
|
||||
+ - rockchip,vo-grf
|
||||
+
|
||||
+unevaluatedProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ #include <dt-bindings/clock/rockchip,rk3588-cru.h>
|
||||
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+ #include <dt-bindings/interrupt-controller/irq.h>
|
||||
+ #include <dt-bindings/power/rk3588-power.h>
|
||||
+ #include <dt-bindings/reset/rockchip,rk3588-cru.h>
|
||||
+
|
||||
+ soc {
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ hdmi@fde80000 {
|
||||
+ compatible = "rockchip,rk3588-dw-hdmi-qp";
|
||||
+ reg = <0x0 0xfde80000 0x0 0x20000>;
|
||||
+ clocks = <&cru PCLK_HDMITX0>,
|
||||
+ <&cru CLK_HDMITX0_EARC>,
|
||||
+ <&cru CLK_HDMITX0_REF>,
|
||||
+ <&cru MCLK_I2S5_8CH_TX>,
|
||||
+ <&cru CLK_HDMIHDP0>,
|
||||
+ <&cru HCLK_VO1>;
|
||||
+ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
||||
+ interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
||||
+ phys = <&hdptxphy_hdmi0>;
|
||||
+ power-domains = <&power RK3588_PD_VO1>;
|
||||
+ resets = <&cru SRST_HDMITX0_REF>, <&cru SRST_HDMIHDP0>;
|
||||
+ reset-names = "ref", "hdp";
|
||||
+ rockchip,grf = <&sys_grf>;
|
||||
+ rockchip,vo-grf = <&vo1_grf>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ hdmi0_out_con0: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con0_in>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,522 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Wed, 16 Oct 2024 23:06:53 +0300
|
||||
Subject: drm/rockchip: Add basic RK3588 HDMI output support
|
||||
|
||||
The RK3588 SoC family integrates the newer Synopsys DesignWare HDMI 2.1
|
||||
Quad-Pixel (QP) TX controller IP and a HDMI/eDP TX Combo PHY based on a
|
||||
Samsung IP block.
|
||||
|
||||
Add just the basic support for now, i.e. RGB output up to 4K@60Hz,
|
||||
without audio, CEC or any of the HDMI 2.1 specific features.
|
||||
|
||||
Co-developed-by: Algea Cao <algea.cao@rock-chips.com>
|
||||
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
|
||||
Tested-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Reviewed-by: Maxime Ripard <mripard@kernel.org>
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/Kconfig | 9 +
|
||||
drivers/gpu/drm/rockchip/Makefile | 1 +
|
||||
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 424 ++++++++++
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 +
|
||||
5 files changed, 437 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/Kconfig
|
||||
+++ b/drivers/gpu/drm/rockchip/Kconfig
|
||||
@@ -8,6 +8,7 @@ config DRM_ROCKCHIP
|
||||
select VIDEOMODE_HELPERS
|
||||
select DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP
|
||||
select DRM_DW_HDMI if ROCKCHIP_DW_HDMI
|
||||
+ select DRM_DW_HDMI_QP if ROCKCHIP_DW_HDMI_QP
|
||||
select DRM_DW_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI
|
||||
select GENERIC_PHY if ROCKCHIP_DW_MIPI_DSI
|
||||
select GENERIC_PHY_MIPI_DPHY if ROCKCHIP_DW_MIPI_DSI
|
||||
@@ -63,6 +64,14 @@ config ROCKCHIP_DW_HDMI
|
||||
enable HDMI on RK3288 or RK3399 based SoC, you should select
|
||||
this option.
|
||||
|
||||
+config ROCKCHIP_DW_HDMI_QP
|
||||
+ bool "Rockchip specific extensions for Synopsys DW HDMI QP"
|
||||
+ select DRM_BRIDGE_CONNECTOR
|
||||
+ help
|
||||
+ This selects support for Rockchip SoC specific extensions
|
||||
+ for the Synopsys DesignWare HDMI QP driver. If you want to
|
||||
+ enable HDMI on RK3588 based SoC, you should select this option.
|
||||
+
|
||||
config ROCKCHIP_DW_MIPI_DSI
|
||||
bool "Rockchip specific extensions for Synopsys DW MIPI DSI"
|
||||
select GENERIC_PHY_MIPI_DPHY
|
||||
diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/Makefile
|
||||
+++ b/drivers/gpu/drm/rockchip/Makefile
|
||||
@@ -11,6 +11,7 @@ rockchipdrm-$(CONFIG_ROCKCHIP_VOP) += rockchip_drm_vop.o rockchip_vop_reg.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp-core.o cdn-dp-reg.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o
|
||||
+rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI_QP) += dw_hdmi_qp-rockchip.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi-rockchip.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_LVDS) += rockchip_lvds.o
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
|
||||
new file mode 100644
|
||||
index 000000000000..111111111111
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
|
||||
@@ -0,0 +1,424 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+/*
|
||||
+ * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd.
|
||||
+ * Copyright (c) 2024 Collabora Ltd.
|
||||
+ *
|
||||
+ * Author: Algea Cao <algea.cao@rock-chips.com>
|
||||
+ * Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/mfd/syscon.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/phy/phy.h>
|
||||
+#include <linux/regmap.h>
|
||||
+#include <linux/workqueue.h>
|
||||
+
|
||||
+#include <drm/bridge/dw_hdmi_qp.h>
|
||||
+#include <drm/display/drm_hdmi_helper.h>
|
||||
+#include <drm/drm_bridge_connector.h>
|
||||
+#include <drm/drm_of.h>
|
||||
+#include <drm/drm_probe_helper.h>
|
||||
+#include <drm/drm_simple_kms_helper.h>
|
||||
+
|
||||
+#include "rockchip_drm_drv.h"
|
||||
+
|
||||
+#define RK3588_GRF_SOC_CON2 0x0308
|
||||
+#define RK3588_HDMI0_HPD_INT_MSK BIT(13)
|
||||
+#define RK3588_HDMI0_HPD_INT_CLR BIT(12)
|
||||
+#define RK3588_GRF_SOC_CON7 0x031c
|
||||
+#define RK3588_SET_HPD_PATH_MASK GENMASK(13, 12)
|
||||
+#define RK3588_GRF_SOC_STATUS1 0x0384
|
||||
+#define RK3588_HDMI0_LEVEL_INT BIT(16)
|
||||
+#define RK3588_GRF_VO1_CON3 0x000c
|
||||
+#define RK3588_SCLIN_MASK BIT(9)
|
||||
+#define RK3588_SDAIN_MASK BIT(10)
|
||||
+#define RK3588_MODE_MASK BIT(11)
|
||||
+#define RK3588_I2S_SEL_MASK BIT(13)
|
||||
+#define RK3588_GRF_VO1_CON9 0x0024
|
||||
+#define RK3588_HDMI0_GRANT_SEL BIT(10)
|
||||
+
|
||||
+#define HIWORD_UPDATE(val, mask) ((val) | (mask) << 16)
|
||||
+#define HOTPLUG_DEBOUNCE_MS 150
|
||||
+
|
||||
+struct rockchip_hdmi_qp {
|
||||
+ struct device *dev;
|
||||
+ struct regmap *regmap;
|
||||
+ struct regmap *vo_regmap;
|
||||
+ struct rockchip_encoder encoder;
|
||||
+ struct clk *ref_clk;
|
||||
+ struct dw_hdmi_qp *hdmi;
|
||||
+ struct phy *phy;
|
||||
+ struct gpio_desc *enable_gpio;
|
||||
+ struct delayed_work hpd_work;
|
||||
+};
|
||||
+
|
||||
+static struct rockchip_hdmi_qp *to_rockchip_hdmi_qp(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
|
||||
+
|
||||
+ return container_of(rkencoder, struct rockchip_hdmi_qp, encoder);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_rockchip_encoder_enable(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = to_rockchip_hdmi_qp(encoder);
|
||||
+ struct drm_crtc *crtc = encoder->crtc;
|
||||
+ unsigned long long rate;
|
||||
+
|
||||
+ /* Unconditionally switch to TMDS as FRL is not yet supported */
|
||||
+ gpiod_set_value(hdmi->enable_gpio, 1);
|
||||
+
|
||||
+ if (crtc && crtc->state) {
|
||||
+ rate = drm_hdmi_compute_mode_clock(&crtc->state->adjusted_mode,
|
||||
+ 8, HDMI_COLORSPACE_RGB);
|
||||
+ clk_set_rate(hdmi->ref_clk, rate);
|
||||
+ /*
|
||||
+ * FIXME: Temporary workaround to pass pixel clock rate
|
||||
+ * to the PHY driver until phy_configure_opts_hdmi
|
||||
+ * becomes available in the PHY API. See also the related
|
||||
+ * comment in rk_hdptx_phy_power_on() from
|
||||
+ * drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
|
||||
+ */
|
||||
+ phy_set_bus_width(hdmi->phy, rate / 100);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+dw_hdmi_qp_rockchip_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
+ struct drm_crtc_state *crtc_state,
|
||||
+ struct drm_connector_state *conn_state)
|
||||
+{
|
||||
+ struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);
|
||||
+
|
||||
+ s->output_mode = ROCKCHIP_OUT_MODE_AAAA;
|
||||
+ s->output_type = DRM_MODE_CONNECTOR_HDMIA;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct
|
||||
+drm_encoder_helper_funcs dw_hdmi_qp_rockchip_encoder_helper_funcs = {
|
||||
+ .enable = dw_hdmi_qp_rockchip_encoder_enable,
|
||||
+ .atomic_check = dw_hdmi_qp_rockchip_encoder_atomic_check,
|
||||
+};
|
||||
+
|
||||
+static int dw_hdmi_qp_rk3588_phy_init(struct dw_hdmi_qp *dw_hdmi, void *data)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data;
|
||||
+
|
||||
+ return phy_power_on(hdmi->phy);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_rk3588_phy_disable(struct dw_hdmi_qp *dw_hdmi,
|
||||
+ void *data)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data;
|
||||
+
|
||||
+ phy_power_off(hdmi->phy);
|
||||
+}
|
||||
+
|
||||
+static enum drm_connector_status
|
||||
+dw_hdmi_qp_rk3588_read_hpd(struct dw_hdmi_qp *dw_hdmi, void *data)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data;
|
||||
+ u32 val;
|
||||
+
|
||||
+ regmap_read(hdmi->regmap, RK3588_GRF_SOC_STATUS1, &val);
|
||||
+
|
||||
+ return val & RK3588_HDMI0_LEVEL_INT ?
|
||||
+ connector_status_connected : connector_status_disconnected;
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_rk3588_setup_hpd(struct dw_hdmi_qp *dw_hdmi, void *data)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data;
|
||||
+
|
||||
+ regmap_write(hdmi->regmap,
|
||||
+ RK3588_GRF_SOC_CON2,
|
||||
+ HIWORD_UPDATE(RK3588_HDMI0_HPD_INT_CLR,
|
||||
+ RK3588_HDMI0_HPD_INT_CLR |
|
||||
+ RK3588_HDMI0_HPD_INT_MSK));
|
||||
+}
|
||||
+
|
||||
+static const struct dw_hdmi_qp_phy_ops rk3588_hdmi_phy_ops = {
|
||||
+ .init = dw_hdmi_qp_rk3588_phy_init,
|
||||
+ .disable = dw_hdmi_qp_rk3588_phy_disable,
|
||||
+ .read_hpd = dw_hdmi_qp_rk3588_read_hpd,
|
||||
+ .setup_hpd = dw_hdmi_qp_rk3588_setup_hpd,
|
||||
+};
|
||||
+
|
||||
+static void dw_hdmi_qp_rk3588_hpd_work(struct work_struct *work)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = container_of(work,
|
||||
+ struct rockchip_hdmi_qp,
|
||||
+ hpd_work.work);
|
||||
+ struct drm_device *drm = hdmi->encoder.encoder.dev;
|
||||
+ bool changed;
|
||||
+
|
||||
+ if (drm) {
|
||||
+ changed = drm_helper_hpd_irq_event(drm);
|
||||
+ if (changed)
|
||||
+ drm_dbg(hdmi, "connector status changed\n");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t dw_hdmi_qp_rk3588_hardirq(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = dev_id;
|
||||
+ u32 intr_stat, val;
|
||||
+
|
||||
+ regmap_read(hdmi->regmap, RK3588_GRF_SOC_STATUS1, &intr_stat);
|
||||
+
|
||||
+ if (intr_stat) {
|
||||
+ val = HIWORD_UPDATE(RK3588_HDMI0_HPD_INT_MSK,
|
||||
+ RK3588_HDMI0_HPD_INT_MSK);
|
||||
+ regmap_write(hdmi->regmap, RK3588_GRF_SOC_CON2, val);
|
||||
+ return IRQ_WAKE_THREAD;
|
||||
+ }
|
||||
+
|
||||
+ return IRQ_NONE;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t dw_hdmi_qp_rk3588_irq(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = dev_id;
|
||||
+ u32 intr_stat, val;
|
||||
+
|
||||
+ regmap_read(hdmi->regmap, RK3588_GRF_SOC_STATUS1, &intr_stat);
|
||||
+ if (!intr_stat)
|
||||
+ return IRQ_NONE;
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_HDMI0_HPD_INT_CLR,
|
||||
+ RK3588_HDMI0_HPD_INT_CLR);
|
||||
+ regmap_write(hdmi->regmap, RK3588_GRF_SOC_CON2, val);
|
||||
+
|
||||
+ mod_delayed_work(system_wq, &hdmi->hpd_work,
|
||||
+ msecs_to_jiffies(HOTPLUG_DEBOUNCE_MS));
|
||||
+
|
||||
+ val |= HIWORD_UPDATE(0, RK3588_HDMI0_HPD_INT_MSK);
|
||||
+ regmap_write(hdmi->regmap, RK3588_GRF_SOC_CON2, val);
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id dw_hdmi_qp_rockchip_dt_ids[] = {
|
||||
+ { .compatible = "rockchip,rk3588-dw-hdmi-qp",
|
||||
+ .data = &rk3588_hdmi_phy_ops },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, dw_hdmi_qp_rockchip_dt_ids);
|
||||
+
|
||||
+static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
|
||||
+ void *data)
|
||||
+{
|
||||
+ static const char * const clk_names[] = {
|
||||
+ "pclk", "earc", "aud", "hdp", "hclk_vo1",
|
||||
+ "ref" /* keep "ref" last */
|
||||
+ };
|
||||
+ struct platform_device *pdev = to_platform_device(dev);
|
||||
+ struct dw_hdmi_qp_plat_data plat_data;
|
||||
+ struct drm_device *drm = data;
|
||||
+ struct drm_connector *connector;
|
||||
+ struct drm_encoder *encoder;
|
||||
+ struct rockchip_hdmi_qp *hdmi;
|
||||
+ struct clk *clk;
|
||||
+ int ret, irq, i;
|
||||
+ u32 val;
|
||||
+
|
||||
+ if (!pdev->dev.of_node)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
|
||||
+ if (!hdmi)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ plat_data.phy_ops = of_device_get_match_data(dev);
|
||||
+ if (!plat_data.phy_ops)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ plat_data.phy_data = hdmi;
|
||||
+ hdmi->dev = &pdev->dev;
|
||||
+
|
||||
+ encoder = &hdmi->encoder.encoder;
|
||||
+ encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
|
||||
+
|
||||
+ rockchip_drm_encoder_set_crtc_endpoint_id(&hdmi->encoder,
|
||||
+ dev->of_node, 0, 0);
|
||||
+ /*
|
||||
+ * If we failed to find the CRTC(s) which this encoder is
|
||||
+ * supposed to be connected to, it's because the CRTC has
|
||||
+ * not been registered yet. Defer probing, and hope that
|
||||
+ * the required CRTC is added later.
|
||||
+ */
|
||||
+ if (encoder->possible_crtcs == 0)
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ hdmi->regmap = syscon_regmap_lookup_by_phandle(dev->of_node,
|
||||
+ "rockchip,grf");
|
||||
+ if (IS_ERR(hdmi->regmap)) {
|
||||
+ drm_err(hdmi, "Unable to get rockchip,grf\n");
|
||||
+ return PTR_ERR(hdmi->regmap);
|
||||
+ }
|
||||
+
|
||||
+ hdmi->vo_regmap = syscon_regmap_lookup_by_phandle(dev->of_node,
|
||||
+ "rockchip,vo-grf");
|
||||
+ if (IS_ERR(hdmi->vo_regmap)) {
|
||||
+ drm_err(hdmi, "Unable to get rockchip,vo-grf\n");
|
||||
+ return PTR_ERR(hdmi->vo_regmap);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(clk_names); i++) {
|
||||
+ clk = devm_clk_get_enabled(hdmi->dev, clk_names[i]);
|
||||
+
|
||||
+ if (IS_ERR(clk)) {
|
||||
+ ret = PTR_ERR(clk);
|
||||
+ if (ret != -EPROBE_DEFER)
|
||||
+ drm_err(hdmi, "Failed to get %s clock: %d\n",
|
||||
+ clk_names[i], ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+ hdmi->ref_clk = clk;
|
||||
+
|
||||
+ hdmi->enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
|
||||
+ GPIOD_OUT_HIGH);
|
||||
+ if (IS_ERR(hdmi->enable_gpio)) {
|
||||
+ ret = PTR_ERR(hdmi->enable_gpio);
|
||||
+ drm_err(hdmi, "Failed to request enable GPIO: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ hdmi->phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
|
||||
+ if (IS_ERR(hdmi->phy)) {
|
||||
+ ret = PTR_ERR(hdmi->phy);
|
||||
+ if (ret != -EPROBE_DEFER)
|
||||
+ drm_err(hdmi, "failed to get phy: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_SCLIN_MASK, RK3588_SCLIN_MASK) |
|
||||
+ HIWORD_UPDATE(RK3588_SDAIN_MASK, RK3588_SDAIN_MASK) |
|
||||
+ HIWORD_UPDATE(RK3588_MODE_MASK, RK3588_MODE_MASK) |
|
||||
+ HIWORD_UPDATE(RK3588_I2S_SEL_MASK, RK3588_I2S_SEL_MASK);
|
||||
+ regmap_write(hdmi->vo_regmap, RK3588_GRF_VO1_CON3, val);
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_SET_HPD_PATH_MASK,
|
||||
+ RK3588_SET_HPD_PATH_MASK);
|
||||
+ regmap_write(hdmi->regmap, RK3588_GRF_SOC_CON7, val);
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_HDMI0_GRANT_SEL,
|
||||
+ RK3588_HDMI0_GRANT_SEL);
|
||||
+ regmap_write(hdmi->vo_regmap, RK3588_GRF_VO1_CON9, val);
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_HDMI0_HPD_INT_MSK, RK3588_HDMI0_HPD_INT_MSK);
|
||||
+ regmap_write(hdmi->regmap, RK3588_GRF_SOC_CON2, val);
|
||||
+
|
||||
+ INIT_DELAYED_WORK(&hdmi->hpd_work, dw_hdmi_qp_rk3588_hpd_work);
|
||||
+
|
||||
+ plat_data.main_irq = platform_get_irq_byname(pdev, "main");
|
||||
+ if (plat_data.main_irq < 0)
|
||||
+ return plat_data.main_irq;
|
||||
+
|
||||
+ irq = platform_get_irq_byname(pdev, "hpd");
|
||||
+ if (irq < 0)
|
||||
+ return irq;
|
||||
+
|
||||
+ ret = devm_request_threaded_irq(hdmi->dev, irq,
|
||||
+ dw_hdmi_qp_rk3588_hardirq,
|
||||
+ dw_hdmi_qp_rk3588_irq,
|
||||
+ IRQF_SHARED, "dw-hdmi-qp-hpd",
|
||||
+ hdmi);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ drm_encoder_helper_add(encoder, &dw_hdmi_qp_rockchip_encoder_helper_funcs);
|
||||
+ drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, hdmi);
|
||||
+
|
||||
+ hdmi->hdmi = dw_hdmi_qp_bind(pdev, encoder, &plat_data);
|
||||
+ if (IS_ERR(hdmi->hdmi)) {
|
||||
+ ret = PTR_ERR(hdmi->hdmi);
|
||||
+ drm_encoder_cleanup(encoder);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ connector = drm_bridge_connector_init(drm, encoder);
|
||||
+ if (IS_ERR(connector)) {
|
||||
+ ret = PTR_ERR(connector);
|
||||
+ drm_err(hdmi, "failed to init bridge connector: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return drm_connector_attach_encoder(connector, encoder);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_rockchip_unbind(struct device *dev,
|
||||
+ struct device *master,
|
||||
+ void *data)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = dev_get_drvdata(dev);
|
||||
+
|
||||
+ cancel_delayed_work_sync(&hdmi->hpd_work);
|
||||
+
|
||||
+ drm_encoder_cleanup(&hdmi->encoder.encoder);
|
||||
+}
|
||||
+
|
||||
+static const struct component_ops dw_hdmi_qp_rockchip_ops = {
|
||||
+ .bind = dw_hdmi_qp_rockchip_bind,
|
||||
+ .unbind = dw_hdmi_qp_rockchip_unbind,
|
||||
+};
|
||||
+
|
||||
+static int dw_hdmi_qp_rockchip_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ return component_add(&pdev->dev, &dw_hdmi_qp_rockchip_ops);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_rockchip_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ component_del(&pdev->dev, &dw_hdmi_qp_rockchip_ops);
|
||||
+}
|
||||
+
|
||||
+static int __maybe_unused dw_hdmi_qp_rockchip_resume(struct device *dev)
|
||||
+{
|
||||
+ struct rockchip_hdmi_qp *hdmi = dev_get_drvdata(dev);
|
||||
+ u32 val;
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_SCLIN_MASK, RK3588_SCLIN_MASK) |
|
||||
+ HIWORD_UPDATE(RK3588_SDAIN_MASK, RK3588_SDAIN_MASK) |
|
||||
+ HIWORD_UPDATE(RK3588_MODE_MASK, RK3588_MODE_MASK) |
|
||||
+ HIWORD_UPDATE(RK3588_I2S_SEL_MASK, RK3588_I2S_SEL_MASK);
|
||||
+ regmap_write(hdmi->vo_regmap, RK3588_GRF_VO1_CON3, val);
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_SET_HPD_PATH_MASK,
|
||||
+ RK3588_SET_HPD_PATH_MASK);
|
||||
+ regmap_write(hdmi->regmap, RK3588_GRF_SOC_CON7, val);
|
||||
+
|
||||
+ val = HIWORD_UPDATE(RK3588_HDMI0_GRANT_SEL,
|
||||
+ RK3588_HDMI0_GRANT_SEL);
|
||||
+ regmap_write(hdmi->vo_regmap, RK3588_GRF_VO1_CON9, val);
|
||||
+
|
||||
+ dw_hdmi_qp_resume(dev, hdmi->hdmi);
|
||||
+
|
||||
+ if (hdmi->encoder.encoder.dev)
|
||||
+ drm_helper_hpd_irq_event(hdmi->encoder.encoder.dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct dev_pm_ops dw_hdmi_qp_rockchip_pm = {
|
||||
+ SET_SYSTEM_SLEEP_PM_OPS(NULL, dw_hdmi_qp_rockchip_resume)
|
||||
+};
|
||||
+
|
||||
+struct platform_driver dw_hdmi_qp_rockchip_pltfm_driver = {
|
||||
+ .probe = dw_hdmi_qp_rockchip_probe,
|
||||
+ .remove = dw_hdmi_qp_rockchip_remove,
|
||||
+ .driver = {
|
||||
+ .name = "dwhdmiqp-rockchip",
|
||||
+ .pm = &dw_hdmi_qp_rockchip_pm,
|
||||
+ .of_match_table = dw_hdmi_qp_rockchip_dt_ids,
|
||||
+ },
|
||||
+};
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
|
||||
@@ -507,6 +507,8 @@ static int __init rockchip_drm_init(void)
|
||||
ADD_ROCKCHIP_SUB_DRIVER(cdn_dp_driver, CONFIG_ROCKCHIP_CDN_DP);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(dw_hdmi_rockchip_pltfm_driver,
|
||||
CONFIG_ROCKCHIP_DW_HDMI);
|
||||
+ ADD_ROCKCHIP_SUB_DRIVER(dw_hdmi_qp_rockchip_pltfm_driver,
|
||||
+ CONFIG_ROCKCHIP_DW_HDMI_QP);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(dw_mipi_dsi_rockchip_driver,
|
||||
CONFIG_ROCKCHIP_DW_MIPI_DSI);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(inno_hdmi_driver, CONFIG_ROCKCHIP_INNO_HDMI);
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
|
||||
@@ -88,6 +88,7 @@ int rockchip_drm_encoder_set_crtc_endpoint_id(struct rockchip_encoder *rencoder,
|
||||
int rockchip_drm_endpoint_is_subdriver(struct device_node *ep);
|
||||
extern struct platform_driver cdn_dp_driver;
|
||||
extern struct platform_driver dw_hdmi_rockchip_pltfm_driver;
|
||||
+extern struct platform_driver dw_hdmi_qp_rockchip_pltfm_driver;
|
||||
extern struct platform_driver dw_mipi_dsi_rockchip_driver;
|
||||
extern struct platform_driver inno_hdmi_driver;
|
||||
extern struct platform_driver rockchip_dp_driver;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Detlev Casanova <detlev.casanova@collabora.com>
|
||||
Date: Fri, 3 May 2024 14:27:39 -0400
|
||||
Subject: vop2: Add clock resets support
|
||||
|
||||
At the end of initialization, each VP clock needs to be reset before
|
||||
they can be used.
|
||||
|
||||
Failing to do so can put the VOP in an undefined state where the
|
||||
generated HDMI signal is either lost or not matching the selected mode.
|
||||
|
||||
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 30 ++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regmap.h>
|
||||
+#include <linux/reset.h>
|
||||
#include <linux/swab.h>
|
||||
|
||||
#include <drm/drm.h>
|
||||
@@ -159,6 +160,7 @@ struct vop2_win {
|
||||
struct vop2_video_port {
|
||||
struct drm_crtc crtc;
|
||||
struct vop2 *vop2;
|
||||
+ struct reset_control *dclk_rst;
|
||||
struct clk *dclk;
|
||||
unsigned int id;
|
||||
const struct vop2_video_port_data *data;
|
||||
@@ -2064,6 +2066,26 @@ static struct vop2_clk *vop2_clk_get(struct vop2 *vop2, const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+static int vop2_clk_reset(struct vop2_video_port *vp)
|
||||
+{
|
||||
+ struct reset_control *rstc = vp->dclk_rst;
|
||||
+ struct vop2 *vop2 = vp->vop2;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!rstc)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = reset_control_assert(rstc);
|
||||
+ if (ret < 0)
|
||||
+ drm_warn(vop2->drm, "failed to assert reset\n");
|
||||
+ udelay(10);
|
||||
+ ret = reset_control_deassert(rstc);
|
||||
+ if (ret < 0)
|
||||
+ drm_warn(vop2->drm, "failed to deassert reset\n");
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
@@ -2233,6 +2255,8 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
|
||||
vop2_vp_write(vp, RK3568_VP_DSP_CTRL, dsp_ctrl);
|
||||
|
||||
+ vop2_clk_reset(vp);
|
||||
+
|
||||
drm_crtc_vblank_on(crtc);
|
||||
|
||||
vop2_unlock(vop2);
|
||||
@@ -2920,6 +2944,12 @@ static int vop2_create_crtcs(struct vop2 *vop2)
|
||||
vp->data = vp_data;
|
||||
|
||||
snprintf(dclk_name, sizeof(dclk_name), "dclk_vp%d", vp->id);
|
||||
+ vp->dclk_rst = devm_reset_control_get_optional(vop2->dev, dclk_name);
|
||||
+ if (IS_ERR(vp->dclk_rst)) {
|
||||
+ drm_err(vop2->drm, "failed to get %s reset\n", dclk_name);
|
||||
+ return PTR_ERR(vp->dclk_rst);
|
||||
+ }
|
||||
+
|
||||
vp->dclk = devm_clk_get(vop2->dev, dclk_name);
|
||||
if (IS_ERR(vp->dclk)) {
|
||||
drm_err(vop2->drm, "failed to get %s\n", dclk_name);
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Detlev Casanova <detlev.casanova@collabora.com>
|
||||
Date: Mon, 6 May 2024 13:54:01 -0400
|
||||
Subject: dt-bindings: display: vop2: Add VP clock resets
|
||||
|
||||
Add the documentation for VOP2 video ports reset clocks.
|
||||
One reset can be set per video port.
|
||||
|
||||
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml | 27 ++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
|
||||
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
|
||||
@@ -65,6 +65,22 @@ properties:
|
||||
- const: dclk_vp3
|
||||
- const: pclk_vop
|
||||
|
||||
+ resets:
|
||||
+ minItems: 3
|
||||
+ items:
|
||||
+ - description: Pixel clock reset for video port 0.
|
||||
+ - description: Pixel clock reset for video port 1.
|
||||
+ - description: Pixel clock reset for video port 2.
|
||||
+ - description: Pixel clock reset for video port 3.
|
||||
+
|
||||
+ reset-names:
|
||||
+ minItems: 3
|
||||
+ items:
|
||||
+ - const: dclk_vp0
|
||||
+ - const: dclk_vp1
|
||||
+ - const: dclk_vp2
|
||||
+ - const: dclk_vp3
|
||||
+
|
||||
rockchip,grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
@@ -128,6 +144,11 @@ allOf:
|
||||
clock-names:
|
||||
minItems: 7
|
||||
|
||||
+ resets:
|
||||
+ minItems: 4
|
||||
+ reset-names:
|
||||
+ minItems: 4
|
||||
+
|
||||
ports:
|
||||
required:
|
||||
- port@0
|
||||
@@ -183,6 +204,12 @@ examples:
|
||||
"dclk_vp0",
|
||||
"dclk_vp1",
|
||||
"dclk_vp2";
|
||||
+ resets = <&cru SRST_VOP0>,
|
||||
+ <&cru SRST_VOP1>,
|
||||
+ <&cru SRST_VOP2>;
|
||||
+ reset-names = "dclk_vp0",
|
||||
+ "dclk_vp1",
|
||||
+ "dclk_vp2";
|
||||
power-domains = <&power RK3568_PD_VO>;
|
||||
iommus = <&vop_mmu>;
|
||||
vop_out: ports {
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Fri, 2 Aug 2024 00:13:32 +0300
|
||||
Subject: arm64: dts: rockchip: rk3588: add VOP2 clock resets
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
@@ -1306,6 +1306,14 @@ vop: vop@fdd90000 {
|
||||
"pclk_vop";
|
||||
iommus = <&vop_mmu>;
|
||||
power-domains = <&power RK3588_PD_VOP>;
|
||||
+ resets = <&cru SRST_D_VOP0>,
|
||||
+ <&cru SRST_D_VOP1>,
|
||||
+ <&cru SRST_D_VOP2>,
|
||||
+ <&cru SRST_D_VOP3>;
|
||||
+ reset-names = "dclk_vp0",
|
||||
+ "dclk_vp1",
|
||||
+ "dclk_vp2",
|
||||
+ "dclk_vp3";
|
||||
rockchip,grf = <&sys_grf>;
|
||||
rockchip,vop-grf = <&vop_grf>;
|
||||
rockchip,vo1-grf = <&vo1_grf>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <unknown-email@domain.tld>
|
||||
Date: Wed, 28 Feb 2024 20:59:15 +0100
|
||||
Subject: net: wireless: brcmfmac: Add support for AP6275P
|
||||
|
||||
This module features BCM43752A2 chipset. The firmware requires
|
||||
randomness seeding, so enabled it.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 5 ++++-
|
||||
drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -70,6 +70,7 @@ BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie");
|
||||
BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie");
|
||||
BRCMF_FW_CLM_DEF(4378B3, "brcmfmac4378b3-pcie");
|
||||
BRCMF_FW_CLM_DEF(4387C2, "brcmfmac4387c2-pcie");
|
||||
+BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-pcie");
|
||||
|
||||
/* firmware config files */
|
||||
MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt");
|
||||
@@ -104,6 +105,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* revision ID 4 */
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0x0000000F, 4378B1), /* revision ID 3 */
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFE0, 4378B3), /* revision ID 5 */
|
||||
@@ -1715,7 +1717,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
|
||||
memcpy_toio(devinfo->tcm + address, nvram, nvram_len);
|
||||
brcmf_fw_nvram_free(nvram);
|
||||
|
||||
- if (devinfo->otp.valid) {
|
||||
+ if (devinfo->otp.valid || devinfo->ci->chip == BRCM_CC_43752_CHIP_ID) {
|
||||
size_t rand_len = BRCMF_RANDOM_SEED_LENGTH;
|
||||
struct brcmf_random_seed_footer footer = {
|
||||
.length = cpu_to_le32(rand_len),
|
||||
@@ -2695,6 +2697,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = {
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID, BCA),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID, WCC),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_43596_DEVICE_ID, CYW),
|
||||
+ BRCMF_PCIE_DEVICE(BRCM_PCIE_43752_DEVICE_ID, WCC),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC),
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
|
||||
@@ -52,6 +52,7 @@
|
||||
#define BRCM_CC_43664_CHIP_ID 43664
|
||||
#define BRCM_CC_43666_CHIP_ID 43666
|
||||
#define BRCM_CC_4371_CHIP_ID 0x4371
|
||||
+#define BRCM_CC_43752_CHIP_ID 43752
|
||||
#define BRCM_CC_4377_CHIP_ID 0x4377
|
||||
#define BRCM_CC_4378_CHIP_ID 0x4378
|
||||
#define BRCM_CC_4387_CHIP_ID 0x4387
|
||||
@@ -94,6 +95,7 @@
|
||||
#define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5
|
||||
#define BRCM_PCIE_4371_DEVICE_ID 0x440d
|
||||
#define BRCM_PCIE_43596_DEVICE_ID 0x4415
|
||||
+#define BRCM_PCIE_43752_DEVICE_ID 0x449d
|
||||
#define BRCM_PCIE_4377_DEVICE_ID 0x4488
|
||||
#define BRCM_PCIE_4378_DEVICE_ID 0x4425
|
||||
#define BRCM_PCIE_4387_DEVICE_ID 0x4433
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <unknown-email@domain.tld>
|
||||
Date: Wed, 28 Feb 2024 21:09:51 +0100
|
||||
Subject: net: wireless: brcmfmac: Add optional 32k clock enable support
|
||||
|
||||
WiFi modules often require 32kHz clock to function. Add support to
|
||||
enable the clock to pcie driver.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2014 Broadcom Corporation
|
||||
*/
|
||||
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
@@ -2408,6 +2409,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
struct brcmf_pciedev *pcie_bus_dev;
|
||||
struct brcmf_core *core;
|
||||
struct brcmf_bus *bus;
|
||||
+ struct clk *clk;
|
||||
|
||||
if (!id) {
|
||||
id = pci_match_id(brcmf_pcie_devid_table, pdev);
|
||||
@@ -2419,6 +2421,14 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
brcmf_dbg(PCIE, "Enter %x:%x\n", pdev->vendor, pdev->device);
|
||||
|
||||
+ clk = devm_clk_get_optional_enabled(&pdev->dev, "32k");
|
||||
+ if (IS_ERR(clk))
|
||||
+ return PTR_ERR(clk);
|
||||
+ if (clk) {
|
||||
+ dev_info(&pdev->dev, "enabling 32kHz clock\n");
|
||||
+ clk_set_rate(clk, 32768);
|
||||
+ }
|
||||
+
|
||||
ret = -ENOMEM;
|
||||
devinfo = kzalloc(sizeof(*devinfo), GFP_KERNEL);
|
||||
if (devinfo == NULL)
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: amazingfate <liujianfeng1994@gmail.com>
|
||||
Date: Wed, 27 Dec 2023 15:03:57 +0800
|
||||
Subject: arm64: dts: rock-5b: Slow down emmc to hs200 and add tsadc node
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -408,8 +408,7 @@ &sdhci {
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
- mmc-hs400-1_8v;
|
||||
- mmc-hs400-enhanced-strobe;
|
||||
+ mmc-hs200-1_8v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -463,6 +462,10 @@ flash@0 {
|
||||
};
|
||||
};
|
||||
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart6 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn &uart6m1_rtsn>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Mon, 15 Jan 2024 22:51:17 +0200
|
||||
Subject: arm64: dts: rockchip: Enable HDMI0 on rock-5b
|
||||
|
||||
Add the necessary DT changes to enable HDMI0 on Rock 5B.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 30 ++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -192,6 +193,20 @@ &gpu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdptxphy_hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
@@ -861,3 +876,18 @@ &usb_host1_xhci {
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Fri, 3 Nov 2023 20:05:05 +0200
|
||||
Subject: arm64: dts: rockchip: Make use of HDMI0 PHY PLL on rock-5b
|
||||
|
||||
The initial vop2 support for rk3588 in mainline is not able to handle
|
||||
all display modes supported by connected displays, e.g.
|
||||
2560x1440-75.00Hz, 2048x1152-60.00Hz, 1024x768-60.00Hz.
|
||||
|
||||
Additionally, it doesn't cope with non-integer refresh rates like 59.94,
|
||||
29.97, 23.98, etc.
|
||||
|
||||
Make use of the HDMI0 PHY PLL to support the additional display modes.
|
||||
|
||||
Note this requires commit "drm/rockchip: vop2: Improve display modes
|
||||
handling on rk3588", which needs a rework to be upstreamable.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -193,6 +193,11 @@ &gpu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&display_subsystem {
|
||||
+ clocks = <&hdptxphy_hdmi0>;
|
||||
+ clock-names = "hdmi0_phy_pll";
|
||||
+};
|
||||
+
|
||||
&hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Tue, 27 Feb 2024 16:04:42 +0300
|
||||
Subject: Add HDMI and VOP2 to Rock 5A
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 30 ++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.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/soc/rockchip,vop2.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -784,3 +785,32 @@ &usb_host1_ohci {
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdptxphy_hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: amazingfate <liujianfeng1994@gmail.com>
|
||||
Date: Thu, 28 Mar 2024 00:41:34 +0800
|
||||
Subject: arch: arm64: dts: enable gpu node for rock-5a
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -297,6 +297,11 @@ &gmac1_rgmii_clk
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@1 {
|
||||
/* RTL8211F */
|
||||
@@ -455,6 +460,7 @@ rk806_dvs3_null: dvs3-null-pins {
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
+ regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jianfeng Liu <liujianfeng1994@gmail.com>
|
||||
Date: Thu, 6 Jun 2024 23:28:01 +0800
|
||||
Subject: arm64: dts: rockchip: Add HDMI support to ArmSoM Sige7
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts | 35 ++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -159,11 +160,30 @@ &cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
+&display_subsystem {
|
||||
+ clocks = <&hdptxphy_hdmi0>;
|
||||
+ clock-names = "hdmi0_phy_pll";
|
||||
+};
|
||||
+
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdptxphy_hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
@@ -723,3 +743,18 @@ &usb_host1_xhci {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jianfeng Liu <liujianfeng1994@gmail.com>
|
||||
Date: Thu, 6 Jun 2024 23:29:39 +0800
|
||||
Subject: arm64: dts: rockchip: Add ap6275p wireless support to ArmSoM Sige7
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts | 16 ++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
@@ -288,6 +288,22 @@ &pcie2x1l0 {
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
+
|
||||
+ pcie@0,0 {
|
||||
+ reg = <0x300000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ device_type = "pci";
|
||||
+ bus-range = <0x30 0x3f>;
|
||||
+
|
||||
+ wifi: wifi@0,0 {
|
||||
+ compatible = "pci14e4,449d";
|
||||
+ reg = <0x310000 0 0 0 0>;
|
||||
+ clocks = <&hym8563>;
|
||||
+ clock-names = "32k";
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
/* phy0 - left ethernet port */
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Mon, 12 Feb 2024 17:35:13 +0300
|
||||
Subject: arm64: dts: rockchip: Add USB-C to Khadas Edge 2
|
||||
|
||||
Khadas Edge 2 has 2x Type-C port. One just supports PD and
|
||||
controlled by MCU. The other one supports PD, DP Alt mode and DRD. This
|
||||
commit adds support for DRD.
|
||||
|
||||
Signed-off-by: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 120 ++++++++++
|
||||
1 file changed, 120 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -76,6 +77,18 @@ blue_led: led-2 {
|
||||
};
|
||||
};
|
||||
|
||||
+ vbus5v0_typec: vbus5v0-typec-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vbus5v0_typec";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&typec5v_pwren>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_pcie_wl: vcc3v3-pcie-wl-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -224,6 +237,56 @@ regulator-state-mem {
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
+ usbc0: usb-typec@22 {
|
||||
+ compatible = "fcs,fusb302";
|
||||
+ reg = <0x22>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <RK_PB5 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&usbc0_int>;
|
||||
+ vbus-supply = <&vbus5v0_typec>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ usb_con: connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
+ label = "USB-C";
|
||||
+ data-role = "dual";
|
||||
+ power-role = "dual";
|
||||
+ try-power-role = "source";
|
||||
+ op-sink-microwatt = <1000000>;
|
||||
+ sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
|
||||
+ PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM)
|
||||
+ PDO_FIXED(12000, 3000, PDO_FIXED_USB_COMM)>;
|
||||
+ source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ usbc0_orien_sw: endpoint {
|
||||
+ remote-endpoint = <&usbdp_phy0_orientation_switch>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ usbc0_role_sw: endpoint {
|
||||
+ remote-endpoint = <&dwc3_0_role_switch>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ dp_altmode_mux: endpoint {
|
||||
+ remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
@@ -256,6 +319,16 @@ vcc5v0_host_en: vcc5v0-host-en {
|
||||
};
|
||||
};
|
||||
|
||||
+ usb-typec {
|
||||
+ usbc0_int: usbc0-int {
|
||||
+ rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ typec5v_pwren: typec5v-pwren {
|
||||
+ rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
ir-receiver {
|
||||
ir_receiver_pin: ir-receiver-pin {
|
||||
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -681,6 +754,15 @@ &uart9 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -707,6 +789,44 @@ &usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy0 {
|
||||
+ orientation-switch;
|
||||
+ mode-switch;
|
||||
+ svid = <0xff01>;
|
||||
+ sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
+ sbu2-dc-gpios = <&gpio4 RK_PA1 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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ 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_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Mon, 12 Feb 2024 17:35:13 +0300
|
||||
Subject: arm64: dts: rockchip: Add bluetooth support to Khadas Edge 2
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 18 +++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -750,8 +750,24 @@ &uart2 {
|
||||
|
||||
&uart9 {
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>;
|
||||
+ pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn &uart9m2_rtsn>;
|
||||
status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm43438-bt";
|
||||
+ clocks = <&hym8563>;
|
||||
+ clock-names = "lpo";
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PD5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "host-wakeup";
|
||||
+ device-wakeup-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||
+ shutdown-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
+ max-speed = <1500000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&bt_wake_host_irq &bt_wake_pin &bt_reset_pin>;
|
||||
+ vbat-supply = <&vcc_3v3_s3>;
|
||||
+ vddio-supply = <&vcc_1v8_s3>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&u2phy0 {
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Mon, 19 Feb 2024 23:32:11 +0300
|
||||
Subject: arm64: dts: rockchip: Add HDMI & VOP2 to Khadas Edge 2
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 53 ++++++++++
|
||||
1 file changed, 53 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -43,6 +44,17 @@ ir-receiver {
|
||||
pinctrl-0 = <&ir_receiver_pin>;
|
||||
};
|
||||
|
||||
+ hdmi0-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi0_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi0_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
@@ -830,6 +842,7 @@ usbdp_phy0_dp_altmode_mux: endpoint@1 {
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
+ dr-mode = "otg";
|
||||
usb-role-switch;
|
||||
status = "okay";
|
||||
|
||||
@@ -854,3 +867,43 @@ &usb_host1_ohci {
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi0_out {
|
||||
+ hdmi0_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi0_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdptxphy_hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&display_subsystem {
|
||||
+ clocks = <&hdptxphy_hdmi0>;
|
||||
+ clock-names = "hdmi0_phy_pll";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Sat, 2 Mar 2024 19:13:59 +0300
|
||||
Subject: arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 17 ++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -368,6 +368,23 @@ &pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie_wl>;
|
||||
status = "okay";
|
||||
+
|
||||
+ pcie@0,0 {
|
||||
+ reg = <0x400000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ device_type = "pci";
|
||||
+ bus-range = <0x40 0x4f>;
|
||||
+
|
||||
+ wifi: wifi@0,0 {
|
||||
+ compatible = "pci14e4,449d";
|
||||
+ reg = <0x410000 0 0 0 0>;
|
||||
+ clocks = <&hym8563>;
|
||||
+ clock-names = "32k";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&pwm11 {
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Wed, 6 Mar 2024 00:09:25 +0300
|
||||
Subject: mfd: khadas-mcu: add Edge2 registers
|
||||
|
||||
---
|
||||
drivers/mfd/khadas-mcu.c | 8 +++-
|
||||
include/linux/mfd/khadas-mcu.h | 24 ++++++++++
|
||||
2 files changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/mfd/khadas-mcu.c
|
||||
+++ b/drivers/mfd/khadas-mcu.c
|
||||
@@ -26,6 +26,10 @@ static bool khadas_mcu_reg_volatile(struct device *dev, unsigned int reg)
|
||||
case KHADAS_MCU_CHECK_USER_PASSWD_REG:
|
||||
case KHADAS_MCU_WOL_INIT_START_REG:
|
||||
case KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG:
|
||||
+ case KHADAS_MCU_LED_ON_RAM_REG:
|
||||
+ case KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG_V2:
|
||||
+ case KHADAS_MCU_WDT_EN_REG:
|
||||
+ case KHADAS_MCU_SYS_RST_REG:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -69,14 +73,14 @@ static const struct regmap_config khadas_mcu_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.reg_stride = 1,
|
||||
.val_bits = 8,
|
||||
- .max_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG,
|
||||
+ .max_register = KHADAS_MCU_SYS_RST_REG,
|
||||
.volatile_reg = khadas_mcu_reg_volatile,
|
||||
.writeable_reg = khadas_mcu_reg_writeable,
|
||||
.cache_type = REGCACHE_MAPLE,
|
||||
};
|
||||
|
||||
static struct mfd_cell khadas_mcu_fan_cells[] = {
|
||||
- /* VIM1/2 Rev13+ and VIM3 only */
|
||||
+ /* VIM1/2 Rev13+, VIM3 and Edge2 only */
|
||||
{ .name = "khadas-mcu-fan-ctrl", },
|
||||
};
|
||||
|
||||
diff --git a/include/linux/mfd/khadas-mcu.h b/include/linux/mfd/khadas-mcu.h
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/include/linux/mfd/khadas-mcu.h
|
||||
+++ b/include/linux/mfd/khadas-mcu.h
|
||||
@@ -35,26 +35,45 @@
|
||||
#define KHADAS_MCU_FACTORY_TEST_REG 0x16 /* R */
|
||||
#define KHADAS_MCU_BOOT_MODE_REG 0x20 /* RW */
|
||||
#define KHADAS_MCU_BOOT_EN_WOL_REG 0x21 /* RW */
|
||||
+#define KHADAS_MCU_BOOT_EN_DCIN_REG_V2 0x21 /* RW */
|
||||
#define KHADAS_MCU_BOOT_EN_RTC_REG 0x22 /* RW */
|
||||
#define KHADAS_MCU_BOOT_EN_EXP_REG 0x23 /* RW */
|
||||
+#define KHADAS_MCU_LED_MODE_ON_REG_V2 0x23 /* RW */
|
||||
+#define KHADAS_MCU_LED_MODE_OFF_REG_V2 0x24 /* RW */
|
||||
#define KHADAS_MCU_BOOT_EN_IR_REG 0x24 /* RW */
|
||||
#define KHADAS_MCU_BOOT_EN_DCIN_REG 0x25 /* RW */
|
||||
+#define KHADAS_MCU_RGB_ON_R_REG 0x25 /* RW */
|
||||
+#define KHADAS_MCU_RGB_ON_G_REG 0x26 /* RW */
|
||||
#define KHADAS_MCU_BOOT_EN_KEY_REG 0x26 /* RW */
|
||||
+#define KHADAS_MCU_RGB_ON_B_REG 0x27 /* RW */
|
||||
#define KHADAS_MCU_KEY_MODE_REG 0x27 /* RW */
|
||||
+#define KHADAS_MCU_RGB_OFF_R_REG 0x28 /* RW */
|
||||
#define KHADAS_MCU_LED_MODE_ON_REG 0x28 /* RW */
|
||||
+#define KHADAS_MCU_RGB_OFF_G_REG 0x29 /* RW */
|
||||
#define KHADAS_MCU_LED_MODE_OFF_REG 0x29 /* RW */
|
||||
+#define KHADAS_MCU_RGB_OFF_B_REG 0x2a /* RW */
|
||||
#define KHADAS_MCU_SHUTDOWN_NORMAL_REG 0x2c /* RW */
|
||||
#define KHADAS_MCU_MAC_SWITCH_REG 0x2d /* RW */
|
||||
+#define KHADAS_MCU_REST_CONF_REG 0x2e /* RW */
|
||||
#define KHADAS_MCU_MCU_SLEEP_MODE_REG 0x2e /* RW */
|
||||
+#define KHADAS_MCU_BOOT_EN_IR_REG_V2 0x2f /* RW */
|
||||
#define KHADAS_MCU_IR_CODE1_0_REG 0x2f /* RW */
|
||||
#define KHADAS_MCU_IR_CODE1_1_REG 0x30 /* RW */
|
||||
+#define KHADAS_MCU_IR1_CUST1_REG 0x30 /* RW */
|
||||
#define KHADAS_MCU_IR_CODE1_2_REG 0x31 /* RW */
|
||||
+#define KHADAS_MCU_IR1_CUST2_REG 0x31 /* RW */
|
||||
#define KHADAS_MCU_IR_CODE1_3_REG 0x32 /* RW */
|
||||
+#define KHADAS_MCU_IR1_ORDER1_REG 0x32 /* RW */
|
||||
#define KHADAS_MCU_USB_PCIE_SWITCH_REG 0x33 /* RW */
|
||||
+#define KHADAS_MCU_IR1_ORDER2_REG 0x33 /* RW */
|
||||
+#define KHADAS_MCU_IR2_CUST1_REG 0x34 /* RW */
|
||||
#define KHADAS_MCU_IR_CODE2_0_REG 0x34 /* RW */
|
||||
#define KHADAS_MCU_IR_CODE2_1_REG 0x35 /* RW */
|
||||
+#define KHADAS_MCU_IR2_CUST2_REG 0x35 /* RW */
|
||||
#define KHADAS_MCU_IR_CODE2_2_REG 0x36 /* RW */
|
||||
+#define KHADAS_MCU_IR2_ORDER1_REG 0x36 /* RW */
|
||||
#define KHADAS_MCU_IR_CODE2_3_REG 0x37 /* RW */
|
||||
+#define KHADAS_MCU_IR2_ORDER2_REG 0x36 /* RW */
|
||||
#define KHADAS_MCU_PASSWD_USER_0_REG 0x40 /* RW */
|
||||
#define KHADAS_MCU_PASSWD_USER_1_REG 0x41 /* RW */
|
||||
#define KHADAS_MCU_PASSWD_USER_2_REG 0x42 /* RW */
|
||||
@@ -69,6 +88,10 @@
|
||||
#define KHADAS_MCU_SHUTDOWN_NORMAL_STATUS_REG 0x86 /* RO */
|
||||
#define KHADAS_MCU_WOL_INIT_START_REG 0x87 /* WO */
|
||||
#define KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG 0x88 /* WO */
|
||||
+#define KHADAS_MCU_LED_ON_RAM_REG 0x89 /* WO */
|
||||
+#define KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG_V2 0x8A /* WO */
|
||||
+#define KHADAS_MCU_WDT_EN_REG 0x8B /* WO */
|
||||
+#define KHADAS_MCU_SYS_RST_REG 0x91 /* WO */
|
||||
|
||||
enum {
|
||||
KHADAS_BOARD_VIM1 = 0x1,
|
||||
@@ -76,6 +99,7 @@ enum {
|
||||
KHADAS_BOARD_VIM3,
|
||||
KHADAS_BOARD_EDGE = 0x11,
|
||||
KHADAS_BOARD_EDGE_V,
|
||||
+ KHADAS_BOARD_EDGE2,
|
||||
};
|
||||
|
||||
/**
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Wed, 6 Mar 2024 00:09:58 +0300
|
||||
Subject: mfd: khadas-mcu: drop unused code
|
||||
|
||||
---
|
||||
drivers/mfd/khadas-mcu.c | 11 ----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/mfd/khadas-mcu.c
|
||||
+++ b/drivers/mfd/khadas-mcu.c
|
||||
@@ -84,10 +84,6 @@ static struct mfd_cell khadas_mcu_fan_cells[] = {
|
||||
{ .name = "khadas-mcu-fan-ctrl", },
|
||||
};
|
||||
|
||||
-static struct mfd_cell khadas_mcu_cells[] = {
|
||||
- { .name = "khadas-mcu-user-mem", },
|
||||
-};
|
||||
-
|
||||
static int khadas_mcu_probe(struct i2c_client *client)
|
||||
{
|
||||
struct device *dev = &client->dev;
|
||||
@@ -109,13 +105,6 @@ static int khadas_mcu_probe(struct i2c_client *client)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE,
|
||||
- khadas_mcu_cells,
|
||||
- ARRAY_SIZE(khadas_mcu_cells),
|
||||
- NULL, 0, NULL);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
if (of_property_present(dev->of_node, "#cooling-cells"))
|
||||
return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE,
|
||||
khadas_mcu_fan_cells,
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Wed, 6 Mar 2024 00:13:10 +0300
|
||||
Subject: thermal: khadas_mcu_fan: add support for Khadas Edge 2
|
||||
|
||||
---
|
||||
drivers/thermal/khadas_mcu_fan.c | 77 +++++++++-
|
||||
1 file changed, 73 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/khadas_mcu_fan.c b/drivers/thermal/khadas_mcu_fan.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/thermal/khadas_mcu_fan.c
|
||||
+++ b/drivers/thermal/khadas_mcu_fan.c
|
||||
@@ -15,10 +15,16 @@
|
||||
#include <linux/thermal.h>
|
||||
|
||||
#define MAX_LEVEL 3
|
||||
+#define MAX_SPEED 0x64
|
||||
|
||||
struct khadas_mcu_fan_ctx {
|
||||
struct khadas_mcu *mcu;
|
||||
unsigned int level;
|
||||
+
|
||||
+ unsigned int fan_max_level;
|
||||
+ unsigned int fan_register;
|
||||
+ unsigned int *fan_cooling_levels;
|
||||
+
|
||||
struct thermal_cooling_device *cdev;
|
||||
};
|
||||
|
||||
@@ -26,9 +32,21 @@ static int khadas_mcu_fan_set_level(struct khadas_mcu_fan_ctx *ctx,
|
||||
unsigned int level)
|
||||
{
|
||||
int ret;
|
||||
+ unsigned int write_level = level;
|
||||
+
|
||||
+ if (level > ctx->fan_max_level)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (ctx->fan_cooling_levels != NULL) {
|
||||
+ write_level = ctx->fan_cooling_levels[level];
|
||||
+
|
||||
+ if (write_level > MAX_SPEED)
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_write(ctx->mcu->regmap, ctx->fan_register,
|
||||
+ write_level);
|
||||
|
||||
- ret = regmap_write(ctx->mcu->regmap, KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG,
|
||||
- level);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -40,7 +58,9 @@ static int khadas_mcu_fan_set_level(struct khadas_mcu_fan_ctx *ctx,
|
||||
static int khadas_mcu_fan_get_max_state(struct thermal_cooling_device *cdev,
|
||||
unsigned long *state)
|
||||
{
|
||||
- *state = MAX_LEVEL;
|
||||
+ struct khadas_mcu_fan_ctx *ctx = cdev->devdata;
|
||||
+
|
||||
+ *state = ctx->fan_max_level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -61,7 +81,7 @@ khadas_mcu_fan_set_cur_state(struct thermal_cooling_device *cdev,
|
||||
{
|
||||
struct khadas_mcu_fan_ctx *ctx = cdev->devdata;
|
||||
|
||||
- if (state > MAX_LEVEL)
|
||||
+ if (state > ctx->fan_max_level)
|
||||
return -EINVAL;
|
||||
|
||||
if (state == ctx->level)
|
||||
@@ -76,6 +96,48 @@ static const struct thermal_cooling_device_ops khadas_mcu_fan_cooling_ops = {
|
||||
.set_cur_state = khadas_mcu_fan_set_cur_state,
|
||||
};
|
||||
|
||||
+// Khadas Edge 2 sets fan level by passing fan speed(0-100). So we need different logic here like pwm-fan cooling-levels.
|
||||
+// This is optional and just necessary for Edge 2.
|
||||
+static int khadas_mcu_fan_get_cooling_data_edge2(struct khadas_mcu_fan_ctx *ctx, struct device *dev) {
|
||||
+ struct device_node *np = ctx->mcu->dev->of_node;
|
||||
+ int num, i, ret;
|
||||
+
|
||||
+ if (!of_property_present(np, "cooling-levels"))
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = of_property_count_u32_elems(np, "cooling-levels");
|
||||
+ if (ret <= 0) {
|
||||
+ dev_err(dev, "Wrong data!\n");
|
||||
+ return ret ? : -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ num = ret;
|
||||
+ ctx->fan_cooling_levels = devm_kcalloc(dev, num, sizeof(u32),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!ctx->fan_cooling_levels)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ret = of_property_read_u32_array(np, "cooling-levels",
|
||||
+ ctx->fan_cooling_levels, num);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "Property 'cooling-levels' cannot be read!\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < num; i++) {
|
||||
+ if (ctx->fan_cooling_levels[i] > MAX_SPEED) {
|
||||
+ dev_err(dev, "PWM fan state[%d]:%d > %d\n", i,
|
||||
+ ctx->fan_cooling_levels[i], MAX_SPEED);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ctx->fan_max_level = num - 1;
|
||||
+ ctx->fan_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG_V2;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int khadas_mcu_fan_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct khadas_mcu *mcu = dev_get_drvdata(pdev->dev.parent);
|
||||
@@ -90,6 +152,13 @@ static int khadas_mcu_fan_probe(struct platform_device *pdev)
|
||||
ctx->mcu = mcu;
|
||||
platform_set_drvdata(pdev, ctx);
|
||||
|
||||
+ ctx->fan_max_level = MAX_LEVEL;
|
||||
+ ctx->fan_register = KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG;
|
||||
+
|
||||
+ ret = khadas_mcu_fan_get_cooling_data_edge2(ctx, dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
cdev = devm_thermal_of_cooling_device_register(dev->parent,
|
||||
dev->parent->of_node, "khadas-mcu-fan", ctx,
|
||||
&khadas_mcu_fan_cooling_ops);
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Wed, 6 Mar 2024 00:14:58 +0300
|
||||
Subject: dt-bindings: mfd: khadas-mcu: add cooling-levels property
|
||||
|
||||
---
|
||||
Documentation/devicetree/bindings/mfd/khadas,mcu.yaml | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml b/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml
|
||||
+++ b/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml
|
||||
@@ -11,7 +11,7 @@ maintainers:
|
||||
|
||||
description: |
|
||||
Khadas embeds a microcontroller on their VIM and Edge boards adding some
|
||||
- system feature as PWM Fan control (for VIM2 rev14 or VIM3), User memory
|
||||
+ system feature as PWM Fan control (for VIM2 rev14, VIM3, Edge2), User memory
|
||||
storage, IR/Key resume control, system power LED control and more.
|
||||
|
||||
properties:
|
||||
@@ -22,6 +22,11 @@ properties:
|
||||
"#cooling-cells": # Only needed for boards having FAN control feature
|
||||
const: 2
|
||||
|
||||
+ cooling-levels:
|
||||
+ description: Max speed of PWM fan. This property is necessary for Khadas Edge 2.
|
||||
+ items:
|
||||
+ maximum: 100
|
||||
+
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Wed, 6 Mar 2024 00:17:58 +0300
|
||||
Subject: arm64: dts: rockchip: Add MCU to Khadas Edge 2
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -306,6 +306,13 @@ hym8563: rtc@51 {
|
||||
clock-output-names = "hym8563";
|
||||
wakeup-source;
|
||||
};
|
||||
+
|
||||
+ khadas_mcu: system-controller@18 {
|
||||
+ compatible = "khadas,mcu";
|
||||
+ reg = <0x18>;
|
||||
+ cooling-levels = <0 50 72 100>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Mon, 25 Mar 2024 22:41:26 +0300
|
||||
Subject: arm64: dts: rockchip: Add automatic fan control to Khadas Edge 2
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 56 ++++++++++
|
||||
1 file changed, 56 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -315,6 +315,62 @@ khadas_mcu: system-controller@18 {
|
||||
};
|
||||
};
|
||||
|
||||
+&package_thermal {
|
||||
+ polling-delay = <1000>;
|
||||
+
|
||||
+ trips {
|
||||
+ package_fan0: package-fan0 {
|
||||
+ temperature = <45000>;
|
||||
+ hysteresis = <5000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+
|
||||
+ package_fan1: package-fan1 {
|
||||
+ temperature = <55000>;
|
||||
+ hysteresis = <5000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+
|
||||
+ package_fan2: package-fan2 {
|
||||
+ temperature = <60000>;
|
||||
+ hysteresis = <5000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+
|
||||
+ package_fan3: package-fan3 {
|
||||
+ temperature = <70000>;
|
||||
+ hysteresis = <5000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ trip = <&package_fan0>;
|
||||
+ cooling-device = <&khadas_mcu 0 1>;
|
||||
+ contribution = <1024>;
|
||||
+ };
|
||||
+
|
||||
+ map1 {
|
||||
+ trip = <&package_fan1>;
|
||||
+ cooling-device = <&khadas_mcu 1 2>;
|
||||
+ contribution = <1024>;
|
||||
+ };
|
||||
+
|
||||
+ map2 {
|
||||
+ trip = <&package_fan2>;
|
||||
+ cooling-device = <&khadas_mcu 2 3>;
|
||||
+ contribution = <1024>;
|
||||
+ };
|
||||
+
|
||||
+ map3 {
|
||||
+ trip = <&package_fan3>;
|
||||
+ cooling-device = <&khadas_mcu 3 THERMAL_NO_LIMIT>;
|
||||
+ contribution = <1024>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
vdd_sd {
|
||||
vdd_sd_en: vdd-sd-en {
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: SuperKali <hello@superkali.me>
|
||||
Date: Mon, 21 Oct 2024 13:21:03 +0000
|
||||
Subject: Add Missing parameters for USB3.0 and FAN
|
||||
|
||||
Signed-off-by: SuperKali <hello@superkali.me>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts | 4 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 58 ++++++++++
|
||||
2 files changed, 58 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts
|
||||
@@ -42,10 +42,6 @@ &u2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&u2phy1_otg {
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
&u2phy2_host {
|
||||
phy-supply = <&vcc5v0_usb20_host>;
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
|
||||
@@ -66,6 +66,15 @@ usr_led: led-1 {
|
||||
};
|
||||
};
|
||||
|
||||
+ /* FAN */
|
||||
+ fan0: pwm-fan {
|
||||
+ compatible = "pwm-fan";
|
||||
+ #cooling-cells = <2>;
|
||||
+ cooling-levels = <100 160 190 200 215 235 255>;
|
||||
+ pwms = <&pwm1 0 50000 0>;
|
||||
+ fan-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
pinctrl-names = "default";
|
||||
@@ -171,6 +180,18 @@ vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
+ vcc5v0_host_30: vcc5v0-host-30 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_host30_en>;
|
||||
+ regulator-name = "vcc5v0_host_30";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -485,6 +506,34 @@ i2s0_8ch_p0_0: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&package_thermal {
|
||||
+ polling-delay = <1000>;
|
||||
+
|
||||
+ trips {
|
||||
+ package_fan0: package-fan0 {
|
||||
+ temperature = <55000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ package_fan1: package-fan1 {
|
||||
+ temperature = <65000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map1 {
|
||||
+ trip = <&package_fan0>;
|
||||
+ cooling-device = <&fan0 THERMAL_NO_LIMIT 1>;
|
||||
+ };
|
||||
+ map2 {
|
||||
+ trip = <&package_fan1>;
|
||||
+ cooling-device = <&fan0 2 THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pcie2x1l0 {
|
||||
reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc_3v3_pcie20>;
|
||||
@@ -575,6 +624,10 @@ typec5v_pwren: typec5v-pwren {
|
||||
rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
+ vcc5v0_host30_en: vcc5v0-host30-en {
|
||||
+ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
usbc0_int: usbc0-int {
|
||||
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
@@ -973,6 +1026,11 @@ &u2phy0_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy1_otg {
|
||||
+ phy-supply = <&vcc5v0_host_30>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2_host {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Riek <jjriek@verizon.net>
|
||||
Date: Wed, 7 Aug 2024 10:19:47 -0400
|
||||
Subject: arm64: dts: rockchip: Split pcie30x1m1 pinctrl
|
||||
|
||||
The PCIe 3.0 PHYs need an external clock and will assert CLKREQ# to
|
||||
get it. Some RK3588 boards such as the Turning RK1, Mixtile 3588E,
|
||||
and the ArmSoM AIM7 only provide this clock when CLKREQ# is asserted.
|
||||
|
||||
Signed-off-by: Joshua Riek <jjriek@verizon.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi | 16 ++++++++--
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi
|
||||
@@ -1799,12 +1799,22 @@ pcie30x4m0_pins: pcie30x4m0-pins {
|
||||
};
|
||||
|
||||
/omit-if-no-ref/
|
||||
- pcie30x4m1_pins: pcie30x4m1-pins {
|
||||
+ pcie30x4_clkreqn_m1: pcie30x4-clkreqn-m1 {
|
||||
rockchip,pins =
|
||||
/* pcie30x4_clkreqn_m1 */
|
||||
- <4 RK_PB4 4 &pcfg_pull_none>,
|
||||
+ <4 RK_PB4 4 &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ /omit-if-no-ref/
|
||||
+ pcie30x4_perstn_m1: pcie30x4-perstn-m1 {
|
||||
+ rockchip,pins =
|
||||
/* pcie30x4_perstn_m1 */
|
||||
- <4 RK_PB6 4 &pcfg_pull_none>,
|
||||
+ <4 RK_PB6 4 &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ /omit-if-no-ref/
|
||||
+ pcie30x4_waken_m1: pcie30x4-waken-m1 {
|
||||
+ rockchip,pins =
|
||||
/* pcie30x4_waken_m1 */
|
||||
<4 RK_PB5 4 &pcfg_pull_none>;
|
||||
};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Riek <jjriek@verizon.net>
|
||||
Date: Wed, 7 Aug 2024 10:30:50 -0400
|
||||
Subject: arm64: dts: rockchip: Add PCIe 3.0 pinctrl to Turing RK1
|
||||
|
||||
The Turning RK1 needs to assert CLKREQ# to provide an external
|
||||
clock to the PCIe 3.0 PHYs.
|
||||
|
||||
Signed-off-by: Joshua Riek <jjriek@verizon.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
@@ -223,7 +223,7 @@ &pcie30phy {
|
||||
&pcie3x4 {
|
||||
linux,pci-domain = <0>;
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pcie3_reset>;
|
||||
+ pinctrl-0 = <&pcie3_reset>, <&pcie30x4_clkreqn_m1>;
|
||||
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
status = "okay";
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Riek <jjriek@verizon.net>
|
||||
Date: Wed, 7 Aug 2024 10:34:35 -0400
|
||||
Subject: arm64: dts: rockchip: Enable GPU node on Turing RK1
|
||||
|
||||
Enables the Mali G610 GPU.
|
||||
|
||||
Signed-off-by: Joshua Riek <jjriek@verizon.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
@@ -101,6 +101,11 @@ &cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Riek <jjriek@verizon.net>
|
||||
Date: Thu, 22 Aug 2024 22:32:47 -0400
|
||||
Subject: arm64: dts: rockchip: Enable automatic fan control on the Turing RK1
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 32 +++++++++-
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
@@ -23,7 +23,7 @@ aliases {
|
||||
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
- cooling-levels = <0 25 95 145 195 255>;
|
||||
+ cooling-levels = <0 120 150 180 210 240 255>;
|
||||
fan-supply = <&vcc5v0_sys>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0m2_pins &fan_int>;
|
||||
@@ -213,6 +213,36 @@ rgmii_phy: ethernet-phy@1 {
|
||||
};
|
||||
};
|
||||
|
||||
+&package_thermal {
|
||||
+ polling-delay = <1000>;
|
||||
+
|
||||
+ trips {
|
||||
+ package_fan0: package-fan0 {
|
||||
+ temperature = <55000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+
|
||||
+ package_fan1: package-fan1 {
|
||||
+ temperature = <65000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map1 {
|
||||
+ trip = <&package_fan0>;
|
||||
+ cooling-device = <&fan THERMAL_NO_LIMIT 1>;
|
||||
+ };
|
||||
+
|
||||
+ map2 {
|
||||
+ trip = <&package_fan1>;
|
||||
+ cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pcie2x1l1 {
|
||||
linux,pci-domain = <1>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Riek <jjriek@verizon.net>
|
||||
Date: Wed, 7 Aug 2024 14:12:21 -0400
|
||||
Subject: arm64: dts: rockchip: Add missing hym8563 clock-frequency for Turing
|
||||
RK1
|
||||
|
||||
Signed-off-by: Joshua Riek <jjriek@verizon.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
|
||||
@@ -191,6 +191,7 @@ hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
+ clock-frequency = <32768>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hym8563_int>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Thu, 16 Nov 2023 18:15:09 +0300
|
||||
Subject: arm64: dts: Add missing nodes to Orange Pi 5 Plus
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 221 +++++++++-
|
||||
1 file changed, 218 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -72,6 +73,17 @@ ir-receiver {
|
||||
pinctrl-0 = <&ir_receiver_pin>;
|
||||
};
|
||||
|
||||
+ hdmi0-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi0_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi0_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
@@ -98,10 +110,10 @@ pwm-leds {
|
||||
|
||||
led {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_INDICATOR;
|
||||
- function-enumerator = <2>;
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
max-brightness = <255>;
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -165,6 +177,20 @@ daicodec: simple-audio-card,codec {
|
||||
};
|
||||
};
|
||||
|
||||
+ wlan-rfkill {
|
||||
+ compatible = "rfkill-gpio";
|
||||
+ label = "rfkill-wlan";
|
||||
+ radio-type = "wlan";
|
||||
+ shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluetooth-rfkill {
|
||||
+ compatible = "rfkill-gpio";
|
||||
+ label = "rfkill-bluetooth";
|
||||
+ radio-type = "bluetooth";
|
||||
+ shutdown-gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -206,6 +232,18 @@ vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
+ vbus5v0_typec: vbus5v0-typec-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ regulator-name = "vbus5v0_typec";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&typec5v_pwren>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
vcc5v0_usb20: vcc5v0-usb20-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -318,6 +356,53 @@ hym8563: rtc@51 {
|
||||
pinctrl-0 = <&hym8563_int>;
|
||||
wakeup-source;
|
||||
};
|
||||
+
|
||||
+ usbc0: usb-typec@22 {
|
||||
+ compatible = "fcs,fusb302";
|
||||
+ reg = <0x22>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&usbc0_int>;
|
||||
+ vbus-supply = <&vbus5v0_typec>;
|
||||
+
|
||||
+ usb_con: connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
+ label = "USB-C";
|
||||
+ data-role = "dual";
|
||||
+ power-role = "dual";
|
||||
+ try-power-role = "source";
|
||||
+ op-sink-microwatt = <1000000>;
|
||||
+ sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
|
||||
+ source-pdos = <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
|
||||
+
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&i2c7 {
|
||||
@@ -390,9 +475,15 @@ &pcie3x4 {
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
+ hdmirx {
|
||||
+ hdmirx_hpd: hdmirx-hpd {
|
||||
+ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
- rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -415,6 +506,14 @@ hp_detect: hp-detect {
|
||||
};
|
||||
|
||||
usb {
|
||||
+ typec5v_pwren: typec5v-pwren {
|
||||
+ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ usbc0_int: usbc0-int {
|
||||
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
vcc5v0_usb20_en: vcc5v0-usb20-en {
|
||||
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
@@ -810,6 +909,22 @@ &tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -838,6 +953,35 @@ &uart9 {
|
||||
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";
|
||||
+ svid = <0xff01>;
|
||||
+
|
||||
+ 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_phy1 {
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -846,6 +990,20 @@ &usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "otg";
|
||||
+ 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";
|
||||
};
|
||||
@@ -853,3 +1011,60 @@ &usb_host1_ehci {
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdptxphy_hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0 {
|
||||
+ enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi0_out {
|
||||
+ hdmi0_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi0_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_receiver_cma {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&hdmi_receiver {
|
||||
+ hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: ColorfulRhino <131405023+ColorfulRhino@users.noreply.github.com>
|
||||
Date: Sun, 11 Aug 2024 15:28:03 +0200
|
||||
Subject: CM3588-NAS: Add HDMI support
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts | 47 ++++++++++
|
||||
1 file changed, 47 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588-friendlyelec-cm3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -225,6 +226,12 @@ &combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+/* Properties "clock" and "clock-names" introduced by Collabora https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/commit/8fff68cb7cfe1e698445896252e34f79fad41720 */
|
||||
+&display_subsystem {
|
||||
+ clocks = <&hdptxphy_hdmi0>;
|
||||
+ clock-names = "hdmi0_phy_pll";
|
||||
+};
|
||||
+
|
||||
/* GPIO names are in the format "Human-readable-name [SIGNAL_LABEL]" */
|
||||
/* Signal labels match the official CM3588 NAS SDK schematic revision 2309 */
|
||||
&gpio0 {
|
||||
@@ -307,6 +314,31 @@ &gpio4 {
|
||||
"", "", "", "";
|
||||
};
|
||||
|
||||
+&hdmi0 {
|
||||
+ // avdd-0v9-supply =
|
||||
+ // avdd-1v8-supply =
|
||||
+ /* Dmesg error/warning:
|
||||
+ * [ +0.000055] dwhdmi-rockchip fde80000.hdmi: Looking up avdd-0v9-supply from device tree
|
||||
+ * [ +0.000011] dwhdmi-rockchip fde80000.hdmi: Looking up avdd-0v9-supply property in node /hdmi@fde80000 failed
|
||||
+ * [ +0.000014] dwhdmi-rockchip fde80000.hdmi: supply avdd-0v9 not found, using dummy regulator
|
||||
+ * [ +0.000080] dwhdmi-rockchip fde80000.hdmi: Looking up avdd-1v8-supply from device tree
|
||||
+ * [ +0.000010] dwhdmi-rockchip fde80000.hdmi: Looking up avdd-1v8-supply property in node /hdmi@fde80000 failed
|
||||
+ * [ +0.000010] dwhdmi-rockchip fde80000.hdmi: supply avdd-1v8 not found, using dummy regulator
|
||||
+ * [ +0.001009] dwhdmi-rockchip fde80000.hdmi: registered ddc I2C bus driver
|
||||
+ */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdptxphy_hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
/* Connected to MIPI-DSI0 */
|
||||
&i2c5 {
|
||||
pinctrl-names = "default";
|
||||
@@ -776,3 +808,18 @@ usbdp_phy0_dp_altmode_mux: endpoint@1 {
|
||||
&usbdp_phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3588-armsom-sige7.dts"
|
||||
|
||||
/ {
|
||||
model = "Banana Pi M7";
|
||||
compatible = "bananapi,m7", "rockchip,rk3588";
|
||||
};
|
||||
@@ -0,0 +1,858 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
model = "HINLINK H88K";
|
||||
compatible = "hinlink,h88k", "rockchip,rk3588";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio;
|
||||
};
|
||||
|
||||
analog-sound {
|
||||
compatible = "simple-audio-card";
|
||||
label = "rockchip,es8388-codec";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hp_detect>;
|
||||
simple-audio-card,name = "Analog";
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,mclk-fs = <256>;
|
||||
simple-audio-card,hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
|
||||
simple-audio-card,bitclock-master = <&daicpu>;
|
||||
simple-audio-card,frame-master = <&daicpu>;
|
||||
|
||||
simple-audio-card,widgets =
|
||||
"Microphone", "Onboard Microphone",
|
||||
"Microphone", "Microphone Jack",
|
||||
"Speaker", "Speaker",
|
||||
"Headphone", "Headphones";
|
||||
|
||||
simple-audio-card,routing =
|
||||
"Headphones", "LOUT1",
|
||||
"Headphones", "ROUT1",
|
||||
"Speaker", "LOUT2",
|
||||
"Speaker", "ROUT2",
|
||||
|
||||
/* single ended signal to LINPUT1 */
|
||||
"LINPUT1", "Microphone Jack",
|
||||
"RINPUT1", "Microphone Jack",
|
||||
/* differential signal */
|
||||
"LINPUT2", "Onboard Microphone",
|
||||
"RINPUT2", "Onboard Microphone";
|
||||
|
||||
daicpu: simple-audio-card,cpu {
|
||||
sound-dai = <&i2s0_8ch>;
|
||||
system-clock-frequency = <12288000>;
|
||||
};
|
||||
|
||||
daicodec: simple-audio-card,codec {
|
||||
sound-dai = <&es8388>;
|
||||
system-clock-frequency = <12288000>;
|
||||
};
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_net_en>, <&led_sata_en>,
|
||||
<&led_user_en>, <&led_work_en>;
|
||||
|
||||
net {
|
||||
label = "blue:net";
|
||||
gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
sata {
|
||||
label = "amber:sata";
|
||||
gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
user {
|
||||
label = "green:user";
|
||||
gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
work {
|
||||
label = "red:work";
|
||||
gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
vcc12v_dcin: vcc12v-dcin {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <12000000>;
|
||||
regulator-max-microvolt = <12000000>;
|
||||
regulator-name = "vcc12v_dcin";
|
||||
};
|
||||
|
||||
vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
regulator-name = "vcc3v3_pcie30";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <5000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host_en>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_hub: vcc5v0-usb-hub {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_hub_en>;
|
||||
regulator-name = "vcc5v0_usb_hub";
|
||||
regulator-always-on;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy1_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
pinctrl-0 = <&gmac0_miim
|
||||
&gmac0_tx_bus2
|
||||
&gmac0_rx_bus2
|
||||
&gmac0_rgmii_clk
|
||||
&gmac0_rgmii_bus>;
|
||||
pinctrl-names = "default";
|
||||
rx_delay = <0x00>;
|
||||
tx_delay = <0x43>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&hdptxphy_hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_in {
|
||||
hdmi0_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi0>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hym8563_int>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c7 {
|
||||
pinctrl-0 = <&i2c7m0_xfer>;
|
||||
status = "okay";
|
||||
|
||||
es8388: audio-codec@11 {
|
||||
compatible = "everest,es8388";
|
||||
reg = <0x11>;
|
||||
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
assigned-clock-rates = <12288000>;
|
||||
AVDD-supply = <&vcc_3v3_s3>;
|
||||
clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
clock-names = "mclk";
|
||||
DVDD-supply = <&vcc_1v8_s3>;
|
||||
HPVDD-supply = <&vcc_3v3_s3>;
|
||||
PVDD-supply = <&vcc_1v8_s3>;
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
port {
|
||||
es8388_p0_0: endpoint {
|
||||
remote-endpoint = <&i2s0_8ch_p0_0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2s0_8ch {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s0_lrck
|
||||
&i2s0_mclk
|
||||
&i2s0_sclk
|
||||
&i2s0_sdi0
|
||||
&i2s0_sdo0>;
|
||||
status = "okay";
|
||||
|
||||
i2s0_8ch_p0: port {
|
||||
i2s0_8ch_p0_0: endpoint {
|
||||
dai-format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
remote-endpoint = <&es8388_p0_0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
/* RTL8211F */
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtl8211f_rst>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l0 {
|
||||
reset-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie30phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie3x4 {
|
||||
pinctrl-names = "default";
|
||||
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
led_net_en: led_net_en {
|
||||
rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
led_sata_en: led_sata_en {
|
||||
rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
led_user_en: led_user_en {
|
||||
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
led_work_en: led_work_en {
|
||||
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
rtl8211f {
|
||||
rtl8211f_rst: rtl8211f-rst {
|
||||
rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
sound {
|
||||
hp_detect: hp-detect {
|
||||
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_hub_en: vcc5v0_usb_hub_en {
|
||||
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&avcc_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
mmc-hs200-1_8v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
max-frequency = <200000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_s3>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
num-cs = <1>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
spi-max-frequency = <1000000>;
|
||||
reg = <0x0>;
|
||||
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
|
||||
system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_log_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vccio_sd_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "pldo6_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy1_otg {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
/* connected to USB hub, which is powered by vcc5v0_sys */
|
||||
phy-supply = <&vcc5v0_sys>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3_host {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdp_phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi0_in_vp0>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,712 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Mixtile Blade 3";
|
||||
compatible = "mixtile,blade3", "rockchip,rk3588";
|
||||
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc5v0_usbdcin: vcc5v0-usbdcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usbdcin";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc5v0_usb: vcc5v0-usb-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usbdcin>;
|
||||
};
|
||||
|
||||
pcie20_avdd0v85: pcie20-avdd0v85-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pcie20_avdd0v85";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
vin-supply = <&vdd_0v85_s0>;
|
||||
};
|
||||
|
||||
pcie20_avdd1v8: pcie20-avdd1v8-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pcie20_avdd1v8";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&avcc_1v8_s0>;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
|
||||
vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie30";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
startup-delay-us = <5000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie3_vcc3v3_en>;
|
||||
};
|
||||
|
||||
vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3_sd_s0";
|
||||
gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_pwr>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy1_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
mem-supply = <&vdd_cpu_big1_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
mem-supply = <&vdd_cpu_big1_mem_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 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_npu_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
pinctrl-0 = <&i2c4m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* exposed on the 30-pin connector; shows up as i2c-3 */
|
||||
&i2c5 {
|
||||
pinctrl-0 = <&i2c5m3_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2s2_2ch {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s2m1_mclk
|
||||
&i2s2m1_lrck
|
||||
&i2s2m1_sclk
|
||||
&i2s2m1_sdi
|
||||
&i2s2m1_sdo>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2x1l0 {
|
||||
reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie2_0_rst>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie2_1_rst>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie30phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie3x4 {
|
||||
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie3_rst>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
sdmmc {
|
||||
sdmmc_pwr: sdmmc-pwr {
|
||||
rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie2 {
|
||||
pcie2_0_rst: pcie2-0-rst {
|
||||
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
pcie2_1_rst: pcie2-1-rst {
|
||||
rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie3 {
|
||||
pcie3_rst: pcie3-rst {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
pcie3_vcc3v3_en: pcie3-vcc3v3-en {
|
||||
rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm8 {
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm8m2_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm14 {
|
||||
pinctrl-0 = <&pwm14m2_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm15 {
|
||||
pinctrl-0 = <&pwm15m3_pins>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi4 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi4m2_cs0 &spi4m2_pins>;
|
||||
num-cs = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
status = "okay";
|
||||
vref-supply = <&vcc_1v8_s0>;
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
max-frequency = <200000000>;
|
||||
// hs400 causes immediate trouble, hs200 works at around 150mb/s
|
||||
// mmc-hs400-1_8v;
|
||||
// mmc-hs400-enhanced-strobe;
|
||||
mmc-hs200-1_8v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_s3>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
num-cs = <1>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
spi-max-frequency = <1000000>;
|
||||
reg = <0x0>;
|
||||
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_log_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vccio_sd_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "pldo6_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3588-friendlyelec-cm3588-nas.dts"
|
||||
|
||||
// DO NOT ADD ANYTHING TO THIS DTS!
|
||||
// This file only exists for temporary backwards compatibility for existing installations installed before 2024-10-20.
|
||||
// THIS COMPATIBILITY PATCH WILL BE DELETED in kernel 6.14, please migrate to the new dts by editing your "/boot/armbianEnv.txt"!
|
||||
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3588s-nanopi-r6s.dts"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R6C";
|
||||
compatible = "friendlyelec,nanopi-r6c", "rockchip,rk3588s";
|
||||
};
|
||||
|
||||
&lan2_led {
|
||||
/delete-property/ linux,default-trigger;
|
||||
label = "user_led";
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
/delete-node/ pcie@0,0;
|
||||
};
|
||||
@@ -0,0 +1,865 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R6S";
|
||||
compatible = "friendlyelec,nanopi-r6s", "rockchip,rk3588s";
|
||||
|
||||
aliases {
|
||||
mmc0 = &sdmmc;
|
||||
mmc1 = &sdhci;
|
||||
serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
sys_led: led-0 {
|
||||
label = "sys_led";
|
||||
gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sys_led_pin>;
|
||||
};
|
||||
|
||||
wan_led: led-1 {
|
||||
label = "wan_led";
|
||||
gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "r8169-3-3100:00:link";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wan_led_pin>;
|
||||
};
|
||||
|
||||
lan1_led: led-2 {
|
||||
label = "lan1_led";
|
||||
gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "r8169-4-4100:00:link";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lan1_led_pin>;
|
||||
};
|
||||
|
||||
lan2_led: led-3 {
|
||||
label = "lan2_led";
|
||||
gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "stmmac-0:01:link";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lan2_led_pin>;
|
||||
};
|
||||
};
|
||||
|
||||
adc-keys {
|
||||
compatible = "adc-keys";
|
||||
io-channels = <&saradc 0>;
|
||||
io-channel-names = "buttons";
|
||||
keyup-threshold-microvolt = <1800000>;
|
||||
poll-interval = <100>;
|
||||
|
||||
button-maskrom {
|
||||
label = "Maskrom";
|
||||
linux,code = <KEY_VENDOR>;
|
||||
press-threshold-microvolt = <1800>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&key1_pin>;
|
||||
|
||||
button-user {
|
||||
label = "User";
|
||||
linux,code = <BTN_1>;
|
||||
gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <50>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3_sd_s0";
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sd_s0_pwr>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
vcc_3v3_pcie20: vcc3v3-pcie20-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3_pcie20";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
vcc5v0_usb: vcc5v0-usb-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_otg0: vcc5v0-usb-otg0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb_otg0";
|
||||
enable-active-high;
|
||||
gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&typec5v_pwren>;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
vcc5v0_host_20: vcc5v0-host-20-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host_20";
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host20_en>;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
pinctrl-0 = <&gmac1_miim
|
||||
&gmac1_tx_bus2
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
pinctrl-names = "default";
|
||||
tx_delay = <0x42>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
mem-supply = <&vdd_cpu_big1_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
mem-supply = <&vdd_cpu_big1_mem_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>;
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-compatible = "rk860x-reg";
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
clock-frequency = <200000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c6m0_xfer>;
|
||||
status = "okay";
|
||||
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtc_int>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
eeprom@53 {
|
||||
compatible = "microchip,24c02", "atmel,24c02";
|
||||
reg = <0x53>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
pagesize = <16>;
|
||||
size = <256>;
|
||||
|
||||
eui_48: eui-48@fa {
|
||||
reg = <0xfa 0x06>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-id001c.c916";
|
||||
reg = <0x1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtl8211f_rst>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc_3v3_pcie20>;
|
||||
status = "okay";
|
||||
|
||||
pcie@0,0 {
|
||||
reg = <0x00300000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
r8125_u25: pcie@30,0 {
|
||||
reg = <0x000000 0 0 0 0>;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc_3v3_pcie20>;
|
||||
status = "okay";
|
||||
|
||||
pcie@0,0 {
|
||||
reg = <0x00400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
r8125_u40: pcie@40,0 {
|
||||
reg = <0x000000 0 0 0 0>;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
gpio-key {
|
||||
key1_pin: key1-pin {
|
||||
rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
sys_led_pin: sys-led-pin {
|
||||
rockchip,pins =
|
||||
<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins =
|
||||
<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
lan1_led_pin: lan1-led-pin {
|
||||
rockchip,pins =
|
||||
<1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
lan2_led_pin: lan2-led-pin {
|
||||
rockchip,pins =
|
||||
<1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
hym8563 {
|
||||
rtc_int: rtc-int {
|
||||
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc {
|
||||
sd_s0_pwr: sd-s0-pwr {
|
||||
rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
typec5v_pwren: typec5v-pwren {
|
||||
rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
/omit-if-no-ref/
|
||||
usbc0_int: usbc0-int {
|
||||
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
vcc5v0_host20_en: vcc5v0-host20-en {
|
||||
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
rtl8211f {
|
||||
rtl8211f_rst: rtl8211f-rst {
|
||||
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&avcc_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
/* HS400 doesn't work properly -> https://github.com/torvalds/linux/commit/cee572756aa2cb46e959e9797ad4b730b78a050b */
|
||||
mmc-hs200-1_8v;
|
||||
max-frequency = <200000000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-mmc;
|
||||
no-sdio;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_sd_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
num-cs = <1>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
spi-max-frequency = <1000000>;
|
||||
reg = <0x0>;
|
||||
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
|
||||
system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fudr_moden0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_log_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-init-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vccio_sd_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "pldo6_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
phy-supply = <&vcc5v0_usb_otg0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
phy-supply = <&vcc5v0_host_20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
extcon = <&u2phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdp_phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&hdptxphy_hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_in {
|
||||
hdmi0_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi0>;
|
||||
};
|
||||
};
|
||||
|
||||
&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi0_in_vp0>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,814 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Xunlong Orange Pi 5";
|
||||
compatible = "xunlong,orangepi-5", "rockchip,rk3588s";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdmmc;
|
||||
};
|
||||
|
||||
chosen {
|
||||
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-recovery {
|
||||
label = "Recovery";
|
||||
linux,code = <KEY_VENDOR>;
|
||||
press-threshold-microvolt = <1800>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&leds_gpio>;
|
||||
|
||||
led-1 {
|
||||
gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
label = "status_led";
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
hdmi0-con {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi0_con_in: endpoint {
|
||||
remote-endpoint = <&hdmi0_out_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
vbus_typec: vbus-typec-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&typec5v_pwren>;
|
||||
regulator-name = "vbus_typec";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-low;
|
||||
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
regulator-name = "vcc_3v3_sd_s0";
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
vcc3v3_pcie20: vcc3v3-pcie20-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
regulator-name = "vcc3v3_pcie20";
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
startup-delay-us = <50000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
pinctrl-0 = <&gmac1_miim
|
||||
&gmac1_tx_bus2
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
pinctrl-names = "default";
|
||||
tx_delay = <0x42>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
vdd_npu_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c6m3_xfer>;
|
||||
status = "okay";
|
||||
|
||||
usbc0: usb-typec@22 {
|
||||
compatible = "fcs,fusb302";
|
||||
reg = <0x22>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usbc0_int>;
|
||||
vbus-supply = <&vbus_typec>;
|
||||
status = "okay";
|
||||
|
||||
usb_con: connector {
|
||||
compatible = "usb-c-connector";
|
||||
label = "USB-C";
|
||||
data-role = "dual";
|
||||
op-sink-microwatt = <1000000>;
|
||||
power-role = "dual";
|
||||
sink-pdos =
|
||||
<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
|
||||
source-pdos =
|
||||
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
|
||||
try-power-role = "source";
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hym8563_int>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x1>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
gpio-func {
|
||||
leds_gpio: leds-gpio {
|
||||
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
usb-typec {
|
||||
usbc0_int: usbc0-int {
|
||||
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
typec5v_pwren: typec5v-pwren {
|
||||
rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&avcc_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-mmc;
|
||||
no-sdio;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_sd_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sfc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&fspim0_pins>;
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0x0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-tx-bus-width = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
num-cs = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
reg = <0x0>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
spi-max-frequency = <1000000>;
|
||||
system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: dcdc-reg1 {
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: dcdc-reg2 {
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-name = "vdd_log_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: dcdc-reg4 {
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-name = "vccio_sd_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-name = "pldo6_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3_host {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdp_phy0 {
|
||||
mode-switch;
|
||||
orientation-switch;
|
||||
sbu1-dc-gpios = <&gpio4 RK_PA5 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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
usb-role-switch;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
usb_host0_xhci_drd_sw: endpoint {
|
||||
remote-endpoint = <&usbc0_hs>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdptxphy_hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_in {
|
||||
hdmi0_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi0>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi0_out {
|
||||
hdmi0_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi0_con_in>;
|
||||
};
|
||||
};
|
||||
|
||||
&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi0_in_vp0>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3588s-orangepi-5.dts"
|
||||
|
||||
/ {
|
||||
model = "Xunlong Orange Pi 5B";
|
||||
compatible = "xunlong,orangepi-5b", "rockchip,rk3588s";
|
||||
|
||||
aliases {
|
||||
mmc0 = &sdmmc;
|
||||
mmc1 = &sdhci;
|
||||
};
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
/* HS400 doesn't work properly -> https://github.com/torvalds/linux/commit/cee572756aa2cb46e959e9797ad4b730b78a050b */
|
||||
mmc-hs200-1_8v;
|
||||
max-frequency = <200000000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sfc {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
pcie@0,0 {
|
||||
reg = <0x400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
device_type = "pci";
|
||||
bus-range = <0x40 0x4f>;
|
||||
|
||||
wifi: wifi@0,0 {
|
||||
compatible = "pci14e4,449d";
|
||||
reg = <0x410000 0 0 0 0>;
|
||||
clocks = <&hym8563>;
|
||||
clock-names = "32k";
|
||||
};
|
||||
};
|
||||
};
|
||||
825
patch/kernel/archive/rockchip-rk3588-6.12/dt/rk3588s-rock-5c.dts
Normal file
825
patch/kernel/archive/rockchip-rk3588-6.12/dt/rk3588s-rock-5c.dts
Normal file
@@ -0,0 +1,825 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Radxa ROCK 5 Model C";
|
||||
compatible = "radxa,rock-5c", "rockchip,rk3588s";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
};
|
||||
|
||||
analog-sound {
|
||||
compatible = "audio-graph-card";
|
||||
label = "rk3588-es8316";
|
||||
|
||||
widgets = "Microphone", "Mic Jack",
|
||||
"Headphone", "Headphones";
|
||||
|
||||
routing = "MIC2", "Mic Jack",
|
||||
"Headphones", "HPOL",
|
||||
"Headphones", "HPOR";
|
||||
|
||||
dais = <&i2s0_8ch_p0>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
|
||||
user-led {
|
||||
gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
io-led {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
cooling-levels = <0 95 145 195 255>;
|
||||
fan-supply = <&vcc_5v0>;
|
||||
pwms = <&pwm3 0 50000 0>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc3v3_pcie: vcc3v3-pcie {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <5000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc_5v0: vcc-5v0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc_5v0_en>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host_en>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_otg: vcc5v0-otg-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_otg";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_otg_en>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
vdd_npu_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
eeprom: eeprom@50 {
|
||||
compatible = "belling,bl24c16a", "atmel,24c16";
|
||||
reg = <0x50>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c5m2_xfer>;
|
||||
};
|
||||
|
||||
&i2c7 {
|
||||
status = "okay";
|
||||
|
||||
es8316: audio-codec@11 {
|
||||
compatible = "everest,es8316";
|
||||
reg = <0x11>;
|
||||
clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
clock-names = "mclk";
|
||||
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
assigned-clock-rates = <12288000>;
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
port {
|
||||
es8316_p0_0: endpoint {
|
||||
remote-endpoint = <&i2s0_8ch_p0_0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2s0_8ch {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s0_lrck
|
||||
&i2s0_mclk
|
||||
&i2s0_sclk
|
||||
&i2s0_sdi0
|
||||
&i2s0_sdo0>;
|
||||
status = "okay";
|
||||
|
||||
i2s0_8ch_p0: port {
|
||||
i2s0_8ch_p0_0: endpoint {
|
||||
dai-format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
remote-endpoint = <&es8316_p0_0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-mode = "rgmii";
|
||||
pinctrl-0 = <&gmac1_miim
|
||||
&gmac1_tx_bus2
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
pinctrl-names = "default";
|
||||
tx_delay = <0x3a>;
|
||||
rx_delay = <0x3e>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@1 {
|
||||
/* RTL8211F */
|
||||
compatible = "ethernet-phy-id001c.c916";
|
||||
reg = <0x1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtl8211f_rst>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
status = "okay";
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
power {
|
||||
vcc_5v0_en: vcc-5v0-en {
|
||||
rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
rtl8211f {
|
||||
rtl8211f_rst: rtl8211f-rst {
|
||||
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
vcc5v0_otg_en: vcc5v0-otg-en {
|
||||
rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wifibt {
|
||||
wifibt_en: wifibit-en {
|
||||
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
host_wake_wl: host-wake-wl {
|
||||
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
};
|
||||
|
||||
wl_wake_host: wl-wake-host {
|
||||
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
host_wake_bt: host-wake-bt {
|
||||
rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
};
|
||||
|
||||
bt_wake_host: bt-wake-host {
|
||||
rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm3m1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&avcc_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
num-cs = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
reg = <0x0>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
spi-max-frequency = <1000000>;
|
||||
|
||||
system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-name = "vdd_log_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-name = "vccio_sd_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-name = "pldo6_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&u2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
status = "okay";
|
||||
vbus-supply = <&vcc5v0_otg>;
|
||||
};
|
||||
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
status = "okay";
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
};
|
||||
|
||||
&u2phy3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3_host {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdp_phy0 {
|
||||
status = "okay";
|
||||
rockchip,dp-lane-mux = <2 3>;
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifibt_en &host_wake_wl &wl_wake_host &host_wake_bt &bt_wake_host>;
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdptxphy_hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_in {
|
||||
hdmi0_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi0>;
|
||||
};
|
||||
};
|
||||
|
||||
&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi0_in_vp0>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,861 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588s.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Youyeetoo R1";
|
||||
compatible = "youyeetoo,r1", "rockchip,rk3588s";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio;
|
||||
serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
sys_led: led-0 {
|
||||
label = "sys_led";
|
||||
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sys_led_pin>;
|
||||
};
|
||||
};
|
||||
|
||||
/* POWER REGULATOR 12V DC-IN */
|
||||
|
||||
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>;
|
||||
};
|
||||
|
||||
/* POWER REGULATOR 5V SYS */
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
/* POWER REGULATOR CPU */
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
/* POWER REGULATOR 3V (SD) */
|
||||
|
||||
vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3_sd_s0";
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sd_s0_pwr>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
/* POWER REGULATOR 3.3V (PCIE)*/
|
||||
|
||||
vcc_3v3_pcie20: vcc3v3-pcie20-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3_pcie20";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
/* POWER REGULATOR 5V (USB2 & USB3) */
|
||||
|
||||
vcc5v0_usb: vcc5v0-usb-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_host_20: vcc5v0-host-20 { // U13 (USB 2.0)
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host20_en>;
|
||||
regulator-name = "vcc5v0_host_20";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
vcc5v0_host_30: vcc5v0-host-30 { // U12 (USB 3.0)
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host30_en>;
|
||||
regulator-name = "vcc5v0_host_30";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
|
||||
/* BLUETOOTH */
|
||||
wireless_bluetooth: wireless-bluetooth {
|
||||
compatible = "bluetooth-platdata";
|
||||
clocks = <&hym8563>;
|
||||
clock-names = "ext_clock";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* WIFI */
|
||||
wireless_wlan: wireless-wlan {
|
||||
compatible = "wlan-platdata";
|
||||
wifi_chip_type = "rtl8852be";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_host_wake_irq>;
|
||||
WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* FAN */
|
||||
fan0: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
#cooling-cells = <2>;
|
||||
cooling-levels = <100 160 190 200 215 235 255>;
|
||||
pwms = <&pwm6 0 40000 0>;
|
||||
fan-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
pinctrl-0 = <&gmac1_miim
|
||||
&gmac1_tx_bus2
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
pinctrl-names = "default";
|
||||
tx_delay = <0x42>;
|
||||
tx_delay = <0x43>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
mem-supply = <&vdd_cpu_big1_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
mem-supply = <&vdd_cpu_big1_mem_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>;
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: regulator@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big0_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: regulator@43 {
|
||||
compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
reg = <0x43>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu_big1_s0";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
|
||||
compatible = "rockchip,rk8602";
|
||||
reg = <0x42>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-compatible = "rk860x-reg";
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c6m3_xfer>;
|
||||
|
||||
/* RTC */
|
||||
hym8563: hym8563@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <32768>;
|
||||
clock-output-names = "hym8563";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&package_thermal {
|
||||
polling-delay = <1000>;
|
||||
|
||||
trips {
|
||||
package_fan0: package-fan0 {
|
||||
temperature = <55000>;
|
||||
hysteresis = <2000>;
|
||||
type = "active";
|
||||
};
|
||||
package_fan1: package-fan1 {
|
||||
temperature = <65000>;
|
||||
hysteresis = <2000>;
|
||||
type = "active";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map1 {
|
||||
trip = <&package_fan0>;
|
||||
cooling-device = <&fan0 THERMAL_NO_LIMIT 1>;
|
||||
};
|
||||
map2 {
|
||||
trip = <&package_fan1>;
|
||||
cooling-device = <&fan0 2 THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
rockchip,init-delay-ms = <100>;
|
||||
vpcie3v3-supply = <&vcc_3v3_pcie20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc_3v3_pcie20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&pinctrl {
|
||||
/* TODO: SOUND */
|
||||
sound {
|
||||
hp_detect: hp-detect {
|
||||
rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
/* GPIO LEDS */
|
||||
gpio-leds {
|
||||
sys_led_pin: sys-led-pin {
|
||||
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
|
||||
};
|
||||
};
|
||||
/* RTC */
|
||||
hym8563 {
|
||||
rtc_int: rtc-int {
|
||||
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
/* SD */
|
||||
sdmmc {
|
||||
sd_s0_pwr: sd-s0-pwr {
|
||||
rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
/* USB */
|
||||
usb {
|
||||
vcc5v0_host20_en: vcc5v0-host20-en { // USB 2.0
|
||||
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
vcc5v0_host30_en: vcc5v0-host30-en { // USB 3.0
|
||||
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
/* WIRELESS */
|
||||
wireless-wlan {
|
||||
wifi_host_wake_irq: wifi-host-wake-irq {
|
||||
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&avcc_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
/* HS400 doesn't work properly -> https://github.com/torvalds/linux/commit/cee572756aa2cb46e959e9797ad4b730b78a050b */
|
||||
mmc-hs200-1_8v;
|
||||
max-frequency = <200000000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
max-frequency = <200000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_sd_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
num-cs = <1>;
|
||||
|
||||
pmic@0 {
|
||||
compatible = "rockchip,rk806";
|
||||
spi-max-frequency = <1000000>;
|
||||
reg = <0x0>;
|
||||
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
|
||||
system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
vcc4-supply = <&vcc5v0_sys>;
|
||||
vcc5-supply = <&vcc5v0_sys>;
|
||||
vcc6-supply = <&vcc5v0_sys>;
|
||||
vcc7-supply = <&vcc5v0_sys>;
|
||||
vcc8-supply = <&vcc5v0_sys>;
|
||||
vcc9-supply = <&vcc5v0_sys>;
|
||||
vcc10-supply = <&vcc5v0_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc5v0_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc5v0_sys>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
rk806_dvs2_null: dvs2-null-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fudr_moden0";
|
||||
};
|
||||
|
||||
rk806_dvs3_null: dvs3-null-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_cpu_lit_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_log_s0: dcdc-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_log_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-init-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <675000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_2v0_pldo_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg8 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc_3v3_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg9 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg10 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avcc_1v8_s0: pldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "avcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s0: pldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_1v2_s0: pldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "avdd_1v2_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s0: pldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd_s0: pldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vccio_sd_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
pldo6_s3: pldo-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "pldo6_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s3: nldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_ddr_pll_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
avdd_0v75_s0: nldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "avdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v85_s0: nldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdd_0v85_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_0v75_s0: nldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm6{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* USB */
|
||||
|
||||
&u2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
phy-supply = <&vcc5v0_host_30>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy2_host {
|
||||
phy-supply = <&vcc5v0_host_20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy3_host {
|
||||
phy-supply = <&vcc5v0_host_20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
status = "okay";
|
||||
dr_mode = "host";
|
||||
extcon = <&u2phy0>;
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbdp_phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
cec-enable = "true";
|
||||
};
|
||||
|
||||
&hdptxphy_hdmi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi0_in {
|
||||
hdmi0_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi0>;
|
||||
};
|
||||
};
|
||||
|
||||
&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi0_in_vp0>;
|
||||
};
|
||||
};
|
||||
48
patch/kernel/archive/rockchip-rk3588-6.12/overlay/Makefile
Normal file
48
patch/kernel/archive/rockchip-rk3588-6.12/overlay/Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rockchip-rk3588-fanctrl.dtbo \
|
||||
rockchip-rk3588-sata1.dtbo \
|
||||
rockchip-rk3588-sata2.dtbo \
|
||||
rockchip-rk3588-hdmirx.dtbo \
|
||||
rockchip-rk3588-i2c8-m2.dtbo \
|
||||
rockchip-rk3588-pwm0-m0.dtbo \
|
||||
rockchip-rk3588-pwm0-m1.dtbo \
|
||||
rockchip-rk3588-pwm0-m2.dtbo \
|
||||
rockchip-rk3588-pwm1-m0.dtbo \
|
||||
rockchip-rk3588-pwm1-m1.dtbo \
|
||||
rockchip-rk3588-pwm1-m2.dtbo \
|
||||
rockchip-rk3588-pwm2-m1.dtbo \
|
||||
rockchip-rk3588-pwm3-m0.dtbo \
|
||||
rockchip-rk3588-pwm3-m1.dtbo \
|
||||
rockchip-rk3588-pwm3-m2.dtbo \
|
||||
rockchip-rk3588-pwm3-m3.dtbo \
|
||||
rockchip-rk3588-pwm5-m2.dtbo \
|
||||
rockchip-rk3588-pwm6-m0.dtbo \
|
||||
rockchip-rk3588-pwm6-m2.dtbo \
|
||||
rockchip-rk3588-pwm7-m0.dtbo \
|
||||
rockchip-rk3588-pwm7-m3.dtbo \
|
||||
rockchip-rk3588-pwm8-m0.dtbo \
|
||||
rockchip-rk3588-pwm10-m0.dtbo \
|
||||
rockchip-rk3588-pwm11-m0.dtbo \
|
||||
rockchip-rk3588-pwm11-m1.dtbo \
|
||||
rockchip-rk3588-pwm12-m0.dtbo \
|
||||
rockchip-rk3588-pwm13-m0.dtbo \
|
||||
rockchip-rk3588-pwm13-m2.dtbo \
|
||||
rockchip-rk3588-pwm14-m0.dtbo \
|
||||
rockchip-rk3588-pwm14-m1.dtbo \
|
||||
rockchip-rk3588-pwm14-m2.dtbo \
|
||||
rockchip-rk3588-pwm15-m0.dtbo \
|
||||
rockchip-rk3588-pwm15-m1.dtbo \
|
||||
rockchip-rk3588-pwm15-m2.dtbo \
|
||||
rockchip-rk3588-pwm15-m3.dtbo \
|
||||
rockchip-rk3588-uart1-m1.dtbo \
|
||||
rockchip-rk3588-uart3-m1.dtbo \
|
||||
rockchip-rk3588-uart4-m2.dtbo \
|
||||
rockchip-rk3588-uart6-m1.dtbo \
|
||||
rockchip-rk3588-uart7-m2.dtbo \
|
||||
rockchip-rk3588-uart8-m1.dtbo \
|
||||
rockchip-rk3588-rkvenc-overlay.dtso
|
||||
|
||||
dtb-y += $(dtbo-y)
|
||||
|
||||
clean-files := *.dtbo
|
||||
@@ -0,0 +1,11 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&fan>;
|
||||
__overlay__ {
|
||||
cooling-levels = <146 146 146 146 146 146 149 149 151>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&hdmi_receiver_cma>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&hdmi_receiver>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&i2c8>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c8m2_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm0>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm0m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm0>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm0>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm1m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm1m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm1m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm10>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm10m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm11>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm11m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM11-M1";
|
||||
compatible = "radxa,rock-5a";
|
||||
category = "misc";
|
||||
exclusive = "GPIO4_B4";
|
||||
description = "Enable PWM11-M1.\nOn Radxa ROCK 5A this is pin 15.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm11>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm11m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm12>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm12m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm13>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm13m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm13>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm13m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm14>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm14m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm14>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-names = "active";
|
||||
pinctrl-0 = <&pwm14m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm14>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm14m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM15-M0";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO3_C3";
|
||||
description = "Enable PWM15-M0.\nOn Radxa ROCK 5B this is pin 7.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm15>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm15m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm15>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm15m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm15>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm15m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM15-M3";
|
||||
compatible = "radxa,rock-5a", "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO1_D7";
|
||||
description = "Enable PWM15-M3.\nOn Radxa ROCK 5A this is pin 3.\nOn Radxa ROCK 5B this is pin 29.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm15>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm15m3_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM2-M1";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO3_B1";
|
||||
description = "Enable PWM2-M1.\nOn Radxa ROCK 5B this is pin 36.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm2>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm2m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm3>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm3m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM3-M1";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO3_B2";
|
||||
description = "Enable PWM3-M1.\nOn Radxa ROCK 5B this is pin 38.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm3>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm3m1_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm3>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm3m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pwm3>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm3m3_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM5-M2";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO4_C4";
|
||||
description = "Enable PWM5-M2.\nOn Radxa ROCK 5B this is pin 18.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm5>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm5m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM6-M0";
|
||||
compatible = "radxa,rock-5a";
|
||||
category = "misc";
|
||||
exclusive = "GPIO0_C7";
|
||||
description = "Enable PWM6-M0.\nOn Radxa ROCK 5A this is pin 27.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm6>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm6m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM6-M2";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO4_C5";
|
||||
description = "Enable PWM6-M2.\nOn Radxa ROCK 5B this is pin 28.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm6>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm6m2_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM7-M0";
|
||||
compatible = "radxa,rock-5a";
|
||||
category = "misc";
|
||||
exclusive = "GPIO0_D0";
|
||||
description = "Enable PWM7-M0.\nOn Radxa ROCK 5A this is pin 28.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm7>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm7m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM7-M3";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO4_C6";
|
||||
description = "Enable PWM7-M3.\nOn Radxa ROCK 5B this is pin 27.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm7>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm7m3_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
metadata {
|
||||
title = "Enable PWM8-M0";
|
||||
compatible = "radxa,rock-5b";
|
||||
category = "misc";
|
||||
exclusive = "GPIO3_A7";
|
||||
description = "Enable PWM8-M0.\nOn Radxa ROCK 5B this is pin 33.";
|
||||
};
|
||||
|
||||
fragment@0 {
|
||||
target = <&pwm8>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm8m0_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,123 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
#include <dt-bindings/clock/rockchip,rk3588-cru.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/power/rk3588-power.h>
|
||||
#include <dt-bindings/reset/rockchip,rk3588-cru.h>
|
||||
#include <dt-bindings/phy/phy.h>
|
||||
#include <dt-bindings/ata/ahci.h>
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
/ {
|
||||
|
||||
fragment@0 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
mpp_srv: mpp-srv {
|
||||
compatible = "rockchip,mpp-service";
|
||||
rockchip,taskqueue-count = <12>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
rkvenc_ccu: rkvenc-ccu {
|
||||
compatible = "rockchip,rkv-encoder-v2-ccu";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
rkvenc0: rkvenc-core@fdbd0000 {
|
||||
compatible = "rockchip,rkv-encoder-v2-core";
|
||||
reg = <0x0 0xfdbd0000 0x0 0x6000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
interrupt-names = "irq_rkvenc0";
|
||||
clocks = <&cru ACLK_RKVENC0>, <&cru HCLK_RKVENC0>, <&cru CLK_RKVENC0_CORE>;
|
||||
clock-names = "aclk_vcodec", "hclk_vcodec", "clk_core";
|
||||
rockchip,normal-rates = <600000000>, <0>, <800000000>;
|
||||
assigned-clocks = <&cru ACLK_RKVENC0>, <&cru CLK_RKVENC0_CORE>;
|
||||
assigned-clock-rates = <600000000>, <800000000>;
|
||||
resets = <&cru SRST_A_RKVENC0>, <&cru SRST_H_RKVENC0>, <&cru SRST_RKVENC0_CORE>;
|
||||
reset-names = "video_a", "video_h", "video_core";
|
||||
rockchip,skip-pmu-idle-request;
|
||||
iommus = <&rkvenc0_mmu>;
|
||||
rockchip,srv = <&mpp_srv>;
|
||||
rockchip,ccu = <&rkvenc_ccu>;
|
||||
rockchip,taskqueue-node = <7>;
|
||||
rockchip,task-capacity = <8>;
|
||||
power-domains = <&power RK3588_PD_VENC0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
rkvenc0_mmu: iommu@fdbdf000 {
|
||||
compatible = "rockchip,rk3568-iommu";
|
||||
reg = <0x0 0xfdbdf000 0x0 0x40>, <0x0 0xfdbdf040 0x0 0x40>;
|
||||
interrupts = <0 99 4 0>, <0 100 4 0>;
|
||||
interrupt-names = "irq_rkvenc0_mmu0", "irq_rkvenc0_mmu1";
|
||||
clocks = <&cru ACLK_RKVENC0>, <&cru HCLK_RKVENC0>;
|
||||
clock-names = "aclk", "iface";
|
||||
rockchip,disable-mmu-reset;
|
||||
rockchip,enable-cmd-retry;
|
||||
rockchip,shootdown-entire;
|
||||
#iommu-cells = <0>;
|
||||
power-domains = <&power RK3588_PD_VENC0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
rkvenc1: rkvenc-core@fdbe0000 {
|
||||
compatible = "rockchip,rkv-encoder-v2-core";
|
||||
reg = <0x0 0xfdbe0000 0x0 0x6000>;
|
||||
interrupts = <0 104 4 0>;
|
||||
interrupt-names = "irq_rkvenc1";
|
||||
clocks = <&cru ACLK_RKVENC1>, <&cru HCLK_RKVENC1>, <&cru CLK_RKVENC1_CORE>;
|
||||
clock-names = "aclk_vcodec", "hclk_vcodec", "clk_core";
|
||||
rockchip,normal-rates = <600000000>, <0>, <800000000>;
|
||||
assigned-clocks = <&cru ACLK_RKVENC1>, <&cru CLK_RKVENC1_CORE>;
|
||||
assigned-clock-rates = <600000000>, <800000000>;
|
||||
resets = <&cru SRST_A_RKVENC1>, <&cru SRST_H_RKVENC1>, <&cru SRST_RKVENC1_CORE>;
|
||||
reset-names = "video_a", "video_h", "video_core";
|
||||
rockchip,skip-pmu-idle-request;
|
||||
iommus = <&rkvenc1_mmu>;
|
||||
rockchip,srv = <&mpp_srv>;
|
||||
rockchip,ccu = <&rkvenc_ccu>;
|
||||
rockchip,taskqueue-node = <7>;
|
||||
rockchip,task-capacity = <8>;
|
||||
power-domains = <&power RK3588_PD_VENC1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@5 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
rkvenc1_mmu: iommu@fdbef000 {
|
||||
compatible = "rockchip,rk3568-iommu";
|
||||
reg = <0x0 0xfdbef000 0x0 0x40>, <0x0 0xfdbef040 0x0 0x40>;
|
||||
interrupts = <0 102 4 0>, <0 103 4 0>;
|
||||
interrupt-names = "irq_rkvenc1_mmu0", "irq_rkvenc1_mmu1";
|
||||
clocks = <&cru ACLK_RKVENC1>, <&cru HCLK_RKVENC1>;
|
||||
clock-names = "aclk", "iface";
|
||||
rockchip,disable-mmu-reset;
|
||||
rockchip,enable-cmd-retry;
|
||||
rockchip,shootdown-entire;
|
||||
#iommu-cells = <0>;
|
||||
power-domains = <&power RK3588_PD_VENC1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pcie2x1l0>;
|
||||
|
||||
__overlay__ {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&sata1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&pcie2x1l1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&sata2>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&uart1>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart1m1_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&uart3>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart3m1_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&uart4>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart4m2_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&uart6>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart6m1_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&uart7>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart7m2_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&uart8>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart8m1_xfer>;
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user