Message ID | 20240223-topic-sm8650-upstream-hdk-v1-3-ccca645cd901@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | arm64: qcom: sm8650: add support for the SM8650-HDK board | expand |
Hi Neil, On 2/23/24 10:52, Neil Armstrong wrote: > With the SM8650-HDK, a Display Card kit can be connected to provide > a VTDR6130 display with Goodix Berlin Touch controller. > > In order to route the DSI lanes to the connector for the Display > Card kit, a switch must be changed on the board. > > The HDMI nodes are disabled since the DSI lanes are shared with > the DSI to HDMI transceiver. > > Add support for this card as an overlay and apply it it at > build-time to the sm8650-hdk dtb. > > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> > --- <snip> > + mdp_vsync_active: mdp-vsync-active-state { > + pins = "gpio86"; > + function = "mdp_vsync"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + mdp_vsync_suspend: mdp-vsync-suspend-state { > + pins = "gpio86"; > + function = "mdp_vsync"; > + drive-strength = <2>; > + bias-pull-down; > + }; If you have a single pin configuration for active and suspend states, then likely you may have only one device tree node here. Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> I don't add my Tested-by tag, since I don't get a panel working on 6.8.0-rc6, while in runtime MSM and DSI are enabled, the panel driver is not initialized: panel-visionox-vtdr6130 ae94000.dsi.0: Failed to initialize panel: -22 -- Best wishes, Vladimir
On 03/03/2024 00:32, Vladimir Zapolskiy wrote: > Hi Neil, > > On 2/23/24 10:52, Neil Armstrong wrote: >> With the SM8650-HDK, a Display Card kit can be connected to provide >> a VTDR6130 display with Goodix Berlin Touch controller. >> >> In order to route the DSI lanes to the connector for the Display >> Card kit, a switch must be changed on the board. >> >> The HDMI nodes are disabled since the DSI lanes are shared with >> the DSI to HDMI transceiver. >> >> Add support for this card as an overlay and apply it it at >> build-time to the sm8650-hdk dtb. >> >> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> >> --- > > <snip> > >> + mdp_vsync_active: mdp-vsync-active-state { >> + pins = "gpio86"; >> + function = "mdp_vsync"; >> + drive-strength = <2>; >> + bias-pull-down; >> + }; >> + >> + mdp_vsync_suspend: mdp-vsync-suspend-state { >> + pins = "gpio86"; >> + function = "mdp_vsync"; >> + drive-strength = <2>; >> + bias-pull-down; >> + }; > > If you have a single pin configuration for active and suspend states, > then likely you may have only one device tree node here. > > Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> > > I don't add my Tested-by tag, since I don't get a panel working on 6.8.0-rc6, > while in runtime MSM and DSI are enabled, the panel driver is not initialized: > > panel-visionox-vtdr6130 ae94000.dsi.0: Failed to initialize panel: -22 This is unrelated to to the HDK, it requires this: https://lore.kernel.org/all/20240201-visionox-vtdr-prev-first-v2-1-32db52867624@quicinc.com/ that has been applied fr next release. Thanks, Neil > > -- > Best wishes, > Vladimir
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 4f48c98451de..566997db4b37 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -241,6 +241,10 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8450-sony-xperia-nagara-pdx224.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8550-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8550-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8550-qrd.dtb + +sm8650-hdk-display-card-dtbs := sm8650-hdk.dtb sm8650-hdk-display-card.dtbo + +dtb-$(CONFIG_ARCH_QCOM) += sm8650-hdk-display-card.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8650-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8650-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8650-qrd.dtb diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk-display-card.dtso b/arch/arm64/boot/dts/qcom/sm8650-hdk-display-card.dtso new file mode 100644 index 000000000000..b9de6c9ce10e --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk-display-card.dtso @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024, Linaro Limited + */ + +/* + * Display Card kit overlay + * This requires S5702 Switch 7 to be turned to OFF to route DSI0 to the display panel + */ + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/dts-v1/; +/plugin/; + +&i2c6 { + status = "disabled"; +}; + +<9611_1v2 { + status = "disabled"; +}; + +<9611_3v3 { + status = "disabled"; +}; + +&vreg_bob_3v3 { + status = "disabled"; +}; + +<9611_codec { + status = "disabled"; +}; + +&mdss_dsi0 { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "visionox,vtdr6130"; + reg = <0>; + + reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>; + + vddio-supply = <&vreg_l12b_1p8>; + vci-supply = <&vreg_l13b_3p0>; + vdd-supply = <&vreg_l11b_1p2>; + + pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync_active>; + pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync_suspend>; + pinctrl-names = "default", "sleep"; + + port { + panel0_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; + + /* + * DTC requires to have both endpoints when compiling the overlay + * and also requires the #address/size-cells + reg properties + */ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mdss_dsi0_out: endpoint { + remote-endpoint = <&panel0_in>; + }; + }; + }; +}; + +&spi4 { + /* DTC requires the #address/size-cells to compile DTBO */ + #address-cells = <1>; + #size-cells = <0>; + + status = "okay"; + + touchscreen@0 { + compatible = "goodix,gt9916"; + reg = <0>; + + interrupt-parent = <&tlmm>; + interrupts = <162 IRQ_TYPE_LEVEL_LOW>; + + reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>; + + avdd-supply = <&vreg_l14b_3p2>; + + spi-max-frequency = <1000000>; + + touchscreen-size-x = <1080>; + touchscreen-size-y = <2400>; + + pinctrl-0 = <&ts_irq>, <&ts_reset>; + pinctrl-names = "default"; + }; +}; + +&tlmm { + disp0_reset_n_active: disp0-reset-n-active-state { + pins = "gpio133"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + disp0_reset_n_suspend: disp0-reset-n-suspend-state { + pins = "gpio133"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + mdp_vsync_active: mdp-vsync-active-state { + pins = "gpio86"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + mdp_vsync_suspend: mdp-vsync-suspend-state { + pins = "gpio86"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + ts_irq: ts-irq-state { + pins = "gpio161"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + output-disable; + }; + + ts_reset: ts-reset-state { + pins = "gpio162"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; +};
With the SM8650-HDK, a Display Card kit can be connected to provide a VTDR6130 display with Goodix Berlin Touch controller. In order to route the DSI lanes to the connector for the Display Card kit, a switch must be changed on the board. The HDMI nodes are disabled since the DSI lanes are shared with the DSI to HDMI transceiver. Add support for this card as an overlay and apply it it at build-time to the sm8650-hdk dtb. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> --- arch/arm64/boot/dts/qcom/Makefile | 4 + .../boot/dts/qcom/sm8650-hdk-display-card.dtso | 151 +++++++++++++++++++++ 2 files changed, 155 insertions(+)