From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx> The VBATTB IP of the Renesas RZ/G3S SoC controls the clock for RTC, the tamper detector and a small general usage memory of 128B. Add documentation for it. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx> --- Changes in v2: - changed file name and compatible - updated title, description sections - added clock controller part documentation and drop dedicated file for it included in v1 - used items to describe interrupts, interrupt-names, clocks, clock-names, resets - dropped node labels and status - updated clock-names for clock controller to cope with the new logic on detecting the necessity to setup bypass .../mfd/renesas,r9a08g045-vbattb.yaml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/renesas,r9a08g045-vbattb.yaml diff --git a/Documentation/devicetree/bindings/mfd/renesas,r9a08g045-vbattb.yaml b/Documentation/devicetree/bindings/mfd/renesas,r9a08g045-vbattb.yaml new file mode 100644 index 000000000000..30e4da65e2f6 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/renesas,r9a08g045-vbattb.yaml @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/renesas,r9a08g045-vbattb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas Battery Backup Function (VBATTB) + +description: + Renesas VBATTB is an always on powered module (backed by battery) which + controls the RTC clock (VBATTCLK), tamper detection logic and a small + general usage memory (128B). + +maintainers: + - Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx> + +properties: + compatible: + const: renesas,r9a08g045-vbattb + + reg: + maxItems: 1 + + ranges: true + + interrupts: + items: + - description: tamper detector interrupt + + interrupt-names: + items: + - const: tampdi + + clocks: + items: + - description: VBATTB module clock + + clock-names: + items: + - const: bclk + + power-domains: + maxItems: 1 + + resets: + items: + - description: VBATTB module reset + + '#address-cells': + const: 2 + + '#size-cells': + const: 2 + +patternProperties: + "^clock-controller@1c+$": + type: object + description: VBATTCLK clock + + properties: + compatible: + const: renesas,r9a08g045-vbattb-clk + + reg: + maxItems: 1 + + clocks: + items: + - description: input clock for VBATTCLK + + clock-names: + description: | + Use xin if connected to an external crystal oscillator. + Use clkin if connected to an external hardware device generating the + clock. + enum: + - xin + - clkin + + '#clock-cells': + const: 0 + + renesas,vbattb-load-nanofarads: + description: load capacitance of the on board xtal + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 4000, 7000, 9000, 12500 ] + + required: + - compatible + - reg + - clocks + - clock-names + - '#clock-cells' + - renesas,vbattb-load-nanofarads + + additionalProperties: false + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - power-domains + - resets + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/r9a08g045-cpg.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + vbattb@1005c000 { + compatible = "renesas,r9a08g045-vbattb"; + reg = <0x1005c000 0x1000>; + ranges = <0 0 0x1005c000 0 0x1000>; + interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tampdi"; + clocks = <&cpg CPG_MOD R9A08G045_VBAT_BCLK>; + clock-names = "bclk"; + power-domains = <&cpg>; + resets = <&cpg R9A08G045_VBAT_BRESETN>; + #address-cells = <2>; + #size-cells = <2>; + + clock-controller@1c { + compatible = "renesas,r9a08g045-vbattb-clk"; + reg = <0 0x1c 0 0x10>; + clocks = <&vbattb_xtal>; + clock-names = "xin"; + #clock-cells = <0>; + renesas,vbattb-load-nanofarads = <12500>; + }; + }; -- 2.39.2