mbox series

[0/9] arm64: dts: qcom: sm8150-hdk: enable display output

Message ID 20231209232132.3580045-1-dmitry.baryshkov@linaro.org
Headers show
Series arm64: dts: qcom: sm8150-hdk: enable display output | expand

Message

Dmitry Baryshkov Dec. 9, 2023, 11:21 p.m. UTC
Enable display output on the SM8150 HDK device. This includes HDMI
output through the onboard DSI-HDMI bridge and DP output on the USB-C
port.

Dmitry Baryshkov (9):
  dt-bindings: display: msm: dp: declare compatible string for sm8150
  arm64: dts: qcom: sm8150: use SoC-specific compat for RPMh stats
  arm64: dts: qcom: sm8150: make dispcc cast minimal vote on MMCX
  arm64: dts: qcom: sm8150-hdk: enable HDMI output
  arm64: dts: qcom: sm8150-hdk: fix SS USB regulators
  arm64: dts: qcom: sm8150: add DisplayPort controller
  arm64: dts: qcom: sm8150: add USB-C ports to the USB+DP QMP PHY
  arm64: dts: qcom: sm8150: add USB-C ports to the OTG USB host
  arm64: dts: qcom: sm8150-hdk: enable DisplayPort and USB-C altmode

 .../bindings/display/msm/dp-controller.yaml   |   1 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts       | 264 +++++++++++++++++-
 arch/arm64/boot/dts/qcom/sm8150.dtsi          | 132 ++++++++-
 3 files changed, 386 insertions(+), 11 deletions(-)

Comments

Konrad Dybcio Dec. 11, 2023, 9:30 a.m. UTC | #1
On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> The SM8150 platform doesn't support DDR sleep stats, so it needs
> SoC-specific compat string for the RPMh stats data.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Not a fan, see my comments over at [1].

Konrad

[1] https://lore.kernel.org/linux-arm-msm/20231209215601.3543895-1-dmitry.baryshkov@linaro.org/T/#t
Konrad Dybcio Dec. 11, 2023, 9:30 a.m. UTC | #2
On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> Add required-opps property to the display clock controller. This makes
> it cast minimal vote on the MMCX lane and prevents further 'clock stuck'
> errors when enabling the display.
> 
> Fixes: 2ef3bb17c45c ("arm64: dts: qcom: sm8150: Add DISPCC node")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Konrad Dybcio Dec. 11, 2023, 9:31 a.m. UTC | #3
On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> Add DSI outputs and link them to the onboard Lontium LT9611 DSI-to-HDMI
> bridge, enabling HDMI output on this board. While adding the display
> resources, also drop the headless ("amd,imageon") compat string from the
> GPU node, since the board now has output.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
[...]


> +
> +	lt9611_irq_pin: lt9611-irq-state {
> +		pins = "gpio9";
> +		function = "gpio";
> +		bias-disable;
No drive-strength?

Otherwise lokos good at a glance!

Konrad
Konrad Dybcio Dec. 11, 2023, 9:32 a.m. UTC | #4
On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> The SM8150-HDK uses two different regulators to power up SuperSpeed USB
> PHYs. The L5A regulator is used for the second USB host, while the first
> (OTG) USB host uses different regulator, L18A. Fix the regulator for the
> usb_1 QMPPHY and (to remove possible confusion) drop the
> usb_ss_dp_core_1/_2 labels.
> 
> Fixes: 0ab1b2d10afe ("arm64: dts: qcom: add sm8150 hdk dts")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Konrad Dybcio Dec. 11, 2023, 9:33 a.m. UTC | #5
On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> Expand Combo USB+DP QMP PHY device node with the OF ports required to
> support USB-C / DisplayPort switching.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> index ea7c92c0e405..38423a9f8408 100644
> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> @@ -3447,6 +3447,29 @@ usb_1_qmpphy: phy@88e8000 {
>  			#phy-cells = <1>;
>  
>  			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +					usb_1_qmpphy_out: endpoint {};
style 1
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +
> +					usb_1_qmpphy_usb_ss_in: endpoint {
> +					};
style 2
> +				};
> +
> +				port@2 {
> +					reg = <2>;
> +
> +					usb_1_qmpphy_dp_in: endpoint {};
style 3

:(

Konrad
Konrad Dybcio Dec. 11, 2023, 9:33 a.m. UTC | #6
On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> Enable the USB-C related functionality for the USB-C port on this board.
> This includes OTG, PowerDelivery and DP AltMode. Also enable the
> DisplayPort itself.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
[...]

> +&pm8150b_typec {
> +	status = "okay";
> +
> +	vdd-pdphy-supply = <&vreg_l2a_3p1>;
> +
> +	connector {
> +		compatible = "usb-c-connector";
> +
> +		power-role = "source";
> +		data-role = "dual";
> +		self-powered;
> +
> +		source-pdos = <PDO_FIXED(5000, 3000,
> +					 PDO_FIXED_DUAL_ROLE |
> +					 PDO_FIXED_USB_COMM |
> +					 PDO_FIXED_DATA_SWAP)>;
> +
> +		altmodes {
> +			displayport {
> +				svid = <0xff01>;
/bits/ 16?

Konrad
Dmitry Baryshkov Dec. 11, 2023, 9:45 a.m. UTC | #7
On Mon, 11 Dec 2023 at 11:31, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> > Add DSI outputs and link them to the onboard Lontium LT9611 DSI-to-HDMI
> > bridge, enabling HDMI output on this board. While adding the display
> > resources, also drop the headless ("amd,imageon") compat string from the
> > GPU node, since the board now has output.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> [...]
>
>
> > +
> > +     lt9611_irq_pin: lt9611-irq-state {
> > +             pins = "gpio9";
> > +             function = "gpio";
> > +             bias-disable;
> No drive-strength?

For the input pin with no bias? I'm not sure. And yes, it was c&p from RB3.

> Otherwise lokos good at a glance!
Dmitry Baryshkov Dec. 11, 2023, 9:46 a.m. UTC | #8
On Mon, 11 Dec 2023 at 11:33, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> > Expand Combo USB+DP QMP PHY device node with the OF ports required to
> > support USB-C / DisplayPort switching.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sm8150.dtsi | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > index ea7c92c0e405..38423a9f8408 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > @@ -3447,6 +3447,29 @@ usb_1_qmpphy: phy@88e8000 {
> >                       #phy-cells = <1>;
> >
> >                       status = "disabled";
> > +
> > +                     ports {
> > +                             #address-cells = <1>;
> > +                             #size-cells = <0>;
> > +
> > +                             port@0 {
> > +                                     reg = <0>;
> > +                                     usb_1_qmpphy_out: endpoint {};
> style 1
> > +                             };
> > +
> > +                             port@1 {
> > +                                     reg = <1>;
> > +
> > +                                     usb_1_qmpphy_usb_ss_in: endpoint {
> > +                                     };
> style 2
> > +                             };
> > +
> > +                             port@2 {
> > +                                     reg = <2>;
> > +
> > +                                     usb_1_qmpphy_dp_in: endpoint {};
> style 3
>
> :(

Which one should I stick to?
Dmitry Baryshkov Dec. 11, 2023, 9:46 a.m. UTC | #9
On Mon, 11 Dec 2023 at 11:33, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 10.12.2023 00:21, Dmitry Baryshkov wrote:
> > Enable the USB-C related functionality for the USB-C port on this board.
> > This includes OTG, PowerDelivery and DP AltMode. Also enable the
> > DisplayPort itself.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> [...]
>
> > +&pm8150b_typec {
> > +     status = "okay";
> > +
> > +     vdd-pdphy-supply = <&vreg_l2a_3p1>;
> > +
> > +     connector {
> > +             compatible = "usb-c-connector";
> > +
> > +             power-role = "source";
> > +             data-role = "dual";
> > +             self-powered;
> > +
> > +             source-pdos = <PDO_FIXED(5000, 3000,
> > +                                      PDO_FIXED_DUAL_ROLE |
> > +                                      PDO_FIXED_USB_COMM |
> > +                                      PDO_FIXED_DATA_SWAP)>;
> > +
> > +             altmodes {
> > +                     displayport {
> > +                             svid = <0xff01>;
> /bits/ 16?

Ugh, yes.
Konrad Dybcio Dec. 11, 2023, 9:50 a.m. UTC | #10
On 11.12.2023 10:46, Dmitry Baryshkov wrote:
> On Mon, 11 Dec 2023 at 11:33, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 10.12.2023 00:21, Dmitry Baryshkov wrote:
>>> Expand Combo USB+DP QMP PHY device node with the OF ports required to
>>> support USB-C / DisplayPort switching.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 23 +++++++++++++++++++++++
>>>  1 file changed, 23 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>> index ea7c92c0e405..38423a9f8408 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>> @@ -3447,6 +3447,29 @@ usb_1_qmpphy: phy@88e8000 {
>>>                       #phy-cells = <1>;
>>>
>>>                       status = "disabled";
>>> +
>>> +                     ports {
>>> +                             #address-cells = <1>;
>>> +                             #size-cells = <0>;
>>> +
>>> +                             port@0 {
>>> +                                     reg = <0>;
>>> +                                     usb_1_qmpphy_out: endpoint {};
>> style 1
>>> +                             };
>>> +
>>> +                             port@1 {
>>> +                                     reg = <1>;
>>> +
>>> +                                     usb_1_qmpphy_usb_ss_in: endpoint {
>>> +                                     };
>> style 2
>>> +                             };
>>> +
>>> +                             port@2 {
>>> +                                     reg = <2>;
>>> +
>>> +                                     usb_1_qmpphy_dp_in: endpoint {};
>> style 3
>>
>> :(
> 
> Which one should I stick to?
style 2 seems to be used in 8650

Konrad
Dmitry Baryshkov Dec. 13, 2023, 12:37 a.m. UTC | #11
On Sun, 10 Dec 2023 02:21:23 +0300, Dmitry Baryshkov wrote:
> Enable display output on the SM8150 HDK device. This includes HDMI
> output through the onboard DSI-HDMI bridge and DP output on the USB-C
> port.
> 
> Dmitry Baryshkov (9):
>   dt-bindings: display: msm: dp: declare compatible string for sm8150
>   arm64: dts: qcom: sm8150: use SoC-specific compat for RPMh stats
>   arm64: dts: qcom: sm8150: make dispcc cast minimal vote on MMCX
>   arm64: dts: qcom: sm8150-hdk: enable HDMI output
>   arm64: dts: qcom: sm8150-hdk: fix SS USB regulators
>   arm64: dts: qcom: sm8150: add DisplayPort controller
>   arm64: dts: qcom: sm8150: add USB-C ports to the USB+DP QMP PHY
>   arm64: dts: qcom: sm8150: add USB-C ports to the OTG USB host
>   arm64: dts: qcom: sm8150-hdk: enable DisplayPort and USB-C altmode
> 
> [...]

Applied, thanks!

[1/9] dt-bindings: display: msm: dp: declare compatible string for sm8150
      https://gitlab.freedesktop.org/lumag/msm/-/commit/0d196633771c

Best regards,
neil.armstrong@linaro.org Dec. 13, 2023, 9:01 a.m. UTC | #12
On 11/12/2023 10:50, Konrad Dybcio wrote:
> On 11.12.2023 10:46, Dmitry Baryshkov wrote:
>> On Mon, 11 Dec 2023 at 11:33, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>>
>>> On 10.12.2023 00:21, Dmitry Baryshkov wrote:
>>>> Expand Combo USB+DP QMP PHY device node with the OF ports required to
>>>> support USB-C / DisplayPort switching.
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>> ---
>>>>   arch/arm64/boot/dts/qcom/sm8150.dtsi | 23 +++++++++++++++++++++++
>>>>   1 file changed, 23 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>>> index ea7c92c0e405..38423a9f8408 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>>> @@ -3447,6 +3447,29 @@ usb_1_qmpphy: phy@88e8000 {
>>>>                        #phy-cells = <1>;
>>>>
>>>>                        status = "disabled";
>>>> +
>>>> +                     ports {
>>>> +                             #address-cells = <1>;
>>>> +                             #size-cells = <0>;
>>>> +
>>>> +                             port@0 {
>>>> +                                     reg = <0>;
>>>> +                                     usb_1_qmpphy_out: endpoint {};
>>> style 1
>>>> +                             };
>>>> +
>>>> +                             port@1 {
>>>> +                                     reg = <1>;
>>>> +
>>>> +                                     usb_1_qmpphy_usb_ss_in: endpoint {
>>>> +                                     };
>>> style 2
>>>> +                             };
>>>> +
>>>> +                             port@2 {
>>>> +                                     reg = <2>;
>>>> +
>>>> +                                     usb_1_qmpphy_dp_in: endpoint {};
>>> style 3
>>>
>>> :(
>>
>> Which one should I stick to?
> style 2 seems to be used in 8650

I used style 2 for 8450/8550/8650 usb & dp ports, but the 3 styles are present in the qcom dts.

Neil

> 
> Konrad
>