Skip to contentSkip to conversation

ARM: dts: r8a7791: Add GyroADC clock and device node

PATCH Superseded Marek Vasut 2 participants 3 messages Apr 20, 2017 – Apr 24, 2017 Device tree bindings

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: r8a7791: Add GyroADC clock and device node

Add node for the GyroADC block and it's associated clock.

Cc Geert Uytterhoeven <[email protected]>
Cc Simon Horman <[email protected]>

To: [email protected]
---
V2: - Drop the _clk suffix for ADC clock
- Drop if "if" clk

---
 arch/arm/boot/dts/r8a7791.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +11 -0
index 4d0c2ce59900..c5f3efc63861 100644
@@ -776,6 +776,15 @@
 		status = "disabled";
 	};
 
+	adc: adc@e6e54000 {
+		compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc";
+		reg = <0 0xe6e54000 0 64>;
+		clocks = <&mstp9_clks R8A7791_CLK_GYROADC>;
+		clock-names = "fck";
+		power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
 	scif2: serial@e6e58000 {
 		compatible = "renesas,scif-r8a7791", "renesas,rcar-gen2-scif",
 			     "renesas,scif";
@@ -1432,6 +1441,7 @@
 				 <&hp_clk>, <&hp_clk>;
 			#clock-cells = <1>;
 			clock-indices = <
+				R8A7791_CLK_GYROADC
 				R8A7791_CLK_GPIO7 R8A7791_CLK_GPIO6 R8A7791_CLK_GPIO5 R8A7791_CLK_GPIO4
 				R8A7791_CLK_GPIO3 R8A7791_CLK_GPIO2 R8A7791_CLK_GPIO1 R8A7791_CLK_GPIO0
 				R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5
@@ -1439,6 +1449,7 @@
 				R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
 			>;
 			clock-output-names =
+				"gyroadc",
 				"gpio7", "gpio6", "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
 				"rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
 				"i2c1", "i2c0";
Signature · 1 line
2.11.0
#1 lore raw

Hi Marek,

Quoted 8 lines · Marek Vasut

Add node for the GyroADC block and it's associated clock.

Cc Geert Uytterhoeven <[email protected]>
Cc Simon Horman <[email protected]>

To: [email protected]
---
V2: - Drop the _clk suffix for ADC clock

You mean, drop the whole ADC clock? ;-)

Quoted 26 lines

- Drop if "if" clk

---
 arch/arm/boot/dts/r8a7791.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +9 -0
index 4d0c2ce59900..c5f3efc63861 100644
@@ -776,6 +776,15 @@
                status = "disabled";
        };
 
+       adc: adc@e6e54000 {
+               compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc";
+               reg = <0 0xe6e54000 0 64>;
+               clocks = <&mstp9_clks R8A7791_CLK_GYROADC>;
+               clock-names = "fck";
+               power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+               status = "disabled";
+       };
+
        scif2: serial@e6e58000 {
                compatible = "renesas,scif-r8a7791", "renesas,rcar-gen2-scif",
                             "renesas,scif";

arch/arm/boot/dts/r8a7791.dtsi line 1441

Quoted 1 line
arch/arm/boot/dts/r8a7791.dtsi +0 -0
@@ -1432,6 +1441,7 @@
                                 <&hp_clk>, <&hp_clk>;

Missing addition of the parent clock for the newly added module clock, which is presumably <&p_clk> (sorry, wrote cp_clk before).

What freaky frequency does your GyroADC use? :-)

Quoted 7 lines
arch/arm/boot/dts/r8a7791.dtsi +1 -0
                        #clock-cells = <1>;
                        clock-indices = <
+                               R8A7791_CLK_GYROADC
                                R8A7791_CLK_GPIO7 R8A7791_CLK_GPIO6 R8A7791_CLK_GPIO5 R8A7791_CLK_GPIO4
                                R8A7791_CLK_GPIO3 R8A7791_CLK_GPIO2 R8A7791_CLK_GPIO1 R8A7791_CLK_GPIO0
                                R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5

arch/arm/boot/dts/r8a7791.dtsi line 1455

Quoted 7 lines
arch/arm/boot/dts/r8a7791.dtsi +1 -0
@@ -1439,6 +1449,7 @@
                                R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
                        >;
                        clock-output-names =
+                               "gyroadc",
                                "gpio7", "gpio6", "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
                                "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
                                "i2c1", "i2c0";

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 1 line · Geert Uytterhoeven

Hi Marek,

Hi!

Quoted 11 lines · Marek Vasut
Quoted 8 lines

Add node for the GyroADC block and it's associated clock.

Cc Geert Uytterhoeven <[email protected]>
Cc Simon Horman <[email protected]>

To: [email protected]
---
V2: - Drop the _clk suffix for ADC clock

You mean, drop the whole ADC clock? ;-)

Yes I do ...

Quoted 22 lines
Quoted 22 lines

- Drop if "if" clk

---
 arch/arm/boot/dts/r8a7791.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +9 -0
index 4d0c2ce59900..c5f3efc63861 100644
@@ -776,6 +776,15 @@
                status = "disabled";
        };
 
+       adc: adc@e6e54000 {
+               compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc";
+               reg = <0 0xe6e54000 0 64>;
+               clocks = <&mstp9_clks R8A7791_CLK_GYROADC>;
+               clock-names = "fck";
+               power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+               status = "disabled";
+       };
+
Quoted 8 lines

arch/arm/boot/dts/r8a7791.dtsi line 1441

Quoted 5 lines
arch/arm/boot/dts/r8a7791.dtsi +0 -0
        scif2: serial@e6e58000 {
                compatible = "renesas,scif-r8a7791", "renesas,rcar-gen2-scif",
                             "renesas,scif";
@@ -1432,6 +1441,7 @@
                                 <&hp_clk>, <&hp_clk>;

Missing addition of the parent clock for the newly added module clock, which is presumably <&p_clk> (sorry, wrote cp_clk before).

Fixed, syncing three fields is kinda weird :)

Quoted 1 line

What freaky frequency does your GyroADC use? :-)

65MHz, but that's block clock :)

Quoted 26 lines
Quoted 7 lines
arch/arm/boot/dts/r8a7791.dtsi +1 -0
                        #clock-cells = <1>;
                        clock-indices = <
+                               R8A7791_CLK_GYROADC
                                R8A7791_CLK_GPIO7 R8A7791_CLK_GPIO6 R8A7791_CLK_GPIO5 R8A7791_CLK_GPIO4
                                R8A7791_CLK_GPIO3 R8A7791_CLK_GPIO2 R8A7791_CLK_GPIO1 R8A7791_CLK_GPIO0
                                R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5

arch/arm/boot/dts/r8a7791.dtsi line 1455

Quoted 7 lines
arch/arm/boot/dts/r8a7791.dtsi +1 -0
@@ -1439,6 +1449,7 @@
                                R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
                        >;
                        clock-output-names =
+                               "gyroadc",
                                "gpio7", "gpio6", "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
                                "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
                                "i2c1", "i2c0";

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Signature · 2 lines
Best regards,
Marek Vasut