|
发表于 2023-6-16 14:38:59
只看该作者
5#
本帖最后由 luwy 于 2023-6-16 14:44 编辑
1. 操作流程没问题
2. 这两个实际上分别被pwm7和can1 占用, 需要在dts 里面关掉这两个节点,才可以被导出并使用,补丁如下
- diff --git a/kernel/arch/arm64/boot/dts/rockchip/rk3568-firefly-roc-pc-se.dtsi b/kernel/arch/arm64/boot/dts/rockchip/rk3568-firefly-roc-pc-se.dtsi
- index 8492792422b..283fe34a0c1 100644
- --- a/kernel/arch/arm64/boot/dts/rockchip/rk3568-firefly-roc-pc-se.dtsi
- +++ b/kernel/arch/arm64/boot/dts/rockchip/rk3568-firefly-roc-pc-se.dtsi
- @@ -166,7 +166,7 @@
- };
-
- &can1{
- - status = "okay";
- + status = "disabled";
- };
-
- &pcie30phy {
- @@ -244,7 +244,7 @@
- };
-
- &pwm7 {
- - status = "okay";
- + status = "disabled";
- };
-
- &sata2 {
复制代码
3. 如何知道gpio 是否被占用
- cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins
- pin 19 (gpio0-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
- pin 20 (gpio0-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
- pin 21 (gpio0-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
- pin 22 (gpio0-22): (MUX UNCLAIMED) gpio0:22
复制代码
pin 21 (gpio0-21): (MUX UNCLAIMED) (GPIO UNCLAIMED) 类似mux 和gpio 都是UNCLAIMED则未被其他功能占用和gpio申请 |
|