Re: [PATCH 10/10] dt-bindings: Add documentation for rt5033 mfd, regulator and charger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

On 05.03.23 16:54, Jakob Hauser wrote:
...
On 01.03.23 03:35, Rob Herring wrote:
On Tue, Feb 28, 2023 at 11:32:27PM +0100, Jakob Hauser wrote:

...

+  richtek,pre-threshold-uvolt:
+    description: |
+      Voltage of pre-charge mode. If the battery voltage is below the pre-charge +      threshold voltage, the charger is in pre-charge mode with pre-charge current.
+      Its levels are 2.3 V to 3.8 V programmed by I2C per 0.1 V.
+    maxItems: 1
+
+  richtek,const-uvolt:
+    description: |
+      Battery regulation voltage of constant voltage mode. This voltage levels from
+      3.65 V to 4.4 V by I2C per 0.025 V.
+    maxItems: 1
+
+  extcon:

This is deprecated. There's standard connector bindings now.

How does this work? I couldn't find an example.

I found Documentation/devicetree/bindings/connector/usb-connector.yaml [2] but I don't see how this would be applied here.

The extcon device entry in the samsung-serranove devicetree [3] looks like:

i2c-muic {
         compatible = "i2c-gpio";
         sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
         scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;

         pinctrl-names = "default";
         pinctrl-0 = <&muic_i2c_default>;

         #address-cells = <1>;
         #size-cells = <0>;

         muic: extcon@14 {
                 compatible = "siliconmitus,sm5504-muic";
                 reg = <0x14>;

                 interrupt-parent = <&msmgpio>;
                 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;

                 pinctrl-names = "default";
                 pinctrl-0 = <&muic_irq_default>;
         };
};

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/connector/usb-connector.yaml?h=v6.2 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts?h=v6.2#n123

Could you add more information on what you mean by standard connector bindings? It's not clear to me.

+    description: |
+      Phandle to the extcon device.
+    maxItems: 1
+
+required:
+  - richtek,pre-uamp
+  - richtek,fast-uamp
+  - richtek,eoc-uamp
+  - richtek,pre-threshold-uvolt
+  - richtek,const-uvolt
+
+additionalProperties: false
+
+examples:
+  - |
+    charger {
+        compatible = "richtek,rt5033-charger";
+        richtek,pre-uamp = <450000>;
+        richtek,fast-uamp = <1000000>;
+        richtek,eoc-uamp = <150000>;
+        richtek,pre-threshold-uvolt = <3500000>;
+        richtek,const-uvolt = <4350000>;
+        extcon = <&muic>;
+    };

...

Kind regards,
Jakob




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux