mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 09:10:02 +00:00
gl-mt1300: configure dbdc in dts
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
This commit is contained in:
parent
1bdb39254e
commit
3da50881f5
67
patches-22.03.2/0026--mt1300-configure-dbdc-in-dts.patch
Normal file
67
patches-22.03.2/0026--mt1300-configure-dbdc-in-dts.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From 8404956f020d1641295ce6371f8c7dc119f9b59c Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Mon, 12 Dec 2022 16:27:27 +0800
|
||||
Subject: [PATCH] mt1300: configure dbdc in dts
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
.../mt76/patches/002-dbdc-configure.patch | 34 +++++++++++++++++++
|
||||
.../ramips/dts/mt7621_glinet_gl-mt1300.dts | 1 +
|
||||
2 files changed, 35 insertions(+)
|
||||
create mode 100644 package/kernel/mt76/patches/002-dbdc-configure.patch
|
||||
|
||||
diff --git a/package/kernel/mt76/patches/002-dbdc-configure.patch b/package/kernel/mt76/patches/002-dbdc-configure.patch
|
||||
new file mode 100644
|
||||
index 0000000000..a7998097df
|
||||
--- /dev/null
|
||||
+++ b/package/kernel/mt76/patches/002-dbdc-configure.patch
|
||||
@@ -0,0 +1,34 @@
|
||||
+Index: mt76-2022-09-06-d7054646/mt7615/pci_init.c
|
||||
+===================================================================
|
||||
+--- mt76-2022-09-06-d7054646.orig/mt7615/pci_init.c
|
||||
++++ mt76-2022-09-06-d7054646/mt7615/pci_init.c
|
||||
+@@ -126,6 +126,7 @@ mt7615_led_set_brightness(struct led_cla
|
||||
+
|
||||
+ int mt7615_register_device(struct mt7615_dev *dev)
|
||||
+ {
|
||||
++ bool dbdc = false;
|
||||
+ int ret;
|
||||
+
|
||||
+ mt7615_init_device(dev);
|
||||
+@@ -145,6 +146,12 @@ int mt7615_register_device(struct mt7615
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
++ if (dev->dbdc_support) {
|
||||
++ dbdc = device_property_present(dev->mt76.dev, "dbdc");
|
||||
++ if (dbdc)
|
||||
++ dev->mt76.phy.cap.has_5ghz = false;
|
||||
++ }
|
||||
++
|
||||
+ ret = mt76_register_device(&dev->mt76, true, mt76_rates,
|
||||
+ ARRAY_SIZE(mt76_rates));
|
||||
+ if (ret)
|
||||
+@@ -158,7 +165,7 @@ int mt7615_register_device(struct mt7615
|
||||
+ mt7615_init_txpower(dev, &dev->mphy.sband_2g.sband);
|
||||
+ mt7615_init_txpower(dev, &dev->mphy.sband_5g.sband);
|
||||
+
|
||||
+- if (dev->dbdc_support) {
|
||||
++ if (dev->dbdc_support && dbdc) {
|
||||
+ ret = mt7615_register_ext_phy(dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
||||
index 54ff1019b1..5662600a62 100644
|
||||
--- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
||||
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
||||
@@ -139,6 +139,7 @@
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
+ dbdc;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user