Hi guys,
I'm currently trying to set up a custom DT overlay that should enable GPCLK0 at GPIO 20 (alongside other functions). However, I'm currently struggling with the way the GPIO ALT functions are selected for the new RP1.
I used target = <&rp1_gpio> instead of @gpio, considering the new RP1 chip.
AFAIK, previously the brcm,function = <>; syntax was:But by probing using pinctrl, I found out that it follows:Where I couldn't find a number for ALT4 up to ALT8
What would be the correct syntax or workflow for dt overlays on the new RP5 ?
Below my dt sniplet
I'm currently trying to set up a custom DT overlay that should enable GPCLK0 at GPIO 20 (alongside other functions). However, I'm currently struggling with the way the GPIO ALT functions are selected for the new RP1.
I used target = <&rp1_gpio> instead of @gpio, considering the new RP1 chip.
AFAIK, previously the brcm,function = <>; syntax was:
Code:
//0: GPIO in//1: GPIO out//2: alt5//3: alt4//4: alt0//5: alt1//6: alt2//7: alt3
Code:
//0: GPIO in//1: GPIO out//2: alt3//3: alt0//4: alt2//5: none//6: alt1//7: none
What would be the correct syntax or workflow for dt overlays on the new RP5 ?
Below my dt sniplet
Code:
/dts-v1/;/plugin/;/ { compatible = "brcm,bcm2712"; // General GPIO Configuration fragment@0 { target = <&rp1_gpio>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&button_pins &enable_pin &power_ok_pin &trigger_clk_photo &read_clk_photo >; / // GPIO pins for pushbuttons configuration button_pins: button_pins { brcm,pins = <19 26 21>; // Define GPIO pins 19, 26, 21 for buttons brcm,function = <0>; // Set to input function brcm,pull = <0>; // no pulls }; // GPIO pin for the buck converter enable pin configuration enable_pin: enable_pin { brcm,pins = <14>; // brcm,function = <0>; // Set GPIO 14 to input function brcm,pull = <0>; // }; // GPIO pin for the buck converter power ok pin configuration power_ok_pin: power_ok_pin { brcm,pins = <15>; // brcm,function = <0>; // Set GPIO 15 to input function brcm,pull = <0>; // };trigger_clk_photo: trigger_clk_photo { brcm,pins = <20>; brcm,function = <2>; // Set GPIO 20 to fuction 2 -> ALT 3 CPCLK0 brcm,pull = <0>; // No pull-up or pull-down };read_clk_photo: read_clk_photo { brcm,pins = <18>; brcm,function = <0>; // Set GPIO 18 to inputbrcm,pull = <0>; // No pull-up or pull-down }; }; };
Statistics: Posted by adun — Wed Jul 17, 2024 10:50 am