gpio clock-names
Subsystems (3)
cover gpio clock-names
Add 'clock-names' for gpio dt nodes.
Jianqun Xu (2):
dt-bindings: gpio: rockchip: add clock-names
arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes
.../devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 6 ++++++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 5 +++++ 2 files changed, 11 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/2 dt-bindings: gpio: rockchip: add clock-names
Add 'clock-names' to the gpio dt node. so the driver could get clocks by a const char id, this patch names the clock-names as
- 'bus': the apb clock for cpu to access the gpio controller
- 'db': the debounce clock for cpu to set debounce clock rate
Since the old dt nodes may have no clock-names, this patch not make them as part of 'required properties'.
--- .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml +6 -0
@@ -27,6 +27,12 @@ properties: - description: APB interface clock source - description: GPIO debounce reference clock source + clock-names: + minItems: 1 + items: + - const: bus + - const: db + gpio-ranges: true gpio-controller: true
Signature · 1 line
2.25.1
Re: [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
Quoted 9 lines · Jianqun Xu
Add 'clock-names' to the gpio dt node. so the driver could get clocks by a const char id, this patch names the clock-names as
- 'bus': the apb clock for cpu to access the gpio controller
- 'db': the debounce clock for cpu to set debounce clock rateSince the old dt nodes may have no clock-names, this patch not make them as part of 'required properties'.
Signed-off-by Jianqun Xu <[email protected]>
I see this patch sent three times... version your patches.
Best regards,
Krzysztof
PATCH 2/2 arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes
In reply to Jianqun XuAdd 'clock-names' for gpio nodes on rk356x SoCs, after this patch, the gpio driver can get the clocks by a const char id, 'bus' for apb clock and 'db' for the debounce clock.
--- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +5 -0
@@ -1650,6 +1650,7 @@ gpio0: gpio@fdd60000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfdd60000 0x0 0x100>; interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "bus", "db"; clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>; gpio-controller; #gpio-cells = <2>;
@@ -1661,6 +1662,7 @@ gpio1: gpio@fe740000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe740000 0x0 0x100>; interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "bus", "db"; clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>; gpio-controller; #gpio-cells = <2>;
@@ -1672,6 +1674,7 @@ gpio2: gpio@fe750000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe750000 0x0 0x100>; interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "bus", "db"; clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>; gpio-controller; #gpio-cells = <2>;
@@ -1683,6 +1686,7 @@ gpio3: gpio@fe760000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe760000 0x0 0x100>; interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "bus", "db"; clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>; gpio-controller; #gpio-cells = <2>;
@@ -1694,6 +1698,7 @@ gpio4: gpio@fe770000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe770000 0x0 0x100>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "bus", "db"; clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>; gpio-controller; #gpio-cells = <2>;
Signature · 1 line
2.25.1