Title: Enable internal GPIO pull-up in DTS [Print This Page] Author: ivan.p Time: 5 hour before Title: Enable internal GPIO pull-up in DTS Last edited by ivan.p In 11/7/2024 07:44 Editor
Hi!
What is the right way to enable internal pull-up, with the ability to read the pin value after the system starts?
We need to use a configuration jumpers to dustinguish between device revisions.
The idea is:
* The internal pin pull-up is enabled
* The pin value is read
* The pins which have a jumper connected to the ground will have a value of 0, others - a value of 1.
We have tried to modify the Device Tree creating a device node (sorry, have not find a way to properly format the dts fragment)
/ {
board-id {
compatible = "firefly-gpio";
//compatible = "firefly,rk3308-gpio";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&board_id_pin0>;
firefly-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
};
};