中级会员
- 积分
- 254
- 金钱
- 254
- 注册时间
- 2020-10-19
- 在线时间
- 54 小时
|
- hopes2024@hopes2024-virtual-machine:~/zdyzker/linux-xlnx-xlnx_rebase_v5.4_2020.2/arch/arm/boot/dts$ cat system-user.dtsi
- #define GPIO_ACTIVE_HIGH 1
- #define GPIO_ACTIVE_LOW 0
- ///include/ "system-conf.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/media/xilinx-vip.h>
- #include <dt-bindings/phy/phy.h>
- #include <pl.dtsi>
- / {
- model = "CHopes Linux ALINX Zynq Core Board";
- compatible = "xlnx,zynq-zc701","xlnx,zynq-7000";
- chosen{
- bootargs = "console=ttyPS0,115200 earlycon root=/dev/mmcblk0p2 rw rootwait";
- stdout-path = "serial0:115200n8";
- };
- user-led{
- compatible="gpio-led";
-
- psled{
- label="ps_led";
- gpios=<&gpio0 0 GPIO_ACTIVE_HIGH>;
- linux,default-trigger="heartbeat";
- default-state="on";};
- emio {
- label="emio_beeper";
- gpios=<&gpio0 54 GPIO_ACTIVE_HIGH>;
- linux,default-trigger="heartbeat";
- default-state="on";};
- };
- user-axigpio{
- compatible="xlnx,xps-gpio-1.00.a";
- gpios=<&axi_gpio_0 18 0 GPIO_ACTIVE_HIGH>;
- gpio-controller;
- xlnx,all-outputs = <0x0>;
- xlnx,dout-default = <0x00040000>;
- };
- };
- hopes2024@hopes2024-virtual-machine:~/zdyzker/linux-xlnx-xlnx_rebase_v5.4_2020.2/arch/arm/boot/dts$ cd ~
- hopes2024@hopes2024-virtual-machine:~$ cd zdyzker/linux-xlnx-xlnx_rebase_v5.4_2020.2/
- hopes2024@hopes2024-virtual-machine:~/zdyzker/linux-xlnx-xlnx_rebase_v5.4_2020.2$ make dtbs
- scripts/kconfig/conf --syncconfig Kconfig
- *
- * Restart config...
- *
- *
- * General setup
- *
- Compile also drivers which will not load (COMPILE_TEST) [N/y/?] n
- Compile test headers that should be standalone compilable (HEADER_TEST) [N/y/?] n
- Local version - append to kernel release (LOCALVERSION) [-xilinx] -xilinx
- Automatically append version information to the version string (LOCALVERSION_AUTO) [Y/n/?] y
- Build ID Salt (BUILD_SALT) []
- Kernel compression mode
- > 1. Gzip (KERNEL_GZIP)
- 2. Bzip2 (KERNEL_BZIP2) (NEW)
- 3. LZMA (KERNEL_LZMA)
- 4. XZ (KERNEL_XZ)
- 5. LZO (KERNEL_LZO)
- 6. LZ4 (KERNEL_LZ4)
- choice[1-6?]:
复制代码 本意是想采用xilinx提供的驱动源码,尝试直接编写设备树来驱动一下AXI_GPIO。但现在碰到两个问题:
①在内核源码根目录下,编译设备树时,出现了压缩内核的情况,之前是没有碰到过的。不清楚是不是设备树没写对的原因?
②在gpios属性时,没弄明白这个AXI_GPIO绑定的zynq引脚号怎么转变成GPIO的编号。比如我绑定的是zynq引脚号为W16,那么gpios属性中的编号是多少呢?是有什么对应关系么?
|
|