设备数解析:上拉设置rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;

这段代码是设备树(Device Tree)的一部分,用于描述硬件设备的配置信息。设备树在Linux内核中被广泛使用,尤其是在嵌入式系统和ARM架构的设备中,用于描述那些不能直接通过BIOS或UEFI等固件发现的硬件信息。这段代码具体描述了一个名为hym8563的设备节点,以及该节点下的一个子节点hym8563_int,它似乎是与一个中断(interrupt)相关的配置。

解析这段代码:

  • hym8563:这是设备树中的一个节点,通常代表一个具体的硬件设备,比如一个实时时钟(RTC)芯片。hym8563可能是一个特定型号或系列的硬件标识符。

  • hym8563_int:这是hym8563节点下的一个子节点,表示与hym8563设备相关的中断配置。中断是硬件与操作系统交互的一种方式,用于通知操作系统某个事件已经发生,比如数据准备好、设备故障等。

  • rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;:这是一个属性配置,用于描述中断相关的引脚配置。

    • rockchip,pins:这表明该属性是与Rockchip平台相关的引脚配置。Rockchip是一种ARM架构的处理器,广泛用于各种嵌入式设备和移动设备中。
    • <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>:这是一个属性值,具体描述了引脚配置。
      • 0:可能表示这是该设备第一个(或唯一的)引脚配置。
      • RK_PB0:指定了具体的引脚,这里是Rockchip平台上的PB0引脚。
      • RK_FUNC_GPIO:表示这个引脚被配置为GPIO(通用输入输出)功能。
      • &pcfg_pull_up:这是一个引用,指向设备树中另一个节点或配置,这里表示该引脚被配置为上拉(pull-up)模式。上拉模式是一种常见的电路配置,用于确保未激活时引脚保持在高电平状态。

总的来说,这段代码描述了在一个使用Rockchip处理器的系统中,hym8563设备的中断相关配置,特别是关于PB0引脚被配置为GPIO功能,并且采用上拉模式的细节。这样的配置对于操作系统正确识别和使用该硬件设备至关重要。

/ { model = "Luckfox Pico Pro"; compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1106"; backlight:backlight{ compatible = "gpio-backlight"; pinctrl-names = "default"; pinctrl-0 = <&gpio2_pb0>; gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>; default-on; }; /*LCD_DC*/ gpio2pb1:gpio2pb1 { compatible = "regulator-fixed"; pinctrl-names = "default"; pinctrl-0 = <&gpio2_pb1>; regulator-name = "gpio2_pb1"; regulator-always-on; }; /*LCD_RES*/ gpio1pc3:gpio1pc3 { compatible = "regulator-fixed"; pinctrl-names = "default"; pinctrl-0 = <&gpio1_pc3>; regulator-name = "gpio1_pc3"; regulator-always-on; }; }; /**********GPIO**********/ &pinctrl { /*LCD_BL*/ gpio2-pb0 { gpio2_pb0:gpio2-pb0 { rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; /*LCD_DC*/ gpio2-pb1 { gpio2_pb1:gpio2-pb1 { rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; }; }; /*LCD_RES*/ gpio1-pc3 { gpio1_pc3:gpio1-pc3 { rockchip,pins = <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; spi0 { /omit-if-no-ref/ spi0m0_pins: spi0m0-pins { rockchip,pins = /* spi0_clk_m0 */ <1 RK_PC1 4 &pcfg_pull_none>, /* spie_miso_m0 */ // <1 RK_PC3 6 &pcfg_pull_none>, /* spi_mosi_m0 */ <1 RK_PC2 6 &pcfg_pull_none>; }; }; &spi0 { status = "okay"; pinctrl-names = "default"; // pinctrl-0 = <&spi0m0_pins>; // 包含clk,mi,mo pinctrl-0 = <&spi0m0_cs0 &spi0m0_pins>; #address-cells = <1>; #size-cells = <0>; spidev@0 { status = "disabled"; compatible = "rockchip,spidev"; spi-max-frequency = <1000000000>; reg = <0>; }; }; 这个是别人rv1106g-luckfox-pico-pro.dts的,按照这个有什么需要保留,又有什么需要修改添加呢
03-13
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2024 Rockchip Electronics Co., Ltd. */ /dts-v1/; #include "rv1103b.dtsi" #include "rv1103b-evb.dtsi" #include "rv1103b-evb-cam.dtsi" / { model = "Rockchip RV1103B EVB1 V10 Board"; compatible = "rockchip,rv1103b-evb1-v10", "rockchip,rv1103b"; // motor: motor{ // compatible = "motor"; // status = "okay"; // motorA-gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; // motorB-gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; // motorC-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; // motorD-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; // motorE-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; // motorF-gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; // motorG-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; // motorH-gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; // }; sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; post-power-on-delay-ms = <300>; // 改为原理图空闲GPIO2_PA0(无其他功能占用),远离I2C3_SDA(GPIO2_PB2) reset-gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; }; vcc3v3_sd: vcc3v3-sd { compatible = "regulator-fixed"; gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; regulator-name = "vcc3v3_sd"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_pwren>; vin-supply = <&vcc_3v3>; startup-delay-us = <500000>; }; // vccio_sd: vccio-sd { // compatible = "regulator-gpio"; // regulator-name = "vccio_sd"; // regulator-min-microvolt = <1800000>; // regulator-max-microvolt = <3300000>; // gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>; // states = <3300000 1 // 1800000 0>; // pinctrl-names = "default"; // pinctrl-0 = <&sdmmc_volt>; // }; wireless_wlan: wireless-wlan { compatible = "wlan-platdata"; wifi_chip_type = "rtl8189fs"; pinctrl-names = "default"; pinctrl-0 = <&wifi_host_wake_irq>; WIFI,host_wake_irq = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; status = "disabled"; }; }; // &gpio0 { // status = "okay"; // /* 设置 GPIO0_A2 为输出低电平 */ // gpio0_a2_low { // gpio-hog; // gpios = <2 0>; // output-low; // line-name = "gpio0_a2"; // }; // /* 设置 GPIO0_A3 为输出低电平 */ // gpio0_a3_low { // gpio-hog; // gpios = <3 0>; // output-low; // line-name = "gpio0_a3"; // }; // }; // &gpio0 { // pinctrl-names = "default"; /* 修复:删除多余反引号 */ // pinctrl-0 = <&gpio0_a2_pin &gpio0_a3_pin>; // }; &pinctrl { // gpio0 { // gpio0_a2_pin: gpio0-a2-pin { // rockchip,pins = <0 2 0 &pcfg_pull_none>; // }; // gpio0_a3_pin: gpio0-a3-pin { // rockchip,pins = <0 3 0 &pcfg_pull_none>; // }; // }; icm20690 { icm20690_int1_pin: icm20690-int1-pin { rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>; }; icm20690_int2_pin: icm20690-int2-pin { rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; }; }; sdio-pwrseq { wifi_enable_h: wifi-enable-h { rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; sdmmc { /omit-if-no-ref/ sdmmc_pwren: sdmmc-pwren { rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; }; }; wireless-wlan { wifi_host_wake_irq: wifi-host-wake-irq { rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; }; &emmc { no-sdio; no-sd; bus-width = <4>; cap-mmc-highspeed; non-removable; mmc-hs200-1_8v; status = "okay"; }; &fspi0 { status = "okay"; flash@0 { compatible = "spi-nand"; reg = <0>; spi-max-frequency = <75000000>; spi-rx-bus-width = <4>; spi-tx-bus-width = <1>; }; }; &sdmmc0 { supports-sd; no-1-8-v; no-sdio; no-mmc; bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; disable-wp; card-detect-delay = <1200>; vmmc-supply = <&vcc3v3_sd>; status = "okay"; }; &sdmmc1 { max-frequency = <150000000>; no-sd; no-mmc; bus-width = <4>; cap-sd-highspeed; cap-sdio-irq; keep-power-in-suspend; mmc-pwrseq = <&sdio_pwrseq>; non-removable; pinctrl-names = "default"; pinctrl-0 = <&sdmmc1_cmd_pins &sdmmc1_clk_pins &sdmmc1_bus4_pins>; status = "disabled"; }; &i2c3 { status = "okay"; clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&i2c3m1_xfer_pins>; invensense: invensense@68 { compatible = "invensense,icm20690"; reg = <0x68>; vdd-supply = <&vcc_3v3>; vddio-supply = <&vcc_3v3>; interrupts-extended = <&gpio0 RK_PB3 IRQ_TYPE_EDGE_RISING>, <&gpio2 RK_PA4 IRQ_TYPE_EDGE_RISING>; interrupt-names = "INT1", "INT2"; pinctrl-names = "default"; pinctrl-0 = <&icm20690_int1_pin &icm20690_int2_pin>; mount-matrix = "1", "0", "0", "0", "1", "0", "0", "0", "1"; status = "okay"; }; }
最新发布
11-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值