This is a cache of https://discuss.96boards.org/t/how-to-configure-a-general-purpose-clock-gp-clkxx/2025. It is a snapshot of the page at 2024-10-04T05:53:48.599+0000.
How to configure a general purpose clock (GP_CLKxx)? - DragonBoard410c - 96Boards Forum

How to configure a general purpose clock (GP_CLKxx)?

How does one configure one of the general purpose clocks mentioned in section 2.2.1.1 of the Snapdragon Device Specification document? That text states one must select a clock source, program a desired division ratio, and program a duty cycle. Where does one input this data?

Registers?
Device Tree?
C/C++ program that imports a library?
Some PWM driver or other type of driver?

If any sample configuration exists, that would help me a lot.

Ultimately, I want to put a pwm signal on GP_CLK2A (gpio50).

Thanks.

I will be interested in the answer of this question as I was facing the similar situation. I feel that due to the absence of ADC the analog signal on a snapdragon gpio couldn’t be converted to a digital output. I will be very happy to see any positive responses.