From: Chris Morgan <macroalpha82@gmail.com> To: linux-pm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, sre@kernel.org, jon.lin@rock-chips.com, zyw@rock-chips.com, zhangqing@rock-chips.com, Chris Morgan <macromorgan@hotmail.com>, Maya Matuszczyk <maccraft123mc@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH 1/4 v7] dt-bindings: Add Rockchip rk817 battery charger support Date: Thu, 19 May 2022 11:45:30 -0500 [thread overview] Message-ID: <20220519164533.1961-2-macroalpha82@gmail.com> (raw) In-Reply-To: <20220519164533.1961-1-macroalpha82@gmail.com> From: Chris Morgan <macromorgan@hotmail.com> Create dt-binding documentation to document rk817 battery and charger usage. New device-tree properties have been added. - rockchip,resistor-sense-micro-ohms: The value in microohms of the sample resistor. - rockchip,sleep-enter-current-microamp: The value in microamps of the sleep enter current. - rockchip,sleep-filter-current: The value in microamps of the sleep filter current. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- Note that this patch requires the following commit (still pending): https://lore.kernel.org/linux-rockchip/20220519161731.1168-1-macroalpha82@gmail.com/ .../bindings/mfd/rockchip,rk817.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml index bfc1720adc43..d0dccb1aaf4c 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml @@ -117,6 +117,47 @@ properties: description: Describes if the microphone uses differential mode. + charger: + description: | + The child node for the charger to hold additional properties. If a + battery is not in use, this node can be omitted. + type: object + properties: + monitored-battery: + description: | + A phandle to a monitored battery node that contains a valid + value for: + charge-full-design-microamp-hours, + charge-term-current-microamp, + constant-charge-current-max-microamp, + constant-charge-voltage-max-microvolt, + voltage-max-design-microvolt, + voltage-min-design-microvolt, + and a valid ocv-capacity table. + + rockchip,resistor-sense-micro-ohms: + description: | + Value in microohms of the battery sense resistor. This value is + used by the driver to set the correct divisor value to translate + ADC readings into the proper units of measure. + enum: [10000, 20000] + + rockchip,sleep-enter-current-microamp: + description: | + Value in microamps of the sleep enter current for the charger. + Value is used by the driver to calibrate the relax threshold. + + rockchip,sleep-filter-current-microamp: + description: + Value in microamps of the sleep filter current for the charger. + Value is used by the driver to derive the sleep sample current. + + required: + - monitored-battery + - rockchip,resistor-sense-micro-ohms + - rockchip,sleep-enter-current-microamp + - rockchip,sleep-filter-current-microamp + allOf: - if: properties: @@ -323,6 +364,13 @@ examples: }; }; + rk817_charger: charger { + monitored-battery = <&battery>; + rockchip,resistor-sense-micro-ohms = <10000>; + rockchip,sleep-enter-current-microamp = <300000>; + rockchip,sleep-filter-current-microamp = <100000>; + }; + rk817_codec: codec { rockchip,mic-in-differential; }; -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Chris Morgan <macroalpha82@gmail.com> To: linux-pm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, sre@kernel.org, jon.lin@rock-chips.com, zyw@rock-chips.com, zhangqing@rock-chips.com, Chris Morgan <macromorgan@hotmail.com>, Maya Matuszczyk <maccraft123mc@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH 1/4 v7] dt-bindings: Add Rockchip rk817 battery charger support Date: Thu, 19 May 2022 11:45:30 -0500 [thread overview] Message-ID: <20220519164533.1961-2-macroalpha82@gmail.com> (raw) In-Reply-To: <20220519164533.1961-1-macroalpha82@gmail.com> From: Chris Morgan <macromorgan@hotmail.com> Create dt-binding documentation to document rk817 battery and charger usage. New device-tree properties have been added. - rockchip,resistor-sense-micro-ohms: The value in microohms of the sample resistor. - rockchip,sleep-enter-current-microamp: The value in microamps of the sleep enter current. - rockchip,sleep-filter-current: The value in microamps of the sleep filter current. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- Note that this patch requires the following commit (still pending): https://lore.kernel.org/linux-rockchip/20220519161731.1168-1-macroalpha82@gmail.com/ .../bindings/mfd/rockchip,rk817.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml index bfc1720adc43..d0dccb1aaf4c 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml @@ -117,6 +117,47 @@ properties: description: Describes if the microphone uses differential mode. + charger: + description: | + The child node for the charger to hold additional properties. If a + battery is not in use, this node can be omitted. + type: object + properties: + monitored-battery: + description: | + A phandle to a monitored battery node that contains a valid + value for: + charge-full-design-microamp-hours, + charge-term-current-microamp, + constant-charge-current-max-microamp, + constant-charge-voltage-max-microvolt, + voltage-max-design-microvolt, + voltage-min-design-microvolt, + and a valid ocv-capacity table. + + rockchip,resistor-sense-micro-ohms: + description: | + Value in microohms of the battery sense resistor. This value is + used by the driver to set the correct divisor value to translate + ADC readings into the proper units of measure. + enum: [10000, 20000] + + rockchip,sleep-enter-current-microamp: + description: | + Value in microamps of the sleep enter current for the charger. + Value is used by the driver to calibrate the relax threshold. + + rockchip,sleep-filter-current-microamp: + description: + Value in microamps of the sleep filter current for the charger. + Value is used by the driver to derive the sleep sample current. + + required: + - monitored-battery + - rockchip,resistor-sense-micro-ohms + - rockchip,sleep-enter-current-microamp + - rockchip,sleep-filter-current-microamp + allOf: - if: properties: @@ -323,6 +364,13 @@ examples: }; }; + rk817_charger: charger { + monitored-battery = <&battery>; + rockchip,resistor-sense-micro-ohms = <10000>; + rockchip,sleep-enter-current-microamp = <300000>; + rockchip,sleep-filter-current-microamp = <100000>; + }; + rk817_codec: codec { rockchip,mic-in-differential; }; -- 2.25.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2022-05-19 16:46 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-19 16:45 [PATCH 0/4 v7] power: supply: Add Support for RK817 Charger Chris Morgan 2022-05-19 16:45 ` Chris Morgan 2022-05-19 16:45 ` Chris Morgan [this message] 2022-05-19 16:45 ` [PATCH 1/4 v7] dt-bindings: Add Rockchip rk817 battery charger support Chris Morgan 2022-05-19 21:43 ` Rob Herring 2022-05-19 21:43 ` Rob Herring 2022-05-19 16:45 ` [PATCH 2/4 v7] mfd: " Chris Morgan 2022-05-19 16:45 ` Chris Morgan 2022-05-19 16:45 ` [PATCH 3/4 v7] power: supply: Add charger driver for Rockchip RK817 Chris Morgan 2022-05-19 16:45 ` Chris Morgan 2022-05-19 16:45 ` [PATCH 4/4 v7] arm64: dts: rockchip: add rk817 chg to Odroid Go Advance Chris Morgan 2022-05-19 16:45 ` Chris Morgan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220519164533.1961-2-macroalpha82@gmail.com \ --to=macroalpha82@gmail.com \ --cc=heiko@sntech.de \ --cc=jon.lin@rock-chips.com \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=krzysztof.kozlowski@linaro.org \ --cc=lee.jones@linaro.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=maccraft123mc@gmail.com \ --cc=macromorgan@hotmail.com \ --cc=robh+dt@kernel.org \ --cc=sre@kernel.org \ --cc=zhangqing@rock-chips.com \ --cc=zyw@rock-chips.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.