From 748e4f3d702def1a4bff191e0cf93b6a05340f01 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:41:34 +0000
Subject: [PATCH] add gpio led uart
---
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi | 66 ++++++++++++++++++++------------
1 files changed, 41 insertions(+), 25 deletions(-)
diff --git a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
index 576850c..89b1b36 100755
--- a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
+++ b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
@@ -89,6 +89,24 @@
regulator-boot-on;
};
#endif
+
+ leds: leds {
+ compatible = "gpio-leds";
+ sig_led: sig_led {
+ gpios = <&gpio4 RK_PC3 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+ err_led: err_led {
+ gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
+
ndj_io_init {
compatible = "nk_io_control";
pinctrl-names = "default";
@@ -103,6 +121,11 @@
vcc_12v {
gpio_num = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
+ gpio_function = <0>;
+ };
+
+ vcc_3.3v {
+ gpio_num = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
gpio_function = <0>;
};
@@ -312,7 +335,7 @@
* when dsi0 is enabled
*/
&video_phy0 {
- status = "okay";
+ status = "disabled";
};
&dsi0 {
@@ -398,7 +421,7 @@
};
&lvds {
- status = "okay";
+ status = "disabled";
ports {
port@1 {
reg = <1>;
@@ -415,7 +438,7 @@
};
&lvds_in_vp1 {
- status = "okay";
+ status = "disabled";
};
/*
@@ -698,11 +721,17 @@
<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
<3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
<3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
- <2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,//93 SPI2_CS0_M1_3V3
- <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,//94 SPI2_MOSI_M1_3V3
- <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>,//95 SPI2_MISO_M1_3V3
- <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,//96 SPI2_CLK_M1_3V3
- <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>,//96 SPI2_CLK_M1_3V3
+ <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B0_u_3V3 DO1
+ <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B3_u_3V3 DO2
+ <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B4_u_3V3 DO3
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B5_u_3V3 DO4
+ <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B6_u_3V3 DO5
+
+ <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C0_d_3V3 DI1_1
+ <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C1_d_3V3 DI2_1
+ <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C2_d_3V3 DI3_1
+ <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C3_d_3V3 DI4_1
+ <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C5_d_3V3 DI5_1
<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
@@ -768,15 +797,6 @@
pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
};
-&vcc3v3_lcd0_n {
- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
- enable-active-high;
-};
-
-//&vcc3v3_lcd1_n {
- //gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
- //enable-active-high;
-//};
&wireless_wlan {
pinctrl-names = "default";
@@ -800,7 +820,7 @@
};
&uart0 {
- status = "okay";
+ status = "disabled";
};
&uart1 {
@@ -815,7 +835,7 @@
};
&uart4 {
- status = "okay";
+ status = "disabled";
pinctrl-0 = <&uart4m1_xfer>;
};
@@ -824,10 +844,6 @@
pinctrl-0 = <&uart5m1_xfer>;
};
-&uart6 {
- status = "okay";
- pinctrl-0 = <&uart6m1_xfer>;
-};
&uart7 {
status = "okay";
@@ -835,11 +851,11 @@
};
&uart8 {
- status = "okay";
+ status = "disabled";
pinctrl-0 = <&uart8m1_xfer>;
};
&uart9 {
- status = "okay";
+ status = "disabled";
pinctrl-0 = <&uart9m1_xfer>;
};
--
Gitblit v1.6.2