I need to set up three GPIO interfaces are GPIOZ_15, GPIOH_4, and GPIOA_5, and connect these interface pins with buttons respectively, and connect the other wire to J14(GND). Set these pins to be pull-up so that their output can be captured by the system when I press. Is this scenario feasible?
You can try to config the dts pinctrl to add bias-pull-down or bias-pull-up, here is an example from arch/arm64/boot/dts/amlogic/mesong12b.dtsi for your reference:
sdio_m_clk_gate_pins:sdio_m_clk_gate_pins {
mux {
groups = "GPIOX_4";
function = "gpio_periphs";
bias-pull-down;
drive-strength = <3>;
};
};
In a suitable Ubuntu x86 environment you need to create a clone of fenix scripts:
$ git clone https://github.com/khadas/fenix --depth 1
$ cd fenix
Follow the fenix/README.md doc to install the necessary packages and build tools
To build the packages for updating your dtb/dtsi you need to run make kernel-deb so that the scripts setup all the necessary sources for it.
you can find this same file in your source tree, directory should be build/linux/arch/arm64/boot/dts/amlogic/mesong12b.dtsi. Make the changes necessary there.
Run make kernel-deb again and it will recompile the dtb/dtsi files
Under build/images/debs/<fenix version>/VIM3/ a set of .deb packages should be prepared, Copy linux-dtb-amlogic-5.15-<fenix version>_arm64.dtb file to your VIM3 and install it with dpkg -i linux-dtb-amlogic-5.15-<fenix version>_arm64.dtb
Currently as of writing, Fenix version is 1.7.2, but as time progress it will be updated.
make sure you have updated your board to the latest firmware version by following this guide