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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9d75e57-bdea-593d-7b05-136c9ad2e2fe@rocketmail.com>
Date:   Mon, 1 May 2023 19:35:14 +0200
From:   Jakob Hauser <jahau@...ketmail.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc:     Sebastian Reichel <sre@...nel.org>, Lee Jones <lee@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Beomho Seo <beomho.seo@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Stephan Gerhold <stephan@...hold.net>,
        Raymond Hackley <raymondhackley@...tonmail.com>,
        Pavel Machek <pavel@....cz>, Axel Lin <axel.lin@...ics.com>,
        ChiYuan Huang <cy_huang@...htek.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, phone-devel@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v3 8/8] dt-bindings: Add rt5033 mfd, regulator and charger

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@...sung.com>
>> Cc: Chanwoo Choi <cw00.choi@...sung.com>
>> Signed-off-by: Jakob Hauser <jahau@...ketmail.com>
> 
> 
> (...)
> 
>> +
>> +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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ