[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b62090b2-0772-7e9f-7a03-e97533d62230@linaro.org>
Date: Wed, 14 Dec 2022 21:27:10 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Lux Aliaga <they@...t.lgbt>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Kees Cook <keescook@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] arm64: dts: qcom: sm6125: Initial support for
xiaomi-laurel_sprout
On 14.12.2022 18:45, Lux Aliaga wrote:
> Ok. I think that comment is incorrect. Changing the node name on extcon_usb breaks the "extcon" property in &usb3_dwc3, even after changing the reference.
>
Please don't toppost, reply under the paragraph you're referencing.
Konrad
> On 14/12/2022 14:26, Lux Aliaga wrote:
>> I'm a bit confused at the "Node name: usb-id" comment. Should I change "extcon_usb" or "extcon-usb" to usb-id?
>>
>> On 14/12/2022 06:52, Krzysztof Kozlowski wrote:
>>> On 14/12/2022 10:33, Lux Aliaga wrote:
>>>> This commit implements support for the Xiaomi Mi A3
>>>> (xiaomi-laurel_sprout). Here's a summary on what's working.
>>>>
>>>> - dmesg output to bootloader preconfigured display
>>>> - USB
>>>> - UFS
>>>> - SMD RPM regulators
>>>>
>>>> Signed-off-by: Lux Aliaga <they@...t.lgbt>
>>>> ---
>>>> arch/arm64/boot/dts/qcom/Makefile | 1 +
>>>> .../dts/qcom/sm6125-xiaomi-laurel_sprout.dts | 251 ++++++++++++++++++
>>>> 2 files changed, 252 insertions(+)
>>>> create mode 100644 arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel_sprout.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>>> index d7669a7cee9f..7b4fbb4cbb84 100644
>>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>>> @@ -140,6 +140,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb
>>>> dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb
>>>> dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb
>>>> dtb-$(CONFIG_ARCH_QCOM) += sm6125-sony-xperia-seine-pdx201.dtb
>>>> +dtb-$(CONFIG_ARCH_QCOM) += sm6125-xiaomi-laurel_sprout.dtb
>>>> dtb-$(CONFIG_ARCH_QCOM) += sm6350-sony-xperia-lena-pdx213.dtb
>>>> dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtb
>>>> dtb-$(CONFIG_ARCH_QCOM) += sm8150-hdk.dtb
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel_sprout.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel_sprout.dts
>>>> new file mode 100644
>>>> index 000000000000..edc5f13bae28
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel_sprout.dts
>>>> @@ -0,0 +1,251 @@
>>>> +// SPDX-License-Identifier: BSD-3-Clause
>>>> +/*
>>>> + * Copyright (c) 2022, Lux Aliaga <they@...t.lgbt>
>>>> + */
>>>> +
>>>> +/dts-v1/;
>>>> +
>>>> +#include "sm6125.dtsi"
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +#include <dt-bindings/input/input.h>
>>>> +#include <dt-bindings/input/gpio-keys.h>
>>>> +
>>>> +/ {
>>>> + /* required for bootloader to select correct board */
>>>> + qcom,msm-id = <0x18a 0x00>; /* sm6125 v1 */
>>>> + qcom,board-id = <0x0b 0x00>;
>>>> +
>>>> + model = "Xiaomi Mi A3";
>>>> + compatible = "xiaomi,laurel_sprout", "qcom,sm6125";
>>>> + chassis-type = "handset";
>>>> +
>>>> + chosen {
>>>> + #address-cells = <2>;
>>>> + #size-cells = <2>;
>>>> + ranges;
>>>> +
>>>> + framebuffer0: framebuffer@...00000 {
>>>> + compatible = "simple-framebuffer";
>>>> + reg = <0 0x5c000000 0 (1560 * 720 * 4)>;
>>>> + width = <720>;
>>>> + height = <1560>;
>>>> + stride = <(720 * 4)>;
>>>> + format = "a8r8g8b8";
>>>> + };
>>>> + };
>>>> +
>>>> + extcon_usb: extcon-usb {
>>> Node name: usb-id
>>>
>>>> + compatible = "linux,extcon-usb-gpio";
>>>> + id-gpio = <&tlmm 102 GPIO_ACTIVE_HIGH>;
>>>> + };
>>>> +
>>>> + reserved_memory {
>>> No underscores in node names. Use same node name as other boards, don't
>>> invent own stuff.
>>>
>>>> + #address-cells = <2>;
>>>> + #size-cells = <2>;
>>>> + debug_mem: memory@...00000 {
>>>> + reg = <0x0 0xffb00000 0x0 0xc0000>;
>>>> + no-map;
>>>> + };
>>>> +
>>>> + last_log_mem: memory@...c0000 {
>>>> + reg = <0x0 0xffbc0000 0x0 0x80000>;
>>>> + no-map;
>>>> + };
>>>> +
>>>> + pstore_mem: ramoops@...00000 {
>>>> + compatible = "ramoops";
>>>> + reg = <0x0 0xffc40000 0x0 0xc0000>;
>>>> + record-size = <0x1000>;
>>>> + console-size = <0x40000>;
>>>> + msg-size = <0x20000 0x20000>;
>>>> + };
>>>> +
>>>> + cmdline_mem: memory@...00000 {
>>>> + reg = <0x0 0xffd40000 0x0 0x1000>;
>>>> + no-map;
>>>> + };
>>>> + };
>>>> +};
>>>> +
>>>> +&rpm_requests {
>>>> + regulators-0 {
>>>> + compatible = "qcom,rpm-pm6125-regulators";
>>>> +
>>>> + vreg_s6a: s6 {
>>>> + regulator-min-microvolt = <936000>;
>>>> + regulator-max-microvolt = <1422000>;
>>>> + };
>>>> +
>>>> + vreg_l1a: l1 {
>>>> + regulator-min-microvolt = <1200000>;
>>>> + regulator-max-microvolt = <1256000>;
>>>> + };
>>>> +
>>>> + vreg_l2a: l2 {
>>>> + regulator-min-microvolt = <1000000>;
>>>> + regulator-max-microvolt = <1056000>;
>>>> + };
>>>> +
>>>> + vreg_l3a: l3 {
>>>> + regulator-min-microvolt = <1000000>;
>>>> + regulator-max-microvolt = <1064000>;
>>>> + };
>>>> +
>>>> + vreg_l4a: l4 {
>>>> + regulator-min-microvolt = <872000>;
>>>> + regulator-max-microvolt = <976000>;
>>>> + };
>>>> +
>>>> + vreg_l5a: l5 {
>>>> + regulator-min-microvolt = <1648000>;
>>>> + regulator-max-microvolt = <3104000>;
>>>> + };
>>>> +
>>>> + vreg_l6a: l6 {
>>>> + regulator-min-microvolt = <576000>;
>>>> + regulator-max-microvolt = <656000>;
>>>> + };
>>>> +
>>>> + vreg_l7a: l7 {
>>>> + regulator-min-microvolt = <872000>;
>>>> + regulator-max-microvolt = <976000>;
>>>> + };
>>>> +
>>>> + vreg_l8a: l8 {
>>>> + regulator-min-microvolt = <400000>;
>>>> + regulator-max-microvolt = <728000>;
>>>> + };
>>>> +
>>>> + vreg_l9a: l9 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1896000>;
>>>> + };
>>>> +
>>>> + vreg_l10a: l10 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1896000>;
>>>> + };
>>>> +
>>>> + vreg_l11a: l11 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1952000>;
>>>> + };
>>>> +
>>>> + vreg_l12a: l12 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1996000>;
>>>> + };
>>>> +
>>>> + vreg_l13a: l13 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1832000>;
>>>> + };
>>>> +
>>>> + vreg_l14a: l14 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1904000>;
>>>> + };
>>>> +
>>>> + vreg_l15a: l15 {
>>>> + regulator-min-microvolt = <3104000>;
>>>> + regulator-max-microvolt = <3232000>;
>>>> + };
>>>> +
>>>> + vreg_l16a: l16 {
>>>> + regulator-min-microvolt = <1800000>;
>>>> + regulator-max-microvolt = <1904000>;
>>>> + };
>>>> +
>>>> + vreg_l17a: l17 {
>>>> + regulator-min-microvolt = <1248000>;
>>>> + regulator-max-microvolt = <1304000>;
>>>> + };
>>>> +
>>>> + vreg_l18a: l18 {
>>>> + regulator-min-microvolt = <1200000>;
>>>> + regulator-max-microvolt = <1264000>;
>>>> + };
>>>> +
>>>> + vreg_l19a: l19 {
>>>> + regulator-min-microvolt = <1648000>;
>>>> + regulator-max-microvolt = <2952000>;
>>>> + };
>>>> +
>>>> + vreg_l20a: l20 {
>>>> + regulator-min-microvolt = <1648000>;
>>>> + regulator-max-microvolt = <2952000>;
>>>> + };
>>>> +
>>>> + vreg_l21a: l21 {
>>>> + regulator-min-microvolt = <2600000>;
>>>> + regulator-max-microvolt = <2856000>;
>>>> + };
>>>> +
>>>> + vreg_l22a: l22 {
>>>> + regulator-min-microvolt = <2944000>;
>>>> + regulator-max-microvolt = <3304000>;
>>>> + };
>>>> +
>>>> + vreg_l23a: l23 {
>>>> + regulator-min-microvolt = <3000000>;
>>>> + regulator-max-microvolt = <3400000>;
>>>> + };
>>>> +
>>>> + vreg_l24a: l24 {
>>>> + regulator-min-microvolt = <2944000>;
>>>> + regulator-max-microvolt = <3304000>;
>>>> + };
>>>> + };
>>>> +};
>>>> +
>>>> +&hsusb_phy1 {
>>>> + status = "okay";
>>>> +};
>>>> +
>>>> +
>>>> +&sdc2_off_state {
>>>> + sd-cd {
>>> Does not look like you tested the DTS against bindings. Please run `make
>>> dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
>>> for instructions).
>>>
>>> that's missing -pins suffix but most likely it does not match other DTS
>>> neither. So probably was based on some old kernel.
>>>
>>>> + pins = "gpio98";
>>>> + bias-disable;
>>>> + drive-strength = <2>;
>>>> + };
>>>> +};
>>>> +
>>>> +&sdc2_on_state {
>>>> + sd-cd {
>>> Same problems.
>>>
>>>> + pins = "gpio98";
>>>> + bias-pull-up;
>>>> + drive-strength = <2>;
>>>> + };
>>>> +};
>>> Best regards,
>>> Krzysztof
>>>
Powered by blists - more mailing lists