gpiof: gpio@50007000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x50007000 0x400>; clocks = <&rcc GPIOF>; st,bank-name = "GPIOF"; status = "disabled"; }; }; #interrupt-cells = <2>; 这个子节点怎么设置
时间: 2023-06-20 18:04:05 浏览: 83
这是一个中断控制器的节点,它的 #interrupt-cells 属性应该设置为 2,因为它处理的是两个中断参数。同时,它的 reg 属性指定了该节点在设备树上的地址和大小。clocks 属性指定了该节点所需的时钟源,st,bank-name 属性指定了该 GPIO 的名称,status 属性指定了该节点当前的状态是否启用("disabled"表示未启用)。你可以根据实际情况来修改这些属性。
相关问题
/* set voltage internal voltage to 1.8V */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; PWR->CR = PWR_CR_VOS_0; phal_clk_init(); /* enable peripheral and GPIO clocks */ RCC->IOPENR |= GPIO_CLOCKS; RCC->APB1ENR |= APB1_CLOCKS; RCC->APB2ENR |= APB2_CLOCKS; RCC->AHBENR |= AHB_CLOCKS; phal_timer_init(); #if (USE_DMA_FOR_UART_TX == IOL_FEATURE_ENABLED) phal_dma_init(); #endif #if (AL_TRIGGER == AL_FROM_INTERRUPT) phal_al_sw_interrupt_setup(); #endif
这段代码的作用是将内部电压设置为1.8V,然后初始化时钟和定时器,并启用外设和GPIO时钟。其中,RCC代表时钟控制寄存器,PWR代表电源控制寄存器,APB1ENR、APB2ENR、AHBENR分别代表不同的时钟总线。GPIO_CLOCKS、APB1_CLOCKS、APB2_CLOCKS、AHB_CLOCKS则是不同的外设和GPIO时钟。
有没卡启动的rk3288-evb-android-act8846-edp.dts示例
以下是一个可以用于SD卡启动的rk3288-evb-android-act8846-ed.dts示例,仅供参考:
```
/dts-v1/;
/include/ "rk3288.dtsi"
/ {
model = "Rockchip RK3288 EVB with act8846 and edp";
chosen {
bootargs = "earlyprintk console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootwait";
};
memory@60000000 {
reg = <0x60000000 0x40000000>;
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
kernel@0 {
reg = <0x60000000 0x02000000>;
};
reserved@20000000 {
reg = <0x20000000 0x20000000>;
};
};
aliases {
mmc0 = &sdmmc;
};
sdmmc: sdmmc@fe310000 {
compatible = "rockchip,rk3288-dw-mshc";
reg = <0xfe310000 0x1000>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_SDMMC0>, <&cru SCLK_SDMMC0>;
clock-names = "pclk", "hclk";
dmas = <&pdma 12>, <&pdma 12>;
dma-names = "rx", "tx";
pinctrl-0 = <&sdmmc_pins>;
pinctrl-names = "default";
status = "okay";
};
sdmmc_pins: sdmmc@0 {
rockchip,pins = <
RK_GPIO1 1 RK_FUNC_2
RK_GPIO1 2 RK_FUNC_2
RK_GPIO1 3 RK_FUNC_2
RK_GPIO1 4 RK_FUNC_2
RK_GPIO1 5 RK_FUNC_2
RK_GPIO1 6 RK_FUNC_2
RK_GPIO1 7 RK_FUNC_2
RK_GPIO1 8 RK_FUNC_2
>;
};
act8846: act8846@5b {
compatible = "active-semi,act8846";
reg = <0x5b>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_EDGE_RISING>;
pinctrl-names = "default";
pinctrl-0 = <&act8846_pins>;
status = "okay";
};
act8846_pins: act8846@0 {
rockchip,pins = <
RK_GPIO4 3 RK_FUNC_GPIO
RK_GPIO4 4 RK_FUNC_GPIO
RK_GPIO4 5 RK_FUNC_GPIO
>;
};
edp: edp@1c19000 {
compatible = "rockchip,rk3288-edp";
reg = <0x01c19000 0x1000>;
interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_EDP>;
clock-names = "edp";
status = "okay";
};
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm2 0 5000>;
brightness-levels = <0 14 28 42 56 70 84 100>;
default-brightness-level = <7>;
status = "okay";
};
};
```
这个示例中,sdmmc节点表示SD卡,act8846节点表示PMIC,edp节点表示eDP显示器接口,backlight节点表示背光控制。其中,bootargs设置了SD卡启动的相关参数。注意,这个示例是根据某个特定的rk3288 EVB开发板进行配置的,如果你的硬件不同,需要进行相应的修改。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)