Re: [PATCH] arm64: dts: qcom: sm6115p-j606f: Add some peripherals

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

 



On Mon, 12 Feb 2024 at 15:44, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:
>
> This tablet features quite a bunch of I2C-connected devices, such as
> a Richtek RT1715 USB-C controller, a MM8013 fuel gauge, FSA4480 Type-C
> audio mux, TPS65132 regulator and some more.
>
> Add the aforementioned ones and document others.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
> ---
>  arch/arm64/boot/dts/qcom/sm6115.dtsi              |   7 ++
>  arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts | 103 +++++++++++++++++++++-
>  2 files changed, 109 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> index ee65ab073ba6..7df7b2045b71 100644
> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> @@ -1676,6 +1676,13 @@ usb_dwc3_ss: endpoint {
>                                                         remote-endpoint = <&usb_qmpphy_usb_ss_in>;
>                                                 };
>                                         };
> +
> +                                       port@2 {
> +                                               reg = <2>;
> +
> +                                               usb_dwc3_sbu: endpoint {
> +                                               };

The SBU lines are not connected to the DWC3 port

> +                                       };
>                                 };
>                         };
>                 };
> diff --git a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
> index 54da053a8042..eb65c2806345 100644
> --- a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
> @@ -73,6 +73,81 @@ zap-shader {
>         };
>  };
>
> +&gpi_dma0 {
> +       status = "okay";
> +};
> +
> +&i2c0 {
> +       clock-frequency = <400000>;
> +       status = "okay";
> +
> +       /* Some devices use FUSB302(@22) instead of the RT1715. */
> +
> +       rt1715: typec-portc@4e {
> +               compatible = "richtek,rt1715";
> +               reg = <0x4e>;
> +               interrupts-extended = <&tlmm 97 IRQ_TYPE_LEVEL_LOW>;
> +               pinctrl-0 = <&typec_int>;
> +               pinctrl-names = "default";
> +
> +               usb_con: connector {
> +                       compatible = "usb-c-connector";
> +                       label = "USB-C";
> +                       data-role = "dual";
> +
> +                       /* TODO: Add a proper PD setup */
> +                       typec-power-opmode = "default";
> +                       try-power-role = "sink";
> +                       power-role = "dual";
> +                       pd-disable;
> +
> +                       port {
> +                               rt1715_hs_ep: endpoint {
> +                                       remote-endpoint = <&usb_dwc3_hs>;

Most likely this port should have the SBU endpoint connected to
fsa4480. Also, if SS lines are connected, there should be a link
between this connector and the QMP PHY.

> +                               };
> +                       };
> +               };
> +       };
> +
> +       fuel-gauge@55 {
> +               compatible = "mitsumi,mm8013";
> +               reg = <0x55>;
> +       };
> +
> +       /* AW882xx speaker amp @ 34, 35, 36, 37 (CHIP_ID = 0x1852) */
> +       /* HID-over-I2C for the touchpad on keyboard folio @ 60 */
> +};
> +
> +&i2c1 {
> +       clock-frequency = <400000>;
> +       status = "okay";
> +
> +       tps65132@3e {
> +               compatible = "ti,tps65132";
> +               reg = <0x3e>;
> +       };
> +
> +       fsa4480: typec-mux@42 {
> +               compatible = "fcs,fsa4480";
> +               reg = <0x42>;
> +               interrupts-extended = <&tlmm 89 IRQ_TYPE_LEVEL_LOW>;
> +               orientation-switch;
> +               mode-switch;
> +
> +               port {
> +                       fsa4480_sbu_mux: endpoint {
> +                               remote-endpoint = <&usb_dwc3_sbu>;
> +                       };
> +               };
> +       };
> +
> +       /* PM8008 @ 8, 9 */
> +       /* SMB1355 @ c */
> +       /* SGM37604A WLED driver @ 36 */
> +       /* ES7210 audio ADC @ 40 */
> +       /* HID-over-I2C for the keyboard on keyboard folio @ 61 */
> +};
> +
>  &mdss {
>         status = "okay";
>  };
> @@ -129,6 +204,10 @@ &pon_resin {
>         status = "okay";
>  };
>
> +&qupv3_id_0 {
> +       status = "okay";
> +};
> +
>  &remoteproc_adsp {
>         firmware-name = "qcom/sm6115/LENOVO/J606F/adsp.mbn";
>         status = "okay";
> @@ -309,6 +388,12 @@ &sleep_clk {
>         clock-frequency = <32764>;
>  };
>
> +&spi2 {
> +       status = "okay";
> +
> +       /* HIMAX83102P or NT36523W touchscreen */
> +};
> +
>  &tlmm {
>         gpio-reserved-ranges = <14 4>;
>
> @@ -337,6 +422,14 @@ mdss_dsi_active: dsi-active-state {
>                 drive-strength = <8>;
>                 bias-disable;
>         };
> +
> +       typec_int: typec-int-state {
> +               pins = "gpio97";
> +               function = "gpio";
> +               drive-strength = <2>;
> +               bias-pull-up;
> +               input-enable;
> +       };
>  };
>
>  &ufs_mem_hc {
> @@ -360,12 +453,20 @@ &usb {
>
>  &usb_dwc3 {
>         maximum-speed = "high-speed";
> -       dr_mode = "peripheral";
> +       dr_mode = "otg";
>
>         phys = <&usb_hsphy>;
>         phy-names = "usb2-phy";
>  };
>
> +&usb_dwc3_hs {
> +       remote-endpoint = <&rt1715_hs_ep>;
> +};
> +
> +&usb_dwc3_sbu {
> +       remote-endpoint = <&fsa4480_sbu_mux>;
> +};
> +
>  &usb_hsphy {
>         vdd-supply = <&pm6125_l4>;
>         vdda-pll-supply = <&pm6125_l12>;
>
> ---
> base-commit: ae00c445390b349e070a64dc62f08aa878db7248
> change-id: 20240212-topic-j606f_periphs-87dd893e105c
>
> Best regards,
> --
> Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
>
>


-- 
With best wishes
Dmitry




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux