diff options
Diffstat (limited to 'sys/contrib/device-tree/Bindings/power/reset')
9 files changed, 187 insertions, 46 deletions
diff --git a/sys/contrib/device-tree/Bindings/power/reset/apple,smc-reboot.yaml b/sys/contrib/device-tree/Bindings/power/reset/apple,smc-reboot.yaml new file mode 100644 index 000000000000..ce5ed88493cd --- /dev/null +++ b/sys/contrib/device-tree/Bindings/power/reset/apple,smc-reboot.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/apple,smc-reboot.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple SMC Reboot Controller + +description: + The Apple System Management Controller (SMC) provides reboot functionality + on Apple Silicon SoCs. It uses NVMEM cells to store and track various + system state information related to boot, shutdown, and panic events. + +maintainers: + - Sven Peter <sven@kernel.org> + +properties: + compatible: + const: apple,smc-reboot + + nvmem-cells: + items: + - description: Flag indicating shutdown (as opposed to reboot) + - description: Stage at which the boot process stopped (0x30 for normal boot) + - description: Counter for boot errors + - description: Counter for system panics + + nvmem-cell-names: + items: + - const: shutdown_flag + - const: boot_stage + - const: boot_error_count + - const: panic_count + +required: + - compatible + - nvmem-cells + - nvmem-cell-names + +additionalProperties: false diff --git a/sys/contrib/device-tree/Bindings/power/reset/atmel,sama5d2-shdwc.yaml b/sys/contrib/device-tree/Bindings/power/reset/atmel,sama5d2-shdwc.yaml index 8c58e12cdb60..9c34249b2d6d 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/atmel,sama5d2-shdwc.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/atmel,sama5d2-shdwc.yaml @@ -17,11 +17,19 @@ properties: compatible: oneOf: - items: + - enum: + - microchip,sama7d65-shdwc + - const: microchip,sama7g5-shdwc + - const: syscon + - items: - const: microchip,sama7g5-shdwc - const: syscon - enum: - atmel,sama5d2-shdwc - microchip,sam9x60-shdwc + - items: + - const: microchip,sam9x7-shdwc + - const: microchip,sam9x60-shdwc reg: maxItems: 1 diff --git a/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml b/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml index 627f8a6078c2..7f5f94673e9c 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml @@ -31,6 +31,10 @@ properties: allOf: - $ref: reboot-mode.yaml# +patternProperties: + "^mode-.*$": + maxItems: 1 + required: - compatible - nvmem-cells diff --git a/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml b/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml index fc8105a7b9b2..979a377cb4ff 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml @@ -54,6 +54,10 @@ required: - compatible - reg +patternProperties: + "^mode-.*$": + maxItems: 1 + unevaluatedProperties: false allOf: @@ -75,6 +79,9 @@ allOf: reg-names: items: - const: pon + else: + patternProperties: + "^mode-.*$": false # Special case for pm8941, which doesn't store reset mode - if: @@ -108,40 +115,40 @@ allOf: examples: - | - #include <dt-bindings/interrupt-controller/irq.h> - #include <dt-bindings/input/linux-event-codes.h> - #include <dt-bindings/spmi/spmi.h> - - spmi@c440000 { - reg = <0x0c440000 0x1100>; - #address-cells = <2>; - #size-cells = <0>; - - pmic@0 { - reg = <0x0 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pon@800 { - compatible = "qcom,pm8998-pon"; - reg = <0x800>; - - pwrkey { - compatible = "qcom,pm8941-pwrkey"; - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = <KEY_POWER>; - }; - - resin { - compatible = "qcom,pm8941-resin"; - interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = <KEY_VOLUMEDOWN>; - }; - }; - }; - }; + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/input/linux-event-codes.h> + #include <dt-bindings/spmi/spmi.h> + + spmi@c440000 { + reg = <0x0c440000 0x1100>; + #address-cells = <2>; + #size-cells = <0>; + + pmic@0 { + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pon@800 { + compatible = "qcom,pm8998-pon"; + reg = <0x800>; + + pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = <KEY_POWER>; + }; + + resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = <KEY_VOLUMEDOWN>; + }; + }; + }; + }; ... diff --git a/sys/contrib/device-tree/Bindings/power/reset/reboot-mode.yaml b/sys/contrib/device-tree/Bindings/power/reset/reboot-mode.yaml index ad0a0b95cec1..3ddac06cec72 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/reboot-mode.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/reboot-mode.yaml @@ -28,13 +28,13 @@ description: | properties: mode-normal: - $ref: /schemas/types.yaml#/definitions/uint32 + $ref: /schemas/types.yaml#/definitions/uint32-array description: Default value to set on a reboot if no command was provided. patternProperties: "^mode-.*$": - $ref: /schemas/types.yaml#/definitions/uint32 + $ref: /schemas/types.yaml#/definitions/uint32-array additionalProperties: true diff --git a/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml b/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml index b6acff199cde..79ffc78b23ea 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml @@ -32,6 +32,10 @@ properties: allOf: - $ref: reboot-mode.yaml# +patternProperties: + "^mode-.*$": + maxItems: 1 + unevaluatedProperties: false required: diff --git a/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot.yaml b/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot.yaml index 75061124d9a8..ccd555870094 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot.yaml @@ -21,7 +21,9 @@ description: |+ properties: compatible: - const: syscon-reboot + enum: + - syscon-reboot + - google,gs101-reboot mask: $ref: /schemas/types.yaml#/definitions/uint32 @@ -31,6 +33,10 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: Offset in the register map for the reboot register (in bytes). + reg: + maxItems: 1 + description: Base address and size for the reboot register. + regmap: $ref: /schemas/types.yaml#/definitions/phandle deprecated: true @@ -47,19 +53,35 @@ properties: required: - compatible - - offset additionalProperties: false allOf: - $ref: restart-handler.yaml# - if: - not: - required: - - mask + properties: + compatible: + contains: + const: google,gs101-reboot then: - required: - - value + properties: + mask: false + offset: false + reg: false + value: false + + else: + if: + not: + required: + - mask + then: + required: + - value + + oneOf: + - required: [offset] + - required: [reg] examples: - | @@ -69,3 +91,8 @@ examples: offset = <0x0>; mask = <0x1>; }; + + - | + reboot { + compatible = "google,gs101-reboot"; + }; diff --git a/sys/contrib/device-tree/Bindings/power/reset/toradex,smarc-ec.yaml b/sys/contrib/device-tree/Bindings/power/reset/toradex,smarc-ec.yaml new file mode 100644 index 000000000000..ffcd5f2c2bf6 --- /dev/null +++ b/sys/contrib/device-tree/Bindings/power/reset/toradex,smarc-ec.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/toradex,smarc-ec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Toradex Embedded Controller + +maintainers: + - Emanuele Ghidoli <emanuele.ghidoli@toradex.com> + - Francesco Dolcini <francesco.dolcini@toradex.com> + +description: | + The Toradex Embedded Controller (EC) is used on Toradex SMARC modules, + primarily to manage power and reset functionalities. + + The EC provides the following functions: + - Reads the SMARC POWER_BTN# and RESET_IN# signals and controls the PMIC accordingly. + - Controls the SoC boot mode signals based on the SMARC BOOT_SEL# and FORCE_RECOV# inputs. + - Manages the CARRIER_STDBY# signal in response to relevant SoC signals. + + The EC runs a small firmware, factory programmed into its internal flash, and communicates over I2C. + It allows software to control power-off and reset functionalities of the module. + +properties: + compatible: + items: + - enum: + - toradex,smarc-imx95-ec + - toradex,smarc-imx8mp-ec + - const: toradex,smarc-ec + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + reset-controller@28 { + compatible = "toradex,smarc-imx95-ec", "toradex,smarc-ec"; + reg = <0x28>; + }; + }; diff --git a/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml b/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml index 799831636194..079ad977b907 100644 --- a/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml +++ b/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml @@ -46,7 +46,6 @@ properties: required: - compatible - - interrupts additionalProperties: false |
