Hi Krzysztof,
On 01.05.23 09:21, Krzysztof Kozlowski wrote:
On 28/04/2023 01:30, Jakob Hauser wrote:
Add device tree binding documentation for rt5033 multifunction device, voltage
regulator and battery charger.
Cc: Beomho Seo <beomho.seo@xxxxxxxxxxx>
Cc: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
Signed-off-by: Jakob Hauser <jahau@xxxxxxxxxxxxxx>
(...)
+
+required:
+ - monitored-battery
+
+additionalProperties: false
+
+examples:
+ - |
+ charger {
+ compatible = "richtek,rt5033-charger";
+ monitored-battery = <&battery>;
+ extcon = <&muic>;
Everything up to here looked ok, but extcon is not a hardware property.
Please do not mix adding missing bindings for existing device with
adding new properties. You should use connector for the USB port.
Rob already raised this in v1. In patch 8 v3 comments below '---' I
mentioned that the extcon phandle is still there because I don't
understand what to do.
The devices using rt5033 I'm aware of:
- arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
used by:
- msm8916-samsung-a3u-eur.dts
- msm8916-samsung-a5u-eur.dts
- arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
used by:
- msm8916-samsung-e5.dts
- msm8916-samsung-e7.dts
- msm8916-samsung-grandmax.dts
- arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
not yet mainlined:
- arch/arm64/boot/dts/qcom/msm8916-samsung-gprime-common.dtsi
used by:
- msm8916-samsung-fortuna3g.dts
- msm8916-samsung-fortunaltezt.dts
- msm8916-samsung-gprimeltecan.dts
They all have either an SM5502 or SM5504 MUIC (Micro-USB Interface
Controller) chip installed. It reports the information what type of
connector got plugged into the USB plug. An example for the devicetree
entry can be found at the bottom of
Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml [1].
Documentation on the connector binding you are referring to would be the
following, I guess:
Documentation/devicetree/bindings/connector/usb-connector.yaml [2].
It's not clear to me what to do. To my understanding, in the devicetree
of the device a "connector" node should be placed within the extcon/muic
node. Like this? (Connector node at the very bottom.)
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>;
usb_con: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};
};
And how to set up the rt5033-charger to retrieve the information of the
extcon/muic driver in that case?
I was looking for examples but didn't find anything that helped me to
answer that question.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml?h=v6.3
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/connector/usb-connector.yaml?h=v6.3
Kind regards,
Jakob