Skip to content

Commit a3063ea

Browse files
authored
Merge pull request #19 from yan-wyb/khadas-edge-4.4.y
add red_led in dts
2 parents 7f0e856 + d2d05d1 commit a3063ea

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

arch/arm64/boot/dts/rockchip/rk3399-khadas-captain-linux.dts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@
7575
};
7676
};
7777

78-
78+
onewire:onewire {
79+
compatible = "w1-gpio";
80+
gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
81+
status = "disable";
82+
};
7983

8084
};
8185

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@
228228
linux,default-trigger = "heartbeat";
229229
default-state = "on";
230230
};
231+
red_led {
232+
gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>; /* GPIO4_D0 */
233+
label = "red_led";
234+
linux,default-trigger = "none";
235+
default-state = "off";
236+
};
231237
};
232238

233239
vcc3v3_sys: vcc3v3-sys {

arch/arm64/boot/dts/rockchip/rk3399-khadas-edgev-linux.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
/ {
4848
model = "Khadas Edge-V";
4949
compatible = "khadas,edgev", "rockchip,rk3399";
50+
51+
onewire:onewire {
52+
compatible = "w1-gpio";
53+
gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
54+
status = "disable";
55+
};
5056
};
5157

5258
&gmac {

arch/arm64/configs/kedge_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ CONFIG_DEBUG_GPIO=y
314314
CONFIG_GPIO_SYSFS=y
315315
CONFIG_GPIO_GENERIC_PLATFORM=y
316316
CONFIG_GPIO_RK8XX=y
317+
CONFIG_W1=y
318+
CONFIG_W1_MASTER_GPIO=y
319+
CONFIG_W1_SLAVE_THERM=y
317320
CONFIG_BATTERY_SBS=y
318321
CONFIG_CHARGER_GPIO=y
319322
CONFIG_CHARGER_BQ24735=y

0 commit comments

Comments
 (0)