Skip to contentSkip to conversation

ARM: ux500: fix I2C4 clock bit

PATCH New Linus Walleij 2 participants 3 messages Oct 18, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 ARM: ux500: fix I2C4 clock bit

The PCLK for I2C4 is controlled by bit 10 in the PCKEN registers while the KCLK is controlled by bit 9 on the KCKEN, it's one of these odd assymetric things. Correct the PCLK bit to 10.

---
 arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +1 -1
index 5112f4c..b7d1738 100644
@@ -694,7 +694,7 @@
 
 			clock-frequency = <400000>;
 
-			clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 9>;
+			clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 9>;
 			clock-names = "i2cclk", "apb_pclk";
 		};
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 4/5 ARM: ux500: fix I2C4 clock bit

Quoted 15 lines · Linus Walleij

The PCLK for I2C4 is controlled by bit 10 in the PCKEN registers while the KCLK is controlled by bit 9 on the KCKEN, it's one of these odd assymetric things. Correct the PCLK bit to 10.

---
 arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +0 -0
index 5112f4c..b7d1738 100644

arch/arm/boot/dts/ste-dbx5x0.dtsi line 700

Quoted 8 lines
arch/arm/boot/dts/ste-dbx5x0.dtsi +1 -1
@@ -694,7 +694,7 @@
 
 			clock-frequency = <400000>;
 
-			clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 9>;
+			clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 9>;
 			clock-names = "i2cclk", "apb_pclk";
 		};
 

NACK: Bit 10 is MSP1

        clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
                        clkrst1_base, BIT(9), CLK_SET_RATE_GATE);
        clk_register_clkdev(clk, NULL, "nmk-i2c.4");
        PRCC_KCLK_STORE(clk, 1, 9);
 
        clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
                        clkrst1_base, BIT(10), CLK_SET_RATE_GATE);
        clk_register_clkdev(clk, NULL, "msp3");
        clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3");
        PRCC_KCLK_STORE(clk, 1, 10);
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw

PATCH 4/5 ARM: ux500: fix I2C4 clock bit

Quoted 20 lines · Lee Jones
Quoted 18 lines · Linus Walleij

The PCLK for I2C4 is controlled by bit 10 in the PCKEN registers while the KCLK is controlled by bit 9 on the KCKEN, it's one of these odd assymetric things. Correct the PCLK bit to 10.

---
 arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +0 -0
index 5112f4c..b7d1738 100644
@@ -694,7 +694,7 @@
 
                      clock-frequency = <400000>;
 
Quoted 7 lines

arch/arm/boot/dts/ste-dbx5x0.dtsi line 700

Quoted 5 lines
arch/arm/boot/dts/ste-dbx5x0.dtsi +1 -1
-                     clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 9>;
+                     clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 9>;
                      clock-names = "i2cclk", "apb_pclk";
              };
 

NACK: Bit 10 is MSP1

You mean MSP3?

Quoted 10 lines
        clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
                        clkrst1_base, BIT(9), CLK_SET_RATE_GATE);
        clk_register_clkdev(clk, NULL, "nmk-i2c.4");
        PRCC_KCLK_STORE(clk, 1, 9);

        clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
                        clkrst1_base, BIT(10), CLK_SET_RATE_GATE);
        clk_register_clkdev(clk, NULL, "msp3");
        clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3");
        PRCC_KCLK_STORE(clk, 1, 10);

This does not correspond to the datasheet, which says MSP3 is at bit 11. Oh that is *another* assymetric thing.

I'll make a combined
patch that fix both things and double-check with the older clock framework so we get this 100% right.

Ulf: any hints?

Yours,
Linus Walleij