lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <692e70b4-d4c1-4b14-94f9-e612a23c43e7@gmail.com>
Date: Mon, 30 Sep 2024 13:13:04 +0300
From: Yassine Oudjana <yassine.oudjana@...il.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Sebastian Reichel <sre@...nel.org>, Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Andy Gross <agross@...nel.org>, Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Yassine Oudjana <y.oudjana@...tonmail.com>,
 Alejandro Tafalla <atafalla@...on.com>,
 Konrad Dybcio <konrad.dybcio@...ainline.org>, linux-pm@...r.kernel.org,
 linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
 phone-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/8] dt-bindings: power: supply: Add DT schema for
 Qualcomm SMBCHG

Coming back to this patch series after putting it on hold for too long.

On 30/11/2022 7:24 pm, Krzysztof Kozlowski wrote:
> On 08/08/2022 09:34, Yassine Oudjana wrote:
>> From: Yassine Oudjana <y.oudjana@...tonmail.com>
>>
> 
> 
>> +      See Documentation/devicetree/bindings/power/supply/battery.yaml
>> +
>> +  interrupts:
>> +    items:
>> +      - description: Charger error
>> +      - description: Charger inhibited
>> +      - description: Charger precharge safety timer timeout
>> +      - description: Charger charge safety timer timeout
>> +      - description: Charger pre to fast charging switch threshold reached
>> +      - description: Charger recharge threshold reached
>> +      - description: Charger taper threshold reached
> 
> After discussing with Dmitry, it's current design of the PMIC (parent
> device) so it's fine. We would need to make bigger refactoring of
> drivers and bindings to change it to match other typical MFD PMICs. In
> current state it's the only way to express device interrupts.
> 
> Two more comments below.
> 
>> +      - description: Charger charge termination threshold reached
>> +      - description: Battery hot
>> +      - description: Battery warm
>> +      - description: Battery cold
>> +      - description: Battery cool
>> +      - description: Battery overvoltage
>> +      - description: Battery low
>> +      - description: Battery missing
>> +      - description: Battery thermistor missing # unconfirmed
>> +      - description: USB input undervolt
>> +      - description: USB input overvolt
>> +      - description: USB input source detected
>> +      - description: OTG regulator failure
>> +      - description: OTG regulator overcurrent
>> +      - description: Automatic input current limiting done
>> +      - description: USB ID pin changed
>> +      - description: DC input undervolt
>> +      - description: DC input overvolt
>> +      - description: Power OK
>> +      - description: Temperature shutdown
>> +      - description: Watchdog timeout
>> +      - description: Flash failure
>> +      - description: OTST2 # unknown
>> +      - description: OTST3 # unknown
>> +
>> +  interrupt-names:
>> +    items:
>> +      - const: chg-error
>> +      - const: chg-inhibit
>> +      - const: chg-prechg-sft
>> +      - const: chg-complete-chg-sft
>> +      - const: chg-p2f-thr
>> +      - const: chg-rechg-thr
>> +      - const: chg-taper-thr
>> +      - const: chg-tcc-thr
>> +      - const: batt-hot
>> +      - const: batt-warm
>> +      - const: batt-cold
>> +      - const: batt-cool
>> +      - const: batt-ov
>> +      - const: batt-low
>> +      - const: batt-missing
>> +      - const: batt-term-missing
>> +      - const: usbin-uv
>> +      - const: usbin-ov
>> +      - const: usbin-src-det
>> +      - const: otg-fail
>> +      - const: otg-oc
>> +      - const: aicl-done
>> +      - const: usbid-change
>> +      - const: dcin-uv
>> +      - const: dcin-ov
>> +      - const: power-ok
>> +      - const: temp-shutdown
>> +      - const: wdog-timeout
>> +      - const: flash-fail
>> +      - const: otst2
>> +      - const: otst3
>> +
>> +  otg-vbus:
>> +    type: object
> 
> I think I did not comment about this one - this looks like regulator.yaml.

Correct. Will add reference.

> 
>> +
>> +    description:
>> +      OTG regulator subnode.
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - monitored-battery
>> +  - interrupts
>> +  - interrupt-names
>> +  - otg-vbus
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +
>> +    battery: battery {
>> +        compatible = "simple-battery";
>> +
>> +        charge-full-design-microamp-hours = <4070000>;
>> +        charge-term-current-microamp = <100000>;
>> +        voltage-min-design-microvolt = <3400000>;
>> +        voltage-max-design-microvolt = <4400000>;
>> +    };
>> +
>> +    pmic {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +
>> +        charger@...0 {
>> +            compatible = "qcom,pmi8996-smbchg";
>> +            reg = <0x1000>;
>> +
>> +            interrupts = <0x2 0x10 0x0 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x10 0x1 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x10 0x2 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x10 0x3 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x10 0x4 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x10 0x5 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
>> +                         <0x2 0x10 0x7 IRQ_TYPE_EDGE_RISING>,
>> +                         <0x2 0x12 0x0 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x13 0x4 IRQ_TYPE_EDGE_RISING>,
>> +                         <0x2 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
>> +                         <0x2 0x13 0x6 IRQ_TYPE_EDGE_FALLING>,
>> +                         <0x2 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x16 0x0 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x16 0x1 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
>> +                         <0x2 0x16 0x5 IRQ_TYPE_EDGE_BOTH>;
>> +            interrupt-names = "chg-error",
>> +                              "chg-inhibit",
>> +                              "chg-prechg-sft",
>> +                              "chg-complete-chg-sft",
>> +                              "chg-p2f-thr",
>> +                              "chg-rechg-thr",
>> +                              "chg-taper-thr",
>> +                              "chg-tcc-thr",
>> +                              "batt-hot",
>> +                              "batt-warm",
>> +                              "batt-cold",
>> +                              "batt-cool",
>> +                              "batt-ov",
>> +                              "batt-low",
>> +                              "batt-missing",
>> +                              "batt-term-missing",
>> +                              "usbin-uv",
>> +                              "usbin-ov",
>> +                              "usbin-src-det",
>> +                              "otg-fail",
>> +                              "otg-oc",
>> +                              "aicl-done",
>> +                              "usbid-change",
>> +                              "dcin-uv",
>> +                              "dcin-ov",
>> +                              "power-ok",
>> +                              "temp-shutdown",
>> +                              "wdog-timeout",
>> +                              "flash-fail",
>> +                              "otst2",
>> +                              "otst3";
>> +
>> +            monitored-battery = <&battery>;
>> +
>> +            otg-vbus { };
> 
> Why empty?

I was following similar bindings (see qcom,pm8941-charger and bq24190. 
What properties would I add here? There is nothing configurable with 
this regulator, only way it can be controlled is by enabling/disabling it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ