The clock controller within the TC9564 SoC is accessed via a PCI
endpoint bus through BAR 4 of the first embedded PCIe function.
A syscon node is created to provide access to a range of memory
that is used by the clock controller and shared with other devices.

Co-developed-by: Daniel Thompson <[email protected]>
Signed-off-by: Daniel Thompson <[email protected]>
Signed-off-by: Alex Elder <[email protected]>
---
v3: 
- What was formerly described as a "clock" node is now "clock-controller"
- Label for the 25 MHz input clock is added (new in this version)
- The clock-controller node is now a sub-device of the config syscon
- The config syscon is now (also) compatible with "simple-mfd"
- The clock-controller DTS node no longer defines a toshiba,config-syscon
  property, and the config syscon no longer requires a label
- The clock-controller now requires a (parent) clock property, which
  refers to the new 25 MHz clock

 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts 
b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
index b8d290eed2f38..e7601daf1bc5a 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
@@ -9,6 +9,7 @@
 #define PM7250B_SID 8
 #define PM7250B_SID1 9
 
+#include <dt-bindings/clock/toshiba,tc9564.h>
 #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
 #include <dt-bindings/iio/qcom,spmi-adc7-pm7325.h>
 #include <dt-bindings/leds/common.h>
@@ -891,7 +892,7 @@ pcie@0,0 {
                pinctrl-0 = <&tc9563_resx_n>;
                pinctrl-names = "default";
 
-               clock-25000000 {
+               tc9564_xo_board: clock-25000000 {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <25000000>;
@@ -967,7 +968,7 @@ dev@0,0 {
                                #size-cells = <2>;
                                ranges; /* This will be updated dynamically */
 
-                               pci-ep-bus@4 {
+                               pcie_s1b5d0f0_bar4_bus: pci-ep-bus@4 {
                                        compatible = "simple-bus";
                                        #address-cells = <1>;
                                        #size-cells = <1>;
@@ -995,6 +996,19 @@ pci-ep-bus@4 {
        };
 };
 
+&pcie_s1b5d0f0_bar4_bus {
+       syscon@0 {
+               compatible = "syscon", "simple-mfd";
+               reg = <0x0 0x2000>;
+
+               tc9564_clock0: clock-controller {
+                       compatible = "toshiba,tc9564-clock";
+                       clocks = <&tc9564_xo_board>;
+                       #clock-cells = <1>;
+               };
+       };
+};
+
 &pm7325_gpios {
        kypd_vol_up_n: kypd-vol-up-n-state {
                pins = "gpio6";
-- 
2.53.0


Reply via email to