drm/msm: external HDMI support for Nexus 5 phone
Subsystems (6)
v2 cover drm/msm: external HDMI support for Nexus 5 phone
I am using an Analogix SP6001 SlimPort Micro-USB to 4K HDMI Adapter to connect my Nexus 5 phone to an external display. The external display is not fully working yet however I think I'm close. When I plug the cable into the phone, the interrupt for the hot plug detect GPIO for the HDMI bridge (Analogix ANX7808) fires and anx78xx_handle_common_int_4() shows that the interrupt status bit is set to SP_HPD_ESYNC_ERR.
The second hot plug detect pin (for qcom,hdmi-tx-8974 for the MSM KMS/DRM driver) does not fire, and the clocks are not configured via msm_hdmi_phy_pll_init(). I suspect that this is the issue that I need to solve next.
I verified in the downstream MSM sources that IRQ 8 on the mdss is the correct IRQ number for hdmi-tx. Here's the relevant line from /proc/interrupts showing that no interrupts are triggered:
93: 0 0 0 0 mdss 8 Edge hdmi_isr.
I'm going to continue digging through the code but I'd appreciate any suggestions for things to check. I assume that the IRQs for both hot plug detect pins should fire when I plug the cable in. Unfortunately, the display doesn't work for me with the downstream kernel and I only have access to a running downstream kernel over the serial console.
High-level changes since v1:
- Hot plug detect interrupt now working properly on HDMI bridge
- Introduce msm8974 PLL support
I've held back some cosmetic changes to the drivers and only included the necessary changes required to get this functional. This requires the following patch I sent out on 2019-09-22 to analogix-anx78xx that corrects an i2c address:
https://lore.kernel.org/lkml/[email protected]/
Brian Masney (5):
drm/bridge: analogix-anx78xx: add support for avdd33 regulator drm/msm/hdmi: add msm8974 PLL support
ARM: dts: qcom: pm8941: add 5vs2 regulator node
ARM: dts: qcom: msm8974: add HDMI nodes
ARM: dts: qcom: msm8974-hammerhead: add support for external display
.../qcom-msm8974-lge-nexus5-hammerhead.dts | 142 ++++ arch/arm/boot/dts/qcom-msm8974.dtsi | 78 ++ arch/arm/boot/dts/qcom-pm8941.dtsi | 10 + drivers/gpu/drm/bridge/analogix-anx78xx.c | 33 + drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/hdmi/hdmi.h | 6 + drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 4 +- drivers/gpu/drm/msm/hdmi/hdmi_pll_8974.c | 684 ++++++++++++++++++ 8 files changed, 957 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_pll_8974.c
Signature · 6 lines
2.21.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
RFC PATCH v2 1/5 drm/bridge: analogix-anx78xx: add support for avdd33 regulator
Add support for the avdd33 regulator to the analogix-anx78xx driver. Note that the regulator is currently enabled during driver probe and disabled when the driver is removed. This is currently how the downstream MSM kernel sources do this.
Let's not merge this upstream for the mean time until I get the external display fully working on the Nexus 5 and then I can submit proper support then that powers down this regulator in the power off function.
---
Changes since v1:
- None
drivers/gpu/drm/bridge/analogix-anx78xx.c | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+)
drivers/gpu/drm/bridge/analogix-anx78xx.c +33 -0
@@ -56,6 +56,7 @@ static const u8 anx781x_i2c_addresses[] = {struct anx78xx_platform_data {struct regulator *dvdd10; +struct regulator *avdd33;struct gpio_desc *gpiod_hpd;struct gpio_desc *gpiod_pd;struct gpio_desc *gpiod_reset;
@@ -715,10 +716,42 @@ static int anx78xx_start(struct anx78xx *anx78xx)return err; } +static void anx78xx_disable_regulator_action (void *_data) +{ +struct anx78xx_platform_data *pdata = _data; + +regulator_disable (pdata->avdd33); +} +static int anx78xx_init_pdata (struct anx78xx *anx78xx) {struct anx78xx_platform_data *pdata = &anx78xx->pdata;struct device *dev = &anx78xx->client->dev; +int err; + +/* 3.3V digital core power regulator */ + pdata->avdd33 =devm_regulator_get (dev,"avdd33" ); +if (IS_ERR (pdata->avdd33)) { + err =PTR_ERR (pdata->avdd33); +if (err != -EPROBE_DEFER ) +DRM_ERROR ("avdd33 regulator not found\n" ); + +return err; + } + + err =regulator_enable (pdata->avdd33); +if (err) { +DRM_ERROR ("Failed to enable avdd33 regulator: %d\n" , err); +return err; + } + + err =devm_add_action (dev, anx78xx_disable_regulator_action, + pdata); +if (err <0 ) { +dev_err (dev,"Failed to setup regulator cleanup action %d\n" , + err); +return err; + }/* 1.0V digital core power regulator */ pdata->dvdd10 =devm_regulator_get (dev,"dvdd10" );
Signature · 6 lines
2.21.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Laurent Pinchart
reviewerRe: [PATCH RFC v2 1/5] drm/bridge: analogix-anx78xx: add support for avdd33 regulator
Hi Brian,
Thank you for the patch.
Quoted 8 lines · Brian Masney
Add support for the avdd33 regulator to the analogix-anx78xx driver. Note that the regulator is currently enabled during driver probe and disabled when the driver is removed. This is currently how the downstream MSM kernel sources do this.
Let's not merge this upstream for the mean time until I get the external display fully working on the Nexus 5 and then I can submit proper support then that powers down this regulator in the power off function.
Please then also update the corresponding DT bindings to describe the avdd33 supply.
Quoted 63 lines
Signed-off-by Brian Masney <[email protected]>---
Changes since v1:
- Nonedrivers/gpu/drm/bridge/analogix-anx78xx.c | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+)drivers/gpu/drm/bridge/analogix-anx78xx.c +33
-0@@ -56,6 +56,7 @@ static const u8 anx781x_i2c_addresses[] = {struct anx78xx_platform_data {struct regulator *dvdd10; +struct regulator *avdd33;struct gpio_desc *gpiod_hpd;struct gpio_desc *gpiod_pd;struct gpio_desc *gpiod_reset;@@ -715,10 +716,42 @@ static int anx78xx_start(struct anx78xx *anx78xx)return err; } +static void anx78xx_disable_regulator_action (void *_data) +{ +struct anx78xx_platform_data *pdata = _data; + +regulator_disable (pdata->avdd33); +} +static int anx78xx_init_pdata (struct anx78xx *anx78xx) {struct anx78xx_platform_data *pdata = &anx78xx->pdata;struct device *dev = &anx78xx->client->dev; +int err; + +/* 3.3V digital core power regulator */ + pdata->avdd33 =devm_regulator_get (dev,"avdd33" ); +if (IS_ERR (pdata->avdd33)) { + err =PTR_ERR (pdata->avdd33); +if (err != -EPROBE_DEFER ) +DRM_ERROR ("avdd33 regulator not found\n" ); + +return err; + } + + err =regulator_enable (pdata->avdd33); +if (err) { +DRM_ERROR ("Failed to enable avdd33 regulator: %d\n" , err); +return err; + } + + err =devm_add_action (dev, anx78xx_disable_regulator_action, + pdata); +if (err <0 ) { +dev_err (dev,"Failed to setup regulator cleanup action %d\n" , + err); +return err; + }/* 1.0V digital core power regulator */ pdata->dvdd10 =devm_regulator_get (dev,"dvdd10" );
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH v2 2/5 drm/msm/hdmi: add msm8974 PLL support
In reply to Brian MasneyAdd msm8974 Phase-Locked Loop (PLL) support to the MSM HDMI so that an external display can be used on this SoC.
---
Changes since v1:
- New patch introduced in v2
drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/hdmi/hdmi.h | 6 + drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 4 +- drivers/gpu/drm/msm/hdmi/hdmi_pll_8974.c | 684 +++++++++++++++++++++++ 4 files changed, 694 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_pll_8974.c
drivers/gpu/drm/msm/Makefile +1 -0
@@ -100,6 +100,7 @@ msm-$(CONFIG_DRM_MSM_GPU_STATE) += adreno/a6xx_gpu_state.o msm-$(CONFIG_DRM_FBDEV_EMULATION) += msm_fbdev.o msm-$(CONFIG_COMMON_CLK) += disp/mdp4/mdp4_lvds_pll.o msm-$(CONFIG_COMMON_CLK) += hdmi/hdmi_pll_8960.o +msm-$(CONFIG_COMMON_CLK) += hdmi/hdmi_pll_8974.o msm-$(CONFIG_COMMON_CLK) += hdmi/hdmi_phy_8996.o msm-$(CONFIG_DRM_MSM_HDMI_HDCP) += hdmi/hdmi_hdcp.o
drivers/gpu/drm/msm/hdmi/hdmi.h +6 -0
@@ -184,6 +184,7 @@ void __exit msm_hdmi_phy_driver_unregister(void);#ifdef CONFIG_COMMON_CLK int msm_hdmi_pll_8960_init (struct platform_device *pdev); +int msm_hdmi_pll_8974_init (struct platform_device *pdev);int msm_hdmi_pll_8996_init (struct platform_device *pdev);#else static inline int msm_hdmi_pll_8960_init (struct platform_device *pdev)
@@ -191,6 +192,11 @@ static inline int msm_hdmi_pll_8960_init(struct platform_device *pdev)return -ENODEV ; } +static inline int msm_hdmi_pll_8974_init (struct platform_device *pdev) +{ +return -ENODEV ; +} +static inline int msm_hdmi_pll_8996_init (struct platform_device *pdev) {return -ENODEV ;
drivers/gpu/drm/msm/hdmi/hdmi_phy.c +3 -1
@@ -123,6 +123,9 @@ static int msm_hdmi_phy_pll_init(struct platform_device *pdev,case MSM_HDMI_PHY_8960 : ret =msm_hdmi_pll_8960_init (pdev);break ; +case MSM_HDMI_PHY_8x74: + ret =msm_hdmi_pll_8974_init (pdev); +break ;case MSM_HDMI_PHY_8996 : ret =msm_hdmi_pll_8996_init (pdev);break ;
@@ -130,7 +133,6 @@ static int msm_hdmi_phy_pll_init(struct platform_device *pdev,* we don't have PLL support for these, don't report an error for now */ case MSM_HDMI_PHY_8x60: -case MSM_HDMI_PHY_8x74:default : ret =0 ;break ;
drivers/gpu/drm/msm/hdmi/hdmi_pll_8974.c new file +684 -0
684 lines not on this page · raw message
Signature · 6 lines
2.21.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
RFC PATCH v2 3/5 ARM: dts: qcom: pm8941: add 5vs2 regulator node
In reply to Brian Masneypm8941 is missing the 5vs2 regulator node so let's add it since its needed to get the external display working. This regulator was already configured in the interrupts property on the parent node.
Note that this regulator is referred to as mvs2 in the downstream MSM kernel sources.
---
Changes since v1:
- None
arch/arm/boot/dts/qcom-pm8941.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/qcom-pm8941.dtsi +10 -0
@@ -178,6 +178,16 @@ qcom,vs-soft-start-strength = <0>; regulator-initial-mode = <1>; }; + + pm8941_5vs2: 5vs2 { + regulator-enable-ramp-delay = <1000>; + regulator-pull-down; + regulator-over-current-protection; + qcom,ocp-max-retries = <10>; + qcom,ocp-retry-delay = <30>; + qcom,vs-soft-start-strength = <0>; + regulator-initial-mode = <1>; + }; }; }; };
Signature · 6 lines
2.21.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [PATCH RFC v2 3/5] ARM: dts: qcom: pm8941: add 5vs2 regulator node
Quoted 9 lines · Brian Masney
pm8941 is missing the 5vs2 regulator node so let's add it since its needed to get the external display working. This regulator was already configured in the interrupts property on the parent node.
Note that this regulator is referred to as mvs2 in the downstream MSM kernel sources.
Signed-off-by Brian Masney <[email protected]>Reviewed-by Linus Walleij <[email protected]>
Picked this patch for now, once the driver updates are landed I will take the last two dts patches.
Regards,
Bjorn
Quoted 31 lines
---
Changes since v1:
- Nonearch/arm/boot/dts/qcom-pm8941.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/boot/dts/qcom-pm8941.dtsi +10
-0@@ -178,6 +178,16 @@ qcom,vs-soft-start-strength = <0>; regulator-initial-mode = <1>; }; + + pm8941_5vs2: 5vs2 { + regulator-enable-ramp-delay = <1000>; + regulator-pull-down; + regulator-over-current-protection; + qcom,ocp-max-retries = <10>; + qcom,ocp-retry-delay = <30>; + qcom,vs-soft-start-strength = <0>; + regulator-initial-mode = <1>; + }; }; }; };Signature · 1 line
2.21.0
RFC PATCH v2 4/5 ARM: dts: qcom: msm8974: add HDMI nodes
In reply to Brian MasneyAdd HDMI tx and phy nodes to support an external display that can be connected over the SlimPort. This is based on work from Jonathan Marek.
---
Changes since v1:
- Add hdmi_pll to hdmi-phy node
- add power-domain to hdmi-phy per binding specification
- Remove FIXME comment regarding the hpd-gdsc-supply. I saw a recent post on linux-arm-msm that this is present for running the upstream MSM display driver on the downstream kernel.
arch/arm/boot/dts/qcom-msm8974.dtsi | 78 +++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+)
arch/arm/boot/dts/qcom-msm8974.dtsi +78 -0
@@ -1258,6 +1258,13 @@ port@0 { reg = <0>; + mdp5_intf3_out: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + + port@1 { + reg = <1>; mdp5_intf1_out: endpoint { remote-endpoint = <&dsi0_in>; };
@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface"; }; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; + + compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical"; + + interrupt-parent = <&mdss>; + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; + + power-domains = <&mmcc MDSS_GDSC>; + + clocks = <&mmcc MDSS_MDP_CLK>, + <&mmcc MDSS_AHB_CLK>, + <&mmcc MDSS_HDMI_CLK>, + <&mmcc MDSS_HDMI_AHB_CLK>, + <&mmcc MDSS_EXTPCLK_CLK>; + clock-names = "mdp_core", + "iface", + "core", + "alt_iface", + "extp"; + + hpd-5v-supply = <&pm8941_5vs2>; + core-vdda-supply = <&pm8941_l12>; + core-vcc-supply = <&pm8941_s3>; + + phys = <&hdmi_phy>; + phy-names = "hdmi_phy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + hdmi_in: endpoint { + remote-endpoint = <&mdp5_intf3_out>; + }; + }; + + port@1 { + reg = <1>; + }; + }; + }; + + hdmi_phy: hdmi-phy@fd922500 { + status = "disabled"; + + compatible = "qcom,hdmi-phy-8974"; + reg = <0xfd922500 0x7c>, + <0xfd922700 0xd4>; + reg-names = "hdmi_phy", + "hdmi_pll"; + + clocks = <&mmcc MDSS_AHB_CLK>, + <&mmcc MDSS_HDMI_AHB_CLK>; + clock-names = "iface", + "alt_iface"; + + core-vdda-supply = <&pm8941_l12>; + vddio-supply = <&pm8941_s3>; + + power-domains = <&mmcc MDSS_GDSC>; + + #phy-cells = <0>; + }; }; };
Signature · 6 lines
2.21.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [PATCH RFC v2 4/5] ARM: dts: qcom: msm8974: add HDMI nodes
Quoting Brian Masney (2019-10-06 18:45:08)
Quoted 7 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +0
-0@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface";
arch/arm/boot/dts/qcom-msm8974.dtsi line 1353
Quoted 10 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +9
-0}; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; + + compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical";
Is this the qfprom "uncorrected" physical address? If so, why can't this node use an nvmem to read whatever it needs out of the qfprom?
Quoted 6 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +6
-0+ + interrupt-parent = <&mdss>; + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; + + power-domains = <&mmcc MDSS_GDSC>; +
Re: [PATCH RFC v2 4/5] ARM: dts: qcom: msm8974: add HDMI nodes
Quoted 13 lines · Stephen Boyd
Quoting Brian Masney (2019-10-06 18:45:08)
Quoted 12 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +4
-0@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface"; }; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; +
Quoted 8 lines
arch/arm/boot/dts/qcom-msm8974.dtsi line 1353
Quoted 5 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +5
-0+ compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical";Is this the qfprom "uncorrected" physical address? If so, why can't this node use an nvmem to read whatever it needs out of the qfprom?
The MSM HDMI code is configured to look for this reg-name here:
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/msm/hdmi/hdmi.c#L582
There is a qcom,qfprom configured for this board in DTS, however its at a different address range, so maybe there are multiple qfproms?
https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/qcom-msm8974.dtsi#L424
msm8996.dtsi has the same style of configuration:
https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/qcom/msm8996.dtsi#L956
https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/qcom/msm8996.dtsi#L1736
Brian
Re: [PATCH RFC v2 4/5] ARM: dts: qcom: msm8974: add HDMI nodes
Quoting Brian Masney (2019-10-08 23:05:20)
Quoted 30 lines · Stephen Boyd
Quoted 13 lines
Quoting Brian Masney (2019-10-06 18:45:08)
Quoted 12 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +4
-0@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface"; }; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; +Quoted 8 lines
arch/arm/boot/dts/qcom-msm8974.dtsi line 1353
Quoted 5 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +5
-0+ compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical";Is this the qfprom "uncorrected" physical address? If so, why can't this node use an nvmem to read whatever it needs out of the qfprom?
The MSM HDMI code is configured to look for this reg-name here:
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/msm/hdmi/hdmi.c#L582
There is a qcom,qfprom configured for this board in DTS, however its at a different address range, so maybe there are multiple qfproms?
Quoted 7 lines
https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/qcom-msm8974.dtsi#L424
msm8996.dtsihas the same style of configuration:https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/qcom/msm8996.dtsi#L956
https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/qcom/msm8996.dtsi#L1736
There's only one qfprom and there's the address space that's "uncorrected" which is not supposed to be used and there's the space that is "corrected" and is supposed to be used. It looks like this is poking the uncorrected space and it should probably stop doing that and use the nvmem provider instead. Maybe someone with docs for this chip and 8996 can help confirm this.
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [PATCH RFC v2 4/5] ARM: dts: qcom: msm8974: add HDMI nodes
Quoted 39 lines · Stephen Boyd
Quoting Brian Masney (2019-10-08 23:05:20)
Quoted 30 lines · Stephen Boyd
Quoted 13 lines
Quoting Brian Masney (2019-10-06 18:45:08)
Quoted 12 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +4
-0@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface"; }; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; +Quoted 8 lines
arch/arm/boot/dts/qcom-msm8974.dtsi line 1353
Quoted 5 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +5
-0+ compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical";Is this the qfprom "uncorrected" physical address? If so, why can't this node use an nvmem to read whatever it needs out of the qfprom?
The MSM HDMI code is configured to look for this reg-name here:
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/msm/hdmi/hdmi.c#L582
There is a qcom,qfprom configured for this board in DTS, however its at a different address range, so maybe there are multiple qfproms?
Quoted 7 lines
https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/qcom-msm8974.dtsi#L424
msm8996.dtsihas the same style of configuration:https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/qcom/msm8996.dtsi#L956
https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/qcom/msm8996.dtsi#L1736
Quoted 6 lines
There's only one qfprom and there's the address space that's "uncorrected" which is not supposed to be used and there's the space that is "corrected" and is supposed to be used. It looks like this is poking the uncorrected space and it should probably stop doing that and use the nvmem provider instead. Maybe someone with docs for this chip and 8996 can help confirm this.
Do you know of any publicly-available documentation that describes the "uncorrected" and "corrected" addresses? I got that qfprom address for the HDMI from here:
https://github.com/AICP/kernel_lge_hammerhead/blob/n7.1/arch/arm/boot/dts/msm8974-mdss.dtsi#L101
I assume the downstream kernel probably doesn't have the corrected address anywhere else?
Brian
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH RFC v2 4/5] ARM: dts: qcom: msm8974: add HDMI nodes
Quoting Brian Masney (2019-10-08 23:05:20)
Quoted 30 lines · Stephen Boyd
Quoted 13 lines
Quoting Brian Masney (2019-10-06 18:45:08)
Quoted 12 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +4
-0@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface"; }; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; +Quoted 8 lines
arch/arm/boot/dts/qcom-msm8974.dtsi line 1353
Quoted 5 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +5
-0+ compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical";Is this the qfprom "uncorrected" physical address? If so, why can't this node use an nvmem to read whatever it needs out of the qfprom?
The MSM HDMI code is configured to look for this reg-name here:
There is a qcom,qfprom configured for this board in DTS, however its at a different address range, so maybe there are multiple qfproms?
Quoted 7 lines
msm8996.dtsihas the same style of configuration:https://secure-web.cisco.com/1rJa-0EPy0JlP-77k9dsB-DH2ZCq14Si9lknMNgsjQ1mU9AwMRl-fj_8DtwWfDAvntMcoFwbCHPQJNuwpC_KMHLcdm4FZ0RnRUtfz88pGXEjWTWienXj9Fl9TM0KoV4HkX0RA2sLF76j3KeyBIwZnG6VHLIPrLTpfAdhFSNZ8MmzdgZMypbVSO3IEPpA7zNP3qEQgyqE27tuAhH8y6QnexVkFPCjMcfHXi-vrbHNksoux0XR69MifJ4WmNUAkFtomCx_lJrx_op43jhFzOocBi8_enFUQYk_8w1qdGRx3GMasff9wNskI-437xlPDmEkikHiwGB8pOvvnE9E8mWJ_sgQxEVikyuLwGDD6KBINl-Tit6NNjkHDkS4YQP-FdZjAoOSzRXP7gOFeIhgCAdbka4VM_VCaqXhzcgWfCypMMh33r9tyK7STs3Pw0IICGZuYPbgt0P2Nrnd1R__OAmOhPQ/https%3A%2F%2Felixir.bootlin.com%2Flinux%2Flatest%2Fsource%2Farch%2Farm64%2Fboot%2Fdts%2Fqcom%2Fmsm8996.dtsi#L956
https://secure-web.cisco.com/1rJa-0EPy0JlP-77k9dsB-DH2ZCq14Si9lknMNgsjQ1mU9AwMRl-fj_8DtwWfDAvntMcoFwbCHPQJNuwpC_KMHLcdm4FZ0RnRUtfz88pGXEjWTWienXj9Fl9TM0KoV4HkX0RA2sLF76j3KeyBIwZnG6VHLIPrLTpfAdhFSNZ8MmzdgZMypbVSO3IEPpA7zNP3qEQgyqE27tuAhH8y6QnexVkFPCjMcfHXi-vrbHNksoux0XR69MifJ4WmNUAkFtomCx_lJrx_op43jhFzOocBi8_enFUQYk_8w1qdGRx3GMasff9wNskI-437xlPDmEkikHiwGB8pOvvnE9E8mWJ_sgQxEVikyuLwGDD6KBINl-Tit6NNjkHDkS4YQP-FdZjAoOSzRXP7gOFeIhgCAdbka4VM_VCaqXhzcgWfCypMMh33r9tyK7STs3Pw0IICGZuYPbgt0P2Nrnd1R__OAmOhPQ/https%3A%2F%2Felixir.bootlin.com%2Flinux%2Flatest%2Fsource%2Farch%2Farm64%2Fboot%2Fdts%2Fqcom%2Fmsm8996.dtsi#L1736
There's only one qfprom and there's the address space that's "uncorrected" which is not supposed to be used and there's the space that is "corrected" and is supposed to be used. It looks like this is poking the uncorrected space and it should probably stop doing that and use the nvmem provider instead. Maybe someone with docs for this chip and 8996 can help confirm this.
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [PATCH RFC v2 4/5] ARM: dts: qcom: msm8974: add HDMI nodes
In reply to Brian MasneyQuoting Brian Masney (2019-10-08 23:05:20)
Quoted 30 lines · Stephen Boyd
Quoted 13 lines
Quoting Brian Masney (2019-10-06 18:45:08)
Quoted 12 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +4
-0@@ -1335,6 +1342,77 @@ clocks = <&mmcc MDSS_AHB_CLK>; clock-names = "iface"; }; + + hdmi: hdmi-tx@fd922100 { + status = "disabled"; +Quoted 8 lines
arch/arm/boot/dts/qcom-msm8974.dtsi line 1353
Quoted 5 lines
arch/arm/boot/dts/qcom-msm8974.dtsi +5
-0+ compatible = "qcom,hdmi-tx-8974"; + reg = <0xfd922100 0x35c>, + <0xfc4b8000 0x60f0>; + reg-names = "core_physical", + "qfprom_physical";Is this the qfprom "uncorrected" physical address? If so, why can't this node use an nvmem to read whatever it needs out of the qfprom?
The MSM HDMI code is configured to look for this reg-name here:
There is a qcom,qfprom configured for this board in DTS, however its at a different address range, so maybe there are multiple qfproms?
Quoted 7 lines
msm8996.dtsihas the same style of configuration:https://secure-web.cisco.com/1rJa-0EPy0JlP-77k9dsB-DH2ZCq14Si9lknMNgsjQ1mU9AwMRl-fj_8DtwWfDAvntMcoFwbCHPQJNuwpC_KMHLcdm4FZ0RnRUtfz88pGXEjWTWienXj9Fl9TM0KoV4HkX0RA2sLF76j3KeyBIwZnG6VHLIPrLTpfAdhFSNZ8MmzdgZMypbVSO3IEPpA7zNP3qEQgyqE27tuAhH8y6QnexVkFPCjMcfHXi-vrbHNksoux0XR69MifJ4WmNUAkFtomCx_lJrx_op43jhFzOocBi8_enFUQYk_8w1qdGRx3GMasff9wNskI-437xlPDmEkikHiwGB8pOvvnE9E8mWJ_sgQxEVikyuLwGDD6KBINl-Tit6NNjkHDkS4YQP-FdZjAoOSzRXP7gOFeIhgCAdbka4VM_VCaqXhzcgWfCypMMh33r9tyK7STs3Pw0IICGZuYPbgt0P2Nrnd1R__OAmOhPQ/https%3A%2F%2Felixir.bootlin.com%2Flinux%2Flatest%2Fsource%2Farch%2Farm64%2Fboot%2Fdts%2Fqcom%2Fmsm8996.dtsi#L956
https://secure-web.cisco.com/1rJa-0EPy0JlP-77k9dsB-DH2ZCq14Si9lknMNgsjQ1mU9AwMRl-fj_8DtwWfDAvntMcoFwbCHPQJNuwpC_KMHLcdm4FZ0RnRUtfz88pGXEjWTWienXj9Fl9TM0KoV4HkX0RA2sLF76j3KeyBIwZnG6VHLIPrLTpfAdhFSNZ8MmzdgZMypbVSO3IEPpA7zNP3qEQgyqE27tuAhH8y6QnexVkFPCjMcfHXi-vrbHNksoux0XR69MifJ4WmNUAkFtomCx_lJrx_op43jhFzOocBi8_enFUQYk_8w1qdGRx3GMasff9wNskI-437xlPDmEkikHiwGB8pOvvnE9E8mWJ_sgQxEVikyuLwGDD6KBINl-Tit6NNjkHDkS4YQP-FdZjAoOSzRXP7gOFeIhgCAdbka4VM_VCaqXhzcgWfCypMMh33r9tyK7STs3Pw0IICGZuYPbgt0P2Nrnd1R__OAmOhPQ/https%3A%2F%2Felixir.bootlin.com%2Flinux%2Flatest%2Fsource%2Farch%2Farm64%2Fboot%2Fdts%2Fqcom%2Fmsm8996.dtsi#L1736
There's only one qfprom and there's the address space that's "uncorrected" which is not supposed to be used and there's the space that is "corrected" and is supposed to be used. It looks like this is poking the uncorrected space and it should probably stop doing that and use the nvmem provider instead. Maybe someone with docs for this chip and 8996 can help confirm this.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH v2 5/5 ARM: dts: qcom: msm8974-hammerhead: add support for external display
In reply to Brian MasneyAdd HDMI nodes and other supporting infrastructure in order to support the external display. This is based on work from Jonathan Marek.
---
Changes since v1:
- Regulators always on as a temporary haack.
- Hot plug detect pin for the HDMI bridge needs to be low.
.../qcom-msm8974-lge-nexus5-hammerhead.dts | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+)
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +142 -0
@@ -235,6 +235,36 @@ pinctrl-names = "default"; pinctrl-0 = <&wlan_regulator_pin>; }; + + anx_avdd33: avdd33 { + compatible = "regulator-fixed"; + + regulator-name = "avdd-3p3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; // FIXME + + gpio = <&pm8941_gpios 26 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&anx_avdd33_pin>; + }; + + anx_vdd10: vdd10 { + compatible = "regulator-fixed"; + + regulator-name = "vdd-1p0"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; // FIXME + + gpio = <&pm8941_gpios 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&anx_vdd10_pin>; + }; }; &soc {
@@ -371,6 +401,40 @@ function = "gpio"; }; }; + + hdmi_pin: hdmi { + cec { + pins = "gpio31"; + function = "hdmi_cec"; + }; + + ddc { + pins = "gpio32", "gpio33"; + function = "hdmi_ddc"; + }; + + hpd { + pins = "gpio34"; + function = "hdmi_hpd"; + }; + }; + + anx_msm_pin: anx { + irq { + pins = "gpio28"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + input-enable; + }; + + reset { + pins = "gpio68"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; }; vibrator@fd8c3450 {
@@ -471,6 +535,28 @@ default-brightness = <200>; }; }; + + anx7808@72 { + compatible = "analogix,anx7808"; + reg = <0x72>; + interrupts-extended = <&msmgpio 28 IRQ_TYPE_EDGE_RISING>; + + hpd-gpios = <&pm8941_gpios 13 GPIO_ACTIVE_LOW>; + pd-gpios = <&pm8941_gpios 14 GPIO_ACTIVE_HIGH>; + reset-gpios = <&msmgpio 68 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&anx_msm_pin>, <&anx_pin>; + + dvdd10-supply = <&anx_vdd10>; + avdd33-supply = <&anx_avdd33>; + + port { + anx7808_in: endpoint { + remote-endpoint = <&hdmi_out>; + }; + }; + }; }; i2c@f9968000 {
@@ -664,6 +750,29 @@ vddio-supply = <&pm8941_l12>; }; + + hdmi-tx@fd922100 { + status = "ok"; + + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pin>; + + qcom,hdmi-tx-ddc-clk = <&msmgpio 32 GPIO_ACTIVE_HIGH>; + qcom,hdmi-tx-ddc-data = <&msmgpio 33 GPIO_ACTIVE_HIGH>; + qcom,hdmi-tx-hpd = <&msmgpio 34 GPIO_ACTIVE_HIGH>; + + ports { + port@1 { + hdmi_out: endpoint { + remote-endpoint = <&anx7808_in>; + }; + }; + }; + }; + + hdmi-phy@fd922500 { + status = "ok"; + }; }; };
@@ -700,6 +809,39 @@ output-high; line-name = "otg-gpio"; }; + + anx_pin: anx { + cbldet { + pins = "gpio13"; + function = "normal"; + input-enable; + bias-pull-down; + power-source = <PM8941_GPIO_S3>; + }; + + pd { + pins = "gpio14"; + function = "normal"; + bias-disable; + power-source = <PM8941_GPIO_S3>; + }; + }; + + anx_avdd33_pin: anxvdd3 { + pins = "gpio26"; + function = "normal"; + + bias-disable; + power-source = <PM8941_GPIO_S3>; + }; + + anx_vdd10_pin: anxvdd1 { + pins = "gpio8"; + function = "normal"; + + bias-disable; + power-source = <PM8941_GPIO_S3>; + }; }; }; };
Signature · 6 lines
2.21.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [PATCH RFC v2 5/5] ARM: dts: qcom: msm8974-hammerhead: add support for external display
Quoting Brian Masney (2019-10-06 18:45:09)
Quoted 20 lines
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +12
-0@@ -371,6 +401,40 @@ function = "gpio"; }; }; + + hdmi_pin: hdmi { + cec { + pins = "gpio31"; + function = "hdmi_cec"; + }; + + ddc { + pins = "gpio32", "gpio33"; + function = "hdmi_ddc"; + }; +
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts line 425
Quoted 10 lines
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +10
-0+ hpd { + pins = "gpio34"; + function = "hdmi_hpd"; + }; + }; + + anx_msm_pin: anx { + irq { + pins = "gpio28"; + function = "gpio";
Is function = "gpio" necessary anymore? I thought we would turn gpios into gpio function when it's requested as a gpio by some consumer.
Quoted 15 lines
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +12
-0+ drive-strength = <8>; + bias-pull-up; + input-enable; + }; + + reset { + pins = "gpio68"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + }; }; vibrator@fd8c3450 {