Skip to content

Commit d9b9e12

Browse files
erwangocarlescufi
authored andcommitted
dts/bindings/clocks: stm32: 'clock-names' optional for source clock setting
Since implementation of clock source selection in consumer device drivers could be achieved without usage of a clock-names property and no example of usage is provided up to now, remove this property from existing examples. Additionally, make it clear in stm32 clock control binding that it is driver's responsibility to correctly access clock source information and use it as required. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent ac61ea9 commit d9b9e12

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

dts/bindings/clock/st,stm32-rcc.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ description: |
3737
the bus controlling the peripheral and the second index specifies the bit used to
3838
control the peripheral clock in that bus register.
3939
40+
Specifying an alternate clock source:
41+
42+
Specifying an alternate source clock could be done by adding a clock specifier to the
43+
clock property:
44+
... {
45+
...
46+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000020>,
47+
<&rcc STM32_SRC_HSI I2C1_SEL(2)>;
48+
...
49+
}
50+
In this example I2C1 device is assigned HSI as clock source.
51+
It is device driver's responsibility to querry and use clock source information in
52+
accordance with clock_control API specifications.
53+
4054
compatible: "st,stm32-rcc"
4155

4256
include: [clock-controller.yaml, base.yaml]

tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/boards/spi1_per_ck_d1ppre_1.overlay

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
/delete-property/ clocks;
2424
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
2525
<&rcc STM32_SRC_CKPER SPI123_SEL(4)>;
26-
clock-names = "reg", "kernel";
2726
status = "okay";
2827
};

tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/boards/spi1_per_ck_hsi.overlay

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
/delete-property/ clocks;
2424
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
2525
<&rcc STM32_SRC_CKPER SPI123_SEL(4)>;
26-
clock-names = "reg", "kernel";
2726
status = "okay";
2827
};

tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/boards/spi1_pll3p_1_d1ppre_4.overlay

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@
2626
/delete-property/ clocks;
2727
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
2828
<&rcc STM32_SRC_PLL3_P SPI123_SEL(2)>;
29-
clock-names = "reg", "kernel";
3029
status = "okay";
3130
};

tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/boards/spi1_pllq_1_d1ppre_1.overlay

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
/delete-property/ clocks;
2424
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
2525
<&rcc STM32_SRC_PLL1_Q SPI123_SEL(0)>;
26-
clock-names = "reg", "kernel";
2726
status = "okay";
2827
};

tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/boards/spi1_pllq_2_d1ppre_4.overlay

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@
2828
&spi1 {
2929
/delete-property/ clocks;
3030
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>;
31-
clock-names = "reg";
3231
status = "okay";
3332
};

tests/drivers/spi/spi_loopback/boards/nucleo_h723zg.overlay

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@
1515
/delete-property/ clocks;
1616
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
1717
<&rcc STM32_SRC_PLL1_Q SPI123_SEL(0)>;
18-
clock-names = "reg", "kernel";
1918
};

0 commit comments

Comments
 (0)