f9f783ef375efc1a154af6fc7a9b5833b05b76b0
[openwrt/staging/wigyori.git] / package / boot / uboot-mediatek / patches / 000-mtk-08-dts-mt7629-enable-JTAG-pins-by-default.patch
1 From 4bee3f9e285007ccf77ca9916fff3d93fc4d8a80 Mon Sep 17 00:00:00 2001
2 From: Weijie Gao <weijie.gao@mediatek.com>
3 Date: Tue, 2 Mar 2021 15:43:27 +0800
4 Subject: [PATCH 08/21] dts: mt7629: enable JTAG pins by default
5
6 The EPHY LEDs belongs to the built-in FE switch of MT7629, which is barely
7 used. These LED pins on reference boards are used as JTAG socket. So it's
8 a good idea to change the default state to JTAG, and this will make it
9 convenience for debugging.
10
11 Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
12 ---
13 arch/arm/dts/mt7629-rfb.dts | 10 ++++++++++
14 arch/arm/dts/mt7629.dtsi | 6 ++++++
15 2 files changed, 16 insertions(+)
16
17 --- a/arch/arm/dts/mt7629-rfb.dts
18 +++ b/arch/arm/dts/mt7629-rfb.dts
19 @@ -36,6 +36,16 @@
20 };
21
22 &pinctrl {
23 + state_default: pinmux_conf {
24 + u-boot,dm-pre-reloc;
25 +
26 + mux {
27 + function = "jtag";
28 + groups = "ephy_leds_jtag";
29 + u-boot,dm-pre-reloc;
30 + };
31 + };
32 +
33 snfi_pins: snfi-pins {
34 mux {
35 function = "flash";
36 --- a/arch/arm/dts/mt7629.dtsi
37 +++ b/arch/arm/dts/mt7629.dtsi
38 @@ -152,6 +152,12 @@
39 compatible = "mediatek,mt7629-pinctrl";
40 reg = <0x10217000 0x8000>;
41
42 + pinctrl-names = "default";
43 + pinctrl-0 = <&state_default>;
44 +
45 + state_default: pinmux_conf {
46 + };
47 +
48 gpio: gpio-controller {
49 gpio-controller;
50 #gpio-cells = <2>;