ARM: dts: Configure omap4 rng to probe with ti-sysc
authorTony Lindgren <tony@atomide.com>
Thu, 12 Dec 2019 17:46:11 +0000 (09:46 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 23 Jan 2020 16:23:26 +0000 (08:23 -0800)
Add RNG interconnect data for omap4 similar to what dra7 has. The
clock is OMAP4_CM_L4SEC_RNG_CLKCTRL_OFFSET at offset address 0x01c0,
which matches what dra7 also has with DRA7_L4SEC_CLKCTRL_INDEX(0x1c0).

Note that we need to also add the related l4_secure clock entries.
I've only added RNG, the others can be added as they get tested.
They are probably very similar to what we already have for dra7
in dra7_l4sec_clkctrl_regs[].

With the clock tagged CLKF_SOC_NONSEC, clock is set disabled for secure
devices and clk_get() will fail. Additionally we disable the RNG target
module on droid4 to avoid introducing new boot time warnings.

Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/motorola-mapphone-common.dtsi
arch/arm/boot/dts/omap4-l4.dtsi

index da6b107da84a4e5bc6ad2f59f0ad1b186f863f16..71e7ea903eb598cf068cf63bd59b77fe85138cef 100644 (file)
        };
 };
 
+/* RNG is used by secure mode and not accessible */
+&rng_target {
+       status = "disabled";
+};
+
 /* Configure pwm clock source for timers 8 & 9 */
 &timer8 {
        assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
index 83f803be8ee2f914cb40b49ec75002beecf93c0b..e8fa3f389f2576fefb6dd49af0e23bf07e1a78ae 100644 (file)
                        };
                };
 
-               target-module@90000 {                   /* 0x48090000, ap 57 2a.0 */
-                       compatible = "ti,sysc";
-                       status = "disabled";
+               rng_target: target-module@90000 {       /* 0x48090000, ap 57 2a.0 */
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x91fe0 0x4>,
+                             <0x91fe4 0x4>;
+                       reg-names = "rev", "sysc";
+                       ti,sysc-mask = <(SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>;
+                       /* Domains (P, C): l4per_pwrdm, l4_secure_clkdm */
+                       clocks = <&l4_secure_clkctrl OMAP4_RNG_CLKCTRL 0>;
+                       clock-names = "fck";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges = <0x0 0x90000 0x2000>;
+
+                       rng: rng@0 {
+                               compatible = "ti,omap4-rng";
+                               reg = <0x0 0x2000>;
+                               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+                       };
                };
 
                target-module@96000 {                   /* 0x48096000, ap 37 26.0 */