From: Jan von Wiarda <jan.vonwia...@emtrion.de>

By using fixed clocks in the inmates' dts we avoid that the Linux inmate crashes
when accessing the Clock Pulse Generator. This way we get rid of the Kernel 
changes
we were using so far.
---
 configs/dts/inmate-emtrion-emconrzg1e.dts | 25 +++++++++++++++++++++++++
 configs/dts/inmate-emtrion-emconrzg1m.dts | 25 +++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/configs/dts/inmate-emtrion-emconrzg1e.dts 
b/configs/dts/inmate-emtrion-emconrzg1e.dts
index 7b2e99a..05b8ca0 100644
--- a/configs/dts/inmate-emtrion-emconrzg1e.dts
+++ b/configs/dts/inmate-emtrion-emconrzg1e.dts
@@ -134,12 +134,35 @@
                };
        };
 
+       clocks {
+               scif4_clk: scif4_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency  = <65000000>;
+                       clock-output-names = "scif4_clk";
+               };
+               sdhi0_clk: sdhi0_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency  = <195000000>;
+                       clock-output-names = "sdhi0_clk";
+               };
+               i2c2_clk: i2c2_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency  = <100000>;
+                       clock-output-names = "i2c2_clk";
+               };
+       };
+
        scif4: serial@e6ee0000 {
                compatible = "renesas,scif-r8a7745", "renesas,scif";
                reg = <0 0xe6ee0000 0 0x40>;
                interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
                status = "okay";
+               clocks = <&scif4_clk 0>;
+               clock-names = "peripheral_clk";
                pinctrl-0 = <0x12>;
                pinctrl-names = "default";
        };
@@ -150,6 +173,7 @@
                interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
                status = "okay";
+               clocks = <&sdhi0_clk 0>;
                vmmc-supply = <&vcc_sdhi0>;
                vqmmc-supply = <&vccq_sdhi0>;
        };
@@ -159,6 +183,7 @@
                reg = <0 0xe6530000 0 0x40>;
                interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
+               clocks = <&i2c2_clk 0>;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
diff --git a/configs/dts/inmate-emtrion-emconrzg1m.dts 
b/configs/dts/inmate-emtrion-emconrzg1m.dts
index c817740..035331c 100644
--- a/configs/dts/inmate-emtrion-emconrzg1m.dts
+++ b/configs/dts/inmate-emtrion-emconrzg1m.dts
@@ -135,12 +135,35 @@
                };
        };
 
+       clocks {
+               scif4_clk: scif4_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency  = <65000000>;
+                       clock-output-names = "scif4_clk";
+               };
+               sdhi0_clk: sdhi0_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency  = <195000000>;
+                       clock-output-names = "sdhi0_clk";
+               };
+               i2c2_clk: i2c2_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency  = <100000>;
+                       clock-output-names = "i2c2_clk";
+               };
+       };
+
        scif4: serial@e6ee0000 {
                compatible = "renesas,scif-r8a7743", "renesas,scif";
                reg = <0 0xe6ee0000 0 0x40>;
                interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
                status = "okay";
+               clocks = <&scif4_clk 0>;
+               clock-names = "peripheral_clk";
                pinctrl-0 = <0x12>;
                pinctrl-names = "default";
        };
@@ -151,6 +174,7 @@
                interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
                status = "okay";
+               clocks = <&sdhi0_clk 0>;
                vmmc-supply = <&vcc_sdhi0>;
                vqmmc-supply = <&vccq_sdhi0>;
        };
@@ -160,6 +184,7 @@
                reg = <0 0xe6530000 0 0x40>;
                interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+               clocks = <&i2c2_clk 0>;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
-- 
2.11.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to