Re: DT overlay syntax question
Vincent DEFERT <[email protected]> Sun, 20 Jul 2025 14:28:27 +0000
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
Thank you, I'll have a close look at this. On 20/07/2025 15:00, Robert Swindells wrote: > Vincent DEFERT <[email protected]> wrote: >> I'm trying to create overlays for optional functionalities on my ODROID C2. >> It works well for I2C and UART, but not for PWM, I get a syntax error >> when defining clocks. >> >> The overlay source is: >> >> /dts-v1/; >> /plugin/; >> >> / { >> /* >> * Enable PWM A. >> * Uses GPIOX.BIT6 on GPIO connector pin 33. >> */ >> pwm_ab { >> status = "okay"; >> pinctrl-0 = <&pwm_a_x_pins>; >> pinctrl-names = "default"; >> clocks = <&xtal>, <&clkc CLKID_VID_PLL>, <&clkc >> CLKID_FCLK_DIV4>, <&clkc CLKID_FCLK_DIV3>; >> clock-names = "xtal", "vid_pll", "fclk_div4", "fclk_div3"; >> }; >> }; > I don't think that is what you want to have in the device tree for > clocks. > > Other nodes that define clocks are doing that because they all need > to be enabled for the device to work, our clock controller driver then > takes care of how the clock tree needs to be setup for this to happen, > you just want to pick one of them for the input to the pwm device. > > Other uses of overlays are for specific tasks, I think I would expect an > overlay that setup a PWM device to define which clock it wants to use. > > There also isn't a definition for VID_PLL in mesongxbb_clkc.[ch] yet, if > that is the clock you need, I'm guessing that the meson clock code > didn't get updated when we last did a device tree source update.