-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schemas: introduce assigned-clock-sscs #154
base: main
Are you sure you want to change the base?
Conversation
I am happy to see unified bindings but this makes me feel bitter of totally desynced work from Dario's. Three months iMX8 patchsets, multiple reviews and no single comment from you till January! https://lore.kernel.org/all/[email protected]/ So you saw his work. Why you didn't say that you intend to come with competitive solution? Nothing to stop him from doing work which you made now partially obsolete (the bindings part). NXP needs to be a bit more active in discussions. |
I should say sorry for this. I gave R-b for most of Dario's driver patches, so I agree with his approach and I also plan to reuse his appoarch for i.MX93/i.MX91 after his patch get landed. I not intend to waste your and Dario's time. But I got a request to enable SSC for i.MX95 based SCMI CLK just three days ago, and then I started to investigate how to enable that. Since drivers/clk/clk-scmi.c is a generic clk driver, and scmi nodes mostly only has a reg property, so impossible to add non generic property(SCMI Maintainers not happy to include other properties, especially vendor specific stuff), so I think "assigned-clock-sscs" may help here. Then I wrote the patches in two days and posted out for comments. |
Commit 223d32eb1001 ("dt-bindings: clock: st,stm32-rcc: support spread spectrum clocking") use "st,ssc-moddepth-permyriad" (in permyriad, i.e. 0.01%) while commit 4a8bc2644ef0 ("dt-bindings: ti: dpll: add spread spectrum support") use "ti,ssc-deltam" in permille unit (10th of a percent). What about change the "The modulation percentage" in "The modulation depth", expressed in permyriad? We use a 32 bit value, so we can express it as 0.01%. |
It should be fine to change to modulation depth in permyriad |
Why not put this in a clock cell for the clock? Or carve out some bits on the existing cell? How many bits are really needed here? How is the setting determined? Is it per board? per SoC? Fixed for the consumer of the clock? |
32 bits for i.MX95. Put this in a clock cell maybe not good or carve out some bits on the existing cell. This would change clock xlate saying break ABI.
The settings are tuned by measuring using oscilloscope or else. It is per board. Spread spectrum is mostly for reduce the radiated emissions of digital yes, fixed for consumer of the clock. Some references: |
To support spread spectrum clock, introduce assigned-clock-sscs Signed-off-by: Peng Fan <[email protected]>
Why not good exactly?
How would it break? Old implementation should ignore trailing arguments. Are you saying it does not ignore them? |
The SSC needs three fields for each clock, using one u32 or three u32. we could not carve out 32bits from a u32 clock entry, saying clocks = <&provider 5>. There is not enough bits for SSC. Current bindings for clocks in linux kernel per my search, Putting SSC in a cell would means adding extra three u32 or one u32, this would make it a bit hard to read.
Taking current i.MX8M/iMX93 for example, SSC not supported in upstream linux as of now. Adding trailing arguments means clock provider needs update to parse the new arg and each clocks entry needs update to add new arguments to encoding SSC. For other platforms(already in tree) that would need to support SSC, similar change should be done. Not only Linux, but also other OSes that follow dt-schema. Using assigned-clock-sscs could save a lot work for people. |
To support spread spectrum clock, introduce assigned-clock-sscs, it is an uint32-matrix with format multiple elements of below
, <...>