Re: [PATCH v3 07/12] arm64: dts: renesas: r9a08g045: Add VBATTB node

Stephen Boyd
2024-09-03T19:48:05Z

Quoting Claudiu (2024-08-30 06:02:13)
> diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
> index 067a26a66c24..247fa80a4f53 100644
> --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi
> @@ -160,6 +160,18 @@ i2c3: i2c@10090c00 {
> status = "disabled";
> };
>
> + vbattb: vbattb@1005c000 {
> + compatible = "renesas,r9a08g045-vbattb";
> + reg = <0 0x1005c000 0 0x1000>;
> + interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD R9A08G045_VBAT_BCLK>, <&vbattb_xtal>;
> + clock-names = "bclk", "rtx";
> + #clock-cells = <1>;
> + power-domains = <&cpg>;
> + resets = <&cpg R9A08G045_VBAT_BRESETN>;
> + status = "disabled";
> + };
> +
> cpg: clock-controller@11010000 {
> compatible = "renesas,r9a08g045-cpg";
> reg = <0 0x11010000 0 0x10000>;
> @@ -425,4 +437,11 @@ timer {
> interrupt-names = "sec-phys", "phys", "virt", "hyp-phys",
> "hyp-virt";
> };
> +
> + vbattb_xtal: vbattb-xtal {

The node name should be something like clock-<frequency> but if the
frequency is different per-board then I don't know what should happen
here. Can you leave the vbattb_xtal phandle up above and then require
the node to be defined in the board with the proper frequency after the
dash?

> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + /* This value must be overridden by the board. */
> + clock-frequency = <0>;