Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mailbox: qcom: Add clock-name optional property

When the APCS clock is registered (platform dependent), it retrieves
its parent names from hardcoded values in the driver.

The following commit allows the DT node to provide such clock names to
the platform data based clock driver therefore avoiding having to
explicitly embed those names in the clock driver source code.

Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lkml.kernel.org/r/20191125135910.679310-2-niklas.cassel@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Jorge Ramirez-Ortiz and committed by
Stephen Boyd
4316ec05 87ec9adc

+21 -3
+21 -3
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt
··· 21 21 Usage: required 22 22 Value type: <prop-encoded-array> 23 23 Definition: must specify the base address and size of the global block 24 + 24 25 - clocks: 25 - Usage: required if #clocks-cells property is present 26 - Value type: <phandle> 27 - Definition: phandle to the input PLL, which feeds the APCS mux/divider 26 + Usage: required if #clock-names property is present 27 + Value type: <phandle array> 28 + Definition: phandles to the two parent clocks of the clock driver. 28 29 29 30 - #mbox-cells: 30 31 Usage: required ··· 37 36 Value type: <u32> 38 37 Definition: as described in clock.txt, must be 0 39 38 39 + - clock-names: 40 + Usage: required if the platform data based clock driver needs to 41 + retrieve the parent clock names from device tree. 42 + This will requires two mandatory clocks to be defined. 43 + Value type: <string-array> 44 + Definition: must be "pll" and "aux" 40 45 41 46 = EXAMPLE 42 47 The following example describes the APCS HMSS found in MSM8996 and part of the ··· 73 66 reg = <0xb011000 0x1000>; 74 67 #mbox-cells = <1>; 75 68 clocks = <&a53pll>; 69 + #clock-cells = <0>; 70 + }; 71 + 72 + Below is another example of the APCS binding on QCS404 platforms: 73 + 74 + apcs_glb: mailbox@b011000 { 75 + compatible = "qcom,qcs404-apcs-apps-global", "syscon"; 76 + reg = <0x0b011000 0x1000>; 77 + #mbox-cells = <1>; 78 + clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>; 79 + clock-names = "pll", "aux"; 76 80 #clock-cells = <0>; 77 81 };