From patchwork Fri Sep 6 09:36:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junhao Xie X-Patchwork-Id: 13793840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A8B0CE7AFB for ; Fri, 6 Sep 2024 09:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=m8dxvhMC6YUlGGu5mJJ8C2gZHWhyqRgNP3I24IzqQ6g=; b=bCMQPmLmF52Vos28fpfS+xIyln 0e4Xy6LaHNgzzXAKIffXjOd/TfHOj3sR3JBKCQcoV4kCQzIOPa+Y001tw3YU7NQCI6aPy78omdTEr 6X3crdVA8Qz6xc7ek1xaQJgYSW1IsQiMVJ/tM9ZQ4qfWZTCukpz+ZRXcLx65cLF4tXa8wkrFWSyax A5tgfg5OMn5C1Cvhm//AE98fXTWZ/q0La8/GvPLRu8s6sAQYdniO1afofUXziOsL0L6PuT92pYUoO mUOdSr4Wjn5v4bT4Hj57pBz6wbSLBPqxqlfs61w2bHgHifQUcz59fFWxsfzsKjicUXW88DNLlJ4nD LcQRgdAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smVf5-0000000BclS-0Eyt; Fri, 06 Sep 2024 09:53:51 +0000 Received: from [129.204.178.38] (helo=classfun.cn) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smVPt-0000000BXhM-1uPl; Fri, 06 Sep 2024 09:38:11 +0000 Received: from bigfoot-server-storage.classfun.cn (unknown [124.72.163.35]) (Authenticated sender: bigfoot) by classfun.cn (Postfix) with ESMTPSA id D5E1178A07; Fri, 6 Sep 2024 17:38:07 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.11.0 classfun.cn D5E1178A07 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=classfun.cn; s=default; t=1725615489; bh=m8dxvhMC6YUlGGu5mJJ8C2gZHWhyqRgNP3I24IzqQ6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PdJQYn8C9lujRQHKpzNHQWRkSJufh/rYtMcxEXrSrDhQlWv6WTC+c1RplrRJTOj68 duz7c/GpZ9/jV96+4ujkVJDe50TOzoK4X5G2NjLrutUj34ZhymWaKYU/mrvMLHfJMD Oj/TvaWE+gGs4Eilj+ylCKUtnudfd0IYu91ulLMg= From: Junhao Xie To: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Cc: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Pavel Machek , Lee Jones , Sebastian Reichel , Alexandre Belloni , Wim Van Sebroeck , Heiko Stuebner , Chukun Pan , Junhao Xie Subject: [PATCH 8/9] dt-bindings: Add documentation for Photonicat PMU Date: Fri, 6 Sep 2024 17:36:29 +0800 Message-ID: <20240906093630.2428329-9-bigfoot@classfun.cn> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906093630.2428329-1-bigfoot@classfun.cn> References: <20240906093630.2428329-1-bigfoot@classfun.cn> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_023809_733059_2B0835F4 X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add device tree binding documentation for Photonicat PMU MFD, LEDs, hardware monitor, power off, power supply, real-time clock watchdog. Signed-off-by: Junhao Xie --- .../hwmon/ariaboard,photonicat-pmu-hwmon.yaml | 40 +++++++ .../leds/ariaboard,photonicat-pmu-leds.yaml | 41 +++++++ .../mfd/ariaboard,photonicat-pmu.yaml | 107 ++++++++++++++++++ .../ariaboard,photonicat-pmu-poweroff.yaml | 34 ++++++ .../ariaboard,photonicat-pmu-supply.yaml | 55 +++++++++ .../rtc/ariaboard,photonicat-pmu-rtc.yaml | 37 ++++++ .../ariaboard,photonicat-pmu-watchdog.yaml | 37 ++++++ 7 files changed, 351 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/ariaboard,photonicat-pmu-hwmon.yaml create mode 100644 Documentation/devicetree/bindings/leds/ariaboard,photonicat-pmu-leds.yaml create mode 100644 Documentation/devicetree/bindings/mfd/ariaboard,photonicat-pmu.yaml create mode 100644 Documentation/devicetree/bindings/power/reset/ariaboard,photonicat-pmu-poweroff.yaml create mode 100644 Documentation/devicetree/bindings/power/supply/ariaboard,photonicat-pmu-supply.yaml create mode 100644 Documentation/devicetree/bindings/rtc/ariaboard,photonicat-pmu-rtc.yaml create mode 100644 Documentation/devicetree/bindings/watchdog/ariaboard,photonicat-pmu-watchdog.yaml diff --git a/Documentation/devicetree/bindings/hwmon/ariaboard,photonicat-pmu-hwmon.yaml b/Documentation/devicetree/bindings/hwmon/ariaboard,photonicat-pmu-hwmon.yaml new file mode 100644 index 000000000000..c9b1bab20c31 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ariaboard,photonicat-pmu-hwmon.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/ariaboard,photonicat-pmu-hwmon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Photonicat PMU Hardware Monitor + +maintainers: + - Junhao Xie + +description: + Board temperature sensor on the Photonicat PMU MCU + +properties: + compatible: + const: ariaboard,photonicat-pmu-hwmon + + label: + $ref: /schemas/types.yaml#/definitions/string + description: Label for hwmon device + +required: + - compatible + - label + +additionalProperties: false + +examples: + - | + serial { + mcu { + compatible = "ariaboard,photonicat-pmu"; + + hwmon { + compatible = "ariaboard,photonicat-pmu-hwmon"; + label = "pcat_board"; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/leds/ariaboard,photonicat-pmu-leds.yaml b/Documentation/devicetree/bindings/leds/ariaboard,photonicat-pmu-leds.yaml new file mode 100644 index 000000000000..6ccb0e691b09 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/ariaboard,photonicat-pmu-leds.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/ariaboard,photonicat-pmu-leds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Photonicat PMU LEDs + +maintainers: + - Junhao Xie + +description: + LEDs on the Photonicat PMU MCU + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: ariaboard,photonicat-pmu-leds + + label: true + +required: + - compatible + - label + +additionalProperties: false + +examples: + - | + serial { + mcu { + compatible = "ariaboard,photonicat-pmu"; + + leds-status { + compatible = "ariaboard,photonicat-pmu-leds"; + label = "net-status"; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/mfd/ariaboard,photonicat-pmu.yaml b/Documentation/devicetree/bindings/mfd/ariaboard,photonicat-pmu.yaml new file mode 100644 index 000000000000..df16d9507821 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ariaboard,photonicat-pmu.yaml @@ -0,0 +1,107 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/ariaboard,photonicat-pmu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ariaboard Photonicat PMU + +maintainers: + - Junhao Xie + +description: + Driver for the Power Management MCU in the Ariaboard Photonicat, + which provides battery and charger power supply, real-time clock, + watchdog, hardware shutdown. + +properties: + compatible: + const: ariaboard,photonicat-pmu + + current-speed: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 115200 + description: PMU Serial baudrate + + local-address: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 127 + default: 1 + description: CPU board address + + remote-address: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 127 + default: 1 + description: PMU board address + + hwmon: + $ref: /schemas/hwmon/ariaboard,photonicat-pmu-hwmon.yaml + + poweroff: + $ref: /schemas/power/reset/ariaboard,photonicat-pmu-poweroff.yaml + + rtc: + $ref: /schemas/rtc/ariaboard,photonicat-pmu-rtc.yaml + + watchdog: + $ref: /schemas/watchdog/ariaboard,photonicat-pmu-watchdog.yaml + +patternProperties: + '^leds-(status)': + $ref: /schemas/leds/ariaboard,photonicat-pmu-leds.yaml + + '^supply-(battery|charger)$': + $ref: /schemas/power/supply/ariaboard,photonicat-pmu-supply.yaml + +required: + - compatible + +additionalProperties: false + +examples: + - | + serial { + photonicat-pmu { + compatible = "ariaboard,photonicat-pmu"; + current-speed = <115200>; + local-address = <1>; + remote-address = <1>; + + supply-battery { + compatible = "ariaboard,photonicat-pmu-supply"; + label = "battery"; + type = "battery"; + }; + + supply-charger { + compatible = "ariaboard,photonicat-pmu-supply"; + label = "charger"; + type = "charger"; + }; + + hwmon { + compatible = "ariaboard,photonicat-pmu-hwmon"; + label = "pcat_board"; + }; + + leds-status { + compatible = "ariaboard,photonicat-pmu-leds"; + label = "net-status"; + }; + + poweroff { + compatible = "ariaboard,photonicat-pmu-poweroff"; + }; + + rtc { + compatible = "ariaboard,photonicat-pmu-rtc"; + }; + + watchdog { + compatible = "ariaboard,photonicat-pmu-watchdog"; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/power/reset/ariaboard,photonicat-pmu-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/ariaboard,photonicat-pmu-poweroff.yaml new file mode 100644 index 000000000000..cfb6c043aa8d --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/ariaboard,photonicat-pmu-poweroff.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/ariaboard,photonicat-pmu-poweroff.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Photonicat PMU Real-time clock + +maintainers: + - Junhao Xie + +description: + Poweroff on the Photonicat PMU MCU + +properties: + compatible: + const: ariaboard,photonicat-pmu-poweroff + +required: + - compatible + +additionalProperties: false + +examples: + - | + serial { + mcu { + compatible = "ariaboard,photonicat-pmu"; + + poweroff { + compatible = "ariaboard,photonicat-pmu-poweroff"; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/power/supply/ariaboard,photonicat-pmu-supply.yaml b/Documentation/devicetree/bindings/power/supply/ariaboard,photonicat-pmu-supply.yaml new file mode 100644 index 000000000000..73b1c3564c58 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/ariaboard,photonicat-pmu-supply.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/ariaboard,photonicat-pmu-supply.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Photonicat PMU Power supply + +maintainers: + - Junhao Xie + +description: + Power supply on the Photonicat PMU MCU + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + const: ariaboard,photonicat-pmu-supply + + label: + $ref: /schemas/types.yaml#/definitions/string + description: Label for power supply device + + type: + $ref: /schemas/types.yaml#/definitions/string + enum: + - battery + - charger + description: Photonicat power supply type + + power-supplies: true + monitored-battery: true + +required: + - compatible + - label + - type + +additionalProperties: false + +examples: + - | + serial { + mcu { + compatible = "ariaboard,photonicat-pmu"; + + supply-charger { + compatible = "ariaboard,photonicat-pmu-supply"; + label = "charger"; + type = "charger"; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/rtc/ariaboard,photonicat-pmu-rtc.yaml b/Documentation/devicetree/bindings/rtc/ariaboard,photonicat-pmu-rtc.yaml new file mode 100644 index 000000000000..05f3c3768dbf --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/ariaboard,photonicat-pmu-rtc.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/ariaboard,photonicat-pmu-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Photonicat PMU Real-time clock + +maintainers: + - Junhao Xie + +description: + Real-time clock on the Photonicat PMU MCU + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + const: ariaboard,photonicat-pmu-rtc + +required: + - compatible + +additionalProperties: false + +examples: + - | + serial { + mcu { + compatible = "ariaboard,photonicat-pmu"; + + rtc { + compatible = "ariaboard,photonicat-pmu-rtc"; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/watchdog/ariaboard,photonicat-pmu-watchdog.yaml b/Documentation/devicetree/bindings/watchdog/ariaboard,photonicat-pmu-watchdog.yaml new file mode 100644 index 000000000000..91bc6adea9a7 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/ariaboard,photonicat-pmu-watchdog.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/ariaboard,photonicat-pmu-watchdog.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Photonicat PMU Watchdog + +maintainers: + - Junhao Xie + +description: + Watchdog on the Photonicat PMU MCU + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + const: ariaboard,photonicat-pmu-watchdog + +required: + - compatible + +additionalProperties: false + +examples: + - | + serial { + mcu { + compatible = "ariaboard,photonicat-pmu"; + + watchdog { + compatible = "ariaboard,photonicat-pmu-watchdog"; + }; + }; + };