* [PATCH v15 0/5] Rockchip Type-C DisplayPort driver
@ 2016-09-10 2:15 Chris Zhong
[not found] ` <1473473748-22331-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-09-10 2:15 ` [PATCH v15 5/5] ASoC: rockchip: Add DP dai-links to the rk3399-gru machine driver Chris Zhong
0 siblings, 2 replies; 5+ messages in thread
From: Chris Zhong @ 2016-09-10 2:15 UTC (permalink / raw)
To: dianders-F7+t8E8rja9g9hUCZPvPmw, tfiga-F7+t8E8rja9g9hUCZPvPmw,
heiko-4mtYJXux2i+zQB+pC5nmwQ, yzq-TNX95d0MmH7DzftRWevZcw,
groeck-F7+t8E8rja9g9hUCZPvPmw,
myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ,
cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, wulf-TNX95d0MmH7DzftRWevZcw,
marcheu-F7+t8E8rja9g9hUCZPvPmw,
briannorris-F7+t8E8rja9g9hUCZPvPmw,
zhengxing-TNX95d0MmH7DzftRWevZcw, cychiang-F7+t8E8rja9g9hUCZPvPmw,
hychao-F7+t8E8rja9g9hUCZPvPmw, broonie-DgEjT+Ai2ygdnm+yROfE0A
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chris Zhong,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Kumar Gala,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Ian Campbell,
Rob Herring, David Airlie, Pawel Moll,
devicetree-u79uwXL29TY76Z2rM5mHXA, Takashi Iwai, Liam Girdwood,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Jaroslav Kysela, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Mark Yao,
Mark Rutland
Hi all
This series patch is for rockchip Type-C DisplayPort controller driver.
The USB Type-C PHY is designed to support the USB3 and DP applications.
The PHY basically has two main components: USB3 and DisplyPort. USB3
operates in SuperSpeed mode and the DP can operate at RBR, HBR and HBR2
data rates. The Type-C cable orientation detection and Power Delivery
(PD) is accomplished using a PD PHY or a exernal PD chip.
The DP controller is compliant with DisplayPort Specification,
Version 1.3, This IP is compatible with the rockchip type-c PHY IP.
There is a uCPU in DP controller, it need a firmware to work, please
put the firmware file[0] rockchip/dptx.bin to
/lib/firmware/rockchip/dptx.bin. The uCPU in charge of aux communication
and link training, the host use mailbox to communicate with the ucpu.
The DP contoller has register a notification with extcon API, to get the
alt mode from PD, the PD driver need call the devm_extcon_dev_allocate
to create a extcon device and use extcon_set_state to notify DP
controller. And call extcon_set_cable_property to set orientation.
About the DP audio, cdn-dp registered 2 DAIs: 0 is I2S, 1 is SPDIF.
We can reference them in rk3399-gru machine driver. It base on the
hdmi-notify patches[1], they are both in reviewing.
This series is based on Mark Yao's branch[2], the extcon API backport
from linux-next[3].
I test this patches on the rk3399-evb board, with a fusb302 driver,
this branch has no rk3399.dtsi, so the patch about dts is not included
in this series.
>From V9, the Type-C PHY is split into two PHYs: DP and USB3. The PHY
will be init, no matter which PHY be power_on. The DP module will
enter A2 mode (standby mode) after phy_init, if DP PHY is powered on,
the DP module will enter to A0 mode(running mode). Then if DP PHY is
powered off, DP module will back to A2 mode. If everything is
un-plugged, phy will be deinit.
[0]
kernel/git/firmware/linux-firmware.git
[1]
https://patchwork.kernel.org/patch/8887261/
https://patchwork.kernel.org/patch/8887251/
[2]
https://github.com/markyzq/kernel-drm-rockchip/tree/drm-rockchip-next-2016-05-23
[3]
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
Changes in v15:
Chris Zhong's changes:
- fix disable phy unbalance
- support Apple Dock hot-plug in HDMI port
- retraining when Apple Dock hpd irq coming
Sean Paul's changes:
- Restructured the worker
- Synchronized between worker & drm hooks
- Properly implemented enable/disable
- Added error checking
- Use devm variant of extcon
- Use DRM_DEV_* logging
- Refactored code to (hopefully) be more clear
Changes in v14:
- Modify some grammatical errors
- remove the mutex around cdn_dp_audio_get_eld
- power on the power domain after clk_enable
- retry to read edid
- change super speed property name to EXTCON_PROP_USB_SS
- do a correct mode_valid check when bpc is 0
Changes in v13:
- add dptx and apb reset
- support suspend/resume
- switch power domain dynamically
- re-training when hpd signal is triggered
Changes in v12:
- use EXTCON_PROP_USB_SUPERSPEED to replace EXTCON_USB_HOST
Changes in v11:
- refer dp phy
- add best_encoder back, since it required by drm_atomic_helper_check
Changes in v10:
- add pclk_vio_grf clock
- remove best_encoder ops
- support read sink count from DPCD
- control the grf_clk in DP
Changes in v9:
- modify the reference phy = <&tcphy0 0>, <&tcphy1 0>;
- do not need reset the phy before power_on
- add a orientation information for set_capability
- retry to read dpcd in 10 seconds
Changes in v8:
- optimization the err log
Changes in v7:
- support firmware standby when no dptx connection
- optimization the calculation of tu size and valid symbol
Changes in v6:
- add assigned-clocks and assigned-clock-rates
- add power-domains
- add a port struct
- select SND_SOC_HDMI_CODEC
- force reset the phy when hpd detected
Changes in v5:
- alphabetical order
- do not use long, use u32 or u64
- return MODE_CLOCK_HIGH when requested > actual
- Optimized Coding Style
- add a formula to get better tu size and symbol value.
- modify according to Sean Paul's comments
- fixed the fw_wait always 0
Changes in v4:
- add a reset node
- support 2 phys
- use phy framework to control DP phy
- support 2 phys
Changes in v3:
- add SoC specific compatible string
- remove reg = <1>;
- use EXTCON_DISP_DP and EXTCON_DISP_DP_ALT cable to get dp port state.
- reset spdif before config it
- modify the firmware clk to 100Mhz
- retry load firmware if fw file is requested too early
- change spdif to i2s2
Changes in v2:
- Alphabetic order
- remove excess error message
- use define clk_rate
- check all return value
- remove dev_set_name(dp->dev, "cdn-dp");
- use schedule_delayed_work
- remove never-called functions
- remove some unnecessary ()
- correct the commit message
Changes in v1:
- add extcon node description
- add #sound-dai-cells description
- use extcon API
- use hdmi-codec for the DP Asoc
- do not initialize the "ret"
- printk a err log when drm_of_encoder_active_endpoint_id
- modify the dclk pin_pol to a single line
Chris Zhong (5):
extcon: Introduce EXTCON_PROP_DISP_HPD property
Documentation: bindings: add dt documentation for cdn DP controller
drm/rockchip: cdn-dp: add cdn DP support for rk3399
drm/rockchip: cdn-dp: support audio hot-plug
ASoC: rockchip: Add DP dai-links to the rk3399-gru machine driver
.../bindings/display/rockchip/cdn-dp-rockchip.txt | 75 ++
.../bindings/sound/rockchip,rk3399-gru-sound.txt | 11 +-
drivers/gpu/drm/rockchip/Kconfig | 10 +
drivers/gpu/drm/rockchip/Makefile | 1 +
drivers/gpu/drm/rockchip/cdn-dp-core.c | 1165 ++++++++++++++++++++
drivers/gpu/drm/rockchip/cdn-dp-core.h | 108 ++
drivers/gpu/drm/rockchip/cdn-dp-reg.c | 956 ++++++++++++++++
drivers/gpu/drm/rockchip/cdn-dp-reg.h | 482 ++++++++
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 13 +-
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 9 +
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +
include/linux/extcon.h | 14 +-
sound/soc/rockchip/rk3399_gru_sound.c | 93 ++
13 files changed, 2930 insertions(+), 9 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
create mode 100644 drivers/gpu/drm/rockchip/cdn-dp-core.c
create mode 100644 drivers/gpu/drm/rockchip/cdn-dp-core.h
create mode 100644 drivers/gpu/drm/rockchip/cdn-dp-reg.c
create mode 100644 drivers/gpu/drm/rockchip/cdn-dp-reg.h
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v15 2/5] Documentation: bindings: add dt documentation for cdn DP controller
[not found] ` <1473473748-22331-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-09-10 2:15 ` Chris Zhong
[not found] ` <1473473748-22331-3-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Chris Zhong @ 2016-09-10 2:15 UTC (permalink / raw)
To: dianders-F7+t8E8rja9g9hUCZPvPmw, tfiga-F7+t8E8rja9g9hUCZPvPmw,
heiko-4mtYJXux2i+zQB+pC5nmwQ, yzq-TNX95d0MmH7DzftRWevZcw,
groeck-F7+t8E8rja9g9hUCZPvPmw,
myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ,
cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, wulf-TNX95d0MmH7DzftRWevZcw,
marcheu-F7+t8E8rja9g9hUCZPvPmw,
briannorris-F7+t8E8rja9g9hUCZPvPmw,
zhengxing-TNX95d0MmH7DzftRWevZcw, cychiang-F7+t8E8rja9g9hUCZPvPmw,
hychao-F7+t8E8rja9g9hUCZPvPmw, broonie-DgEjT+Ai2ygdnm+yROfE0A
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chris Zhong,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Rob Herring,
Pawel Moll, Mark Rutland,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
This patch adds a binding that describes the cdn DP controller for
rk3399.
Signed-off-by: Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Reviewed-by: Guenter Roeck <groeck-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
Changes in v15: None
Changes in v14: None
Changes in v13:
- add dptx and apb reset
Changes in v12: None
Changes in v11:
- refer dp phy
Changes in v10:
- add pclk_vio_grf clock
Changes in v9:
- modify the reference phy = <&tcphy0 0>, <&tcphy1 0>;
Changes in v8: None
Changes in v7: None
Changes in v6:
- add assigned-clocks and assigned-clock-rates
- add power-domains
Changes in v5: None
Changes in v4:
- add a reset node
- support 2 phys
Changes in v3:
- add SoC specific compatible string
- remove reg = <1>;
Changes in v2: None
Changes in v1:
- add extcon node description
- add #sound-dai-cells description
.../bindings/display/rockchip/cdn-dp-rockchip.txt | 75 ++++++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
diff --git a/Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
new file mode 100644
index 0000000..9bd2c13
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
@@ -0,0 +1,75 @@
+Rockchip RK3399 specific extensions to the cdn Display Port
+================================
+
+Required properties:
+- compatible: must be "rockchip,rk3399-cdn-dp"
+
+- reg: physical base address of the controller and length
+
+- clocks: from common clock binding: handle to dp clock.
+
+- clock-names: from common clock binding:
+ Required elements: "core-clk" "pclk" "spdif" "grf"
+
+- resets : a list of phandle + reset specifier pairs
+- reset-names : string reset name, must be:
+ "spdif", "dptx", "apb".
+- power-domains : power-domain property defined with a phandle
+ to respective power domain.
+- assigned-clocks: main clock, should be <&cru SCLK_DP_CORE>
+- assigned-clock-rates : the DP core clk frequency, shall be: 100000000
+
+- rockchip,grf: this soc should set GRF regs, so need get grf here.
+
+- ports: contain a port nodes with endpoint definitions as defined in
+ Documentation/devicetree/bindings/media/video-interfaces.txt.
+ contained 2 endpoints, connecting to the output of vop.
+
+- phys: from general PHY binding: the phandle for the PHY device.
+
+- extcon: extcon specifier for the Power Delivery
+
+- #sound-dai-cells = it must be 1 if your system is using 2 DAIs: I2S, SPDIF
+
+-------------------------------------------------------------------------------
+
+Example:
+ cdn_dp: dp@fec00000 {
+ compatible = "rockchip,rk3399-cdn-dp";
+ reg = <0x0 0xfec00000 0x0 0x100000>;
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>,
+ <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>;
+ clock-names = "core-clk", "pclk", "spdif", "grf";
+ assigned-clocks = <&cru SCLK_DP_CORE>;
+ assigned-clock-rates = <100000000>;
+ power-domains = <&power RK3399_PD_HDCP>;
+ phys = <&tcphy0_dp>, <&tcphy1_dp>;
+ resets = <&cru SRST_DPTX_SPDIF_REC>, <&cru SRST_P_UPHY0_DPTX>,
+ <&cru SRST_P_UPHY0_APB>;
+ reset-names = "spdif", "dptx", "apb";
+ extcon = <&fusb0>, <&fusb1>;
+ rockchip,grf = <&grf>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dp_in: port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ dp_in_vopb: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&vopb_out_dp>;
+ };
+
+ dp_in_vopl: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&vopl_out_dp>;
+ };
+ };
+ };
+ };
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v15 5/5] ASoC: rockchip: Add DP dai-links to the rk3399-gru machine driver
2016-09-10 2:15 [PATCH v15 0/5] Rockchip Type-C DisplayPort driver Chris Zhong
[not found] ` <1473473748-22331-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-09-10 2:15 ` Chris Zhong
[not found] ` <1473473748-22331-6-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Chris Zhong @ 2016-09-10 2:15 UTC (permalink / raw)
To: dianders, tfiga, heiko, yzq, groeck, myungjoo.ham, cw00.choi,
wulf, marcheu, briannorris, zhengxing, cychiang, hychao, broonie
Cc: linux-rockchip, Chris Zhong, Jaroslav Kysela, devicetree,
alsa-devel, Liam Girdwood, Kumar Gala, linux-kernel, Ian Campbell,
Takashi Iwai, Rob Herring, Pawel Moll, Mark Rutland,
linux-arm-kernel
This patch adds DP audio output support to the rk3399-gru machine
driver.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---
Changes in v15: None
Changes in v14: None
Changes in v13: None
Changes in v12: None
Changes in v11: None
Changes in v10: None
Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3:
- change spdif to i2s2
Changes in v2:
- correct the commit message
Changes in v1: None
.../bindings/sound/rockchip,rk3399-gru-sound.txt | 11 +--
sound/soc/rockchip/rk3399_gru_sound.c | 93 ++++++++++++++++++++++
2 files changed, 99 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
index f19b6c8..83af540 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
@@ -1,15 +1,16 @@
-ROCKCHIP with MAX98357A/RT5514/DA7219 codecs on GRU boards
+ROCKCHIP with MAX98357A/RT5514/DA7219 codecs and DP via spdif on GRU boards
Required properties:
- compatible: "rockchip,rk3399-gru-sound"
-- rockchip,cpu: The phandle of the Rockchip I2S controller that's
+- rockchip,cpu: The phandle of the Rockchip I2S controller controller that's
connected to the codecs
-- rockchip,codec: The phandle of the MAX98357A/RT5514/DA7219 codecs
+- rockchip,codec: The phandle of the MAX98357A/RT5514/DA7219 codecs and of the
+ DP encoder node
Example:
sound {
compatible = "rockchip,rk3399-gru-sound";
- rockchip,cpu = <&i2s0>;
- rockchip,codec = <&max98357a &rt5514 &da7219>;
+ rockchip,cpu = <&i2s0 &i2s2>;
+ rockchip,codec = <&max98357a &rt5514 &da7219 &cdn_dp>;
};
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c
index 164b6da..d9aa2e0 100644
--- a/sound/soc/rockchip/rk3399_gru_sound.c
+++ b/sound/soc/rockchip/rk3399_gru_sound.c
@@ -25,6 +25,7 @@
#include <linux/spi/spi.h>
#include <sound/core.h>
#include <sound/jack.h>
+#include <sound/hdmi-codec.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -214,6 +215,65 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+
+static int rockchip_sound_cdndp_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+ struct snd_soc_dai *codec_dai = rtd->codec_dai;
+ int mclk, ret;
+
+ /* in bypass mode, the mclk has to be one of the frequencies below */
+ switch (params_rate(params)) {
+ case 8000:
+ case 16000:
+ case 24000:
+ case 32000:
+ case 48000:
+ case 64000:
+ case 96000:
+ mclk = 12288000;
+ break;
+ case 11025:
+ case 22050:
+ case 44100:
+ case 88200:
+ mclk = 11289600;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk,
+ SND_SOC_CLOCK_OUT);
+ if (ret < 0) {
+ dev_err(codec_dai->dev, "Can't set cpu clock out %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+static struct snd_soc_jack cdn_dp_card_jack;
+
+static int rockchip_sound_cdndp_init(struct snd_soc_pcm_runtime *runtime)
+{
+ struct snd_soc_card *card = runtime->card;
+ struct snd_soc_codec *codec = runtime->codec;
+ int ret;
+
+ /* enable jack detection */
+ ret = snd_soc_card_jack_new(card, "DP Jack", SND_JACK_LINEOUT,
+ &cdn_dp_card_jack, NULL, 0);
+ if (ret) {
+ dev_err(card->dev, "Can't new DP Jack %d\n", ret);
+ return ret;
+ }
+
+ return hdmi_codec_set_jack_detect(codec, &cdn_dp_card_jack);
+}
+
static struct snd_soc_ops rockchip_sound_max98357a_ops = {
.hw_params = rockchip_sound_max98357a_hw_params,
};
@@ -226,10 +286,15 @@ static struct snd_soc_ops rockchip_sound_da7219_ops = {
.hw_params = rockchip_sound_da7219_hw_params,
};
+static struct snd_soc_ops rockchip_sound_cdndp_ops = {
+ .hw_params = rockchip_sound_cdndp_hw_params,
+};
+
enum {
DAILINK_MAX98357A,
DAILINK_RT5514,
DAILINK_DA7219,
+ DAILINK_CDNDP,
DAILINK_RT5514_DSP,
};
@@ -264,6 +329,15 @@ static struct snd_soc_dai_link rockchip_dailinks[] = {
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
},
+ [DAILINK_CDNDP] = {
+ .name = "DP",
+ .stream_name = "DP PCM",
+ .codec_dai_name = "i2s-hifi",
+ .init = rockchip_sound_cdndp_init,
+ .ops = &rockchip_sound_cdndp_ops,
+ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBS_CFS,
+ },
/* RT5514 DSP for voice wakeup via spi bus */
[DAILINK_RT5514_DSP] = {
.name = "RT5514 DSP",
@@ -334,6 +408,25 @@ static int rockchip_sound_probe(struct platform_device *pdev)
return -ENODEV;
}
+ cpu_node = of_parse_phandle(pdev->dev.of_node, "rockchip,cpu", 1);
+ if (!cpu_node) {
+ dev_err(&pdev->dev, "Property 'rockchip,cpu 1' missing or invalid\n");
+ return -EINVAL;
+ }
+
+ rockchip_dailinks[DAILINK_CDNDP].platform_of_node = cpu_node;
+ rockchip_dailinks[DAILINK_CDNDP].cpu_of_node = cpu_node;
+
+ rockchip_dailinks[DAILINK_CDNDP].codec_of_node =
+ of_parse_phandle(pdev->dev.of_node, "rockchip,codec",
+ DAILINK_CDNDP);
+ if (!rockchip_dailinks[DAILINK_CDNDP].codec_of_node) {
+ dev_err(&pdev->dev,
+ "Property[%d] 'rockchip,codec' missing or invalid\n",
+ DAILINK_CDNDP);
+ return -EINVAL;
+ }
+
rockchip_dailinks[DAILINK_RT5514_DSP].cpu_name = kstrdup_const(dev_name(dev), GFP_KERNEL);
rockchip_dailinks[DAILINK_RT5514_DSP].cpu_dai_name = kstrdup_const(dev_name(dev), GFP_KERNEL);
rockchip_dailinks[DAILINK_RT5514_DSP].platform_name = kstrdup_const(dev_name(dev), GFP_KERNEL);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v15 5/5] ASoC: rockchip: Add DP dai-links to the rk3399-gru machine driver
[not found] ` <1473473748-22331-6-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-09-19 21:37 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2016-09-19 21:37 UTC (permalink / raw)
To: Chris Zhong
Cc: dianders-F7+t8E8rja9g9hUCZPvPmw, tfiga-F7+t8E8rja9g9hUCZPvPmw,
heiko-4mtYJXux2i+zQB+pC5nmwQ, yzq-TNX95d0MmH7DzftRWevZcw,
groeck-F7+t8E8rja9g9hUCZPvPmw,
myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ,
cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, wulf-TNX95d0MmH7DzftRWevZcw,
marcheu-F7+t8E8rja9g9hUCZPvPmw,
briannorris-F7+t8E8rja9g9hUCZPvPmw,
zhengxing-TNX95d0MmH7DzftRWevZcw, cychiang-F7+t8E8rja9g9hUCZPvPmw,
hychao-F7+t8E8rja9g9hUCZPvPmw, broonie-DgEjT+Ai2ygdnm+yROfE0A,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jaroslav Kysela,
devicetree-u79uwXL29TY76Z2rM5mHXA,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Liam Girdwood, Kumar Gala,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Takashi Iwai,
Pawel Moll, Mark Rutland,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Fri, Sep 09, 2016 at 07:15:48PM -0700, Chris Zhong wrote:
> This patch adds DP audio output support to the rk3399-gru machine
> driver.
>
> Signed-off-by: Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>
> Changes in v15: None
> Changes in v14: None
> Changes in v13: None
> Changes in v12: None
> Changes in v11: None
> Changes in v10: None
> Changes in v9: None
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3:
> - change spdif to i2s2
>
> Changes in v2:
> - correct the commit message
>
> Changes in v1: None
>
> .../bindings/sound/rockchip,rk3399-gru-sound.txt | 11 +--
> sound/soc/rockchip/rk3399_gru_sound.c | 93 ++++++++++++++++++++++
> 2 files changed, 99 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
> index f19b6c8..83af540 100644
> --- a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
> +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
> @@ -1,15 +1,16 @@
> -ROCKCHIP with MAX98357A/RT5514/DA7219 codecs on GRU boards
> +ROCKCHIP with MAX98357A/RT5514/DA7219 codecs and DP via spdif on GRU boards
>
> Required properties:
> - compatible: "rockchip,rk3399-gru-sound"
> -- rockchip,cpu: The phandle of the Rockchip I2S controller that's
> +- rockchip,cpu: The phandle of the Rockchip I2S controller controller that's
Huh?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v15 2/5] Documentation: bindings: add dt documentation for cdn DP controller
[not found] ` <1473473748-22331-3-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-02-27 17:27 ` Enric Balletbo Serra
0 siblings, 0 replies; 5+ messages in thread
From: Enric Balletbo Serra @ 2017-02-27 17:27 UTC (permalink / raw)
To: Chris Zhong
Cc: Mark Rutland, Heiko Stübner, Doug Anderson,
wulf-TNX95d0MmH7DzftRWevZcw, Guenter Roeck,
hychao-F7+t8E8rja9g9hUCZPvPmw, cychiang-F7+t8E8rja9g9hUCZPvPmw,
zhengxing-TNX95d0MmH7DzftRWevZcw,
cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, Brian Norris,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pawel Moll,
Ian Campbell, yzq-TNX95d0MmH7DzftRWevZcw, Mark Brown,
marcheu-F7+t8E8rja9g9hUCZPvPmw,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
mark.yao-TNX95d0MmH7DzftRWevZcw, linux-kernel,
tfiga-F7+t8E8rja9g9hUCZPvPmw, Rob Herring, Kumar Gala
Hi all,
2016-09-10 4:15 GMT+02:00 Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>:
> This patch adds a binding that describes the cdn DP controller for
> rk3399.
>
> Signed-off-by: Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reviewed-by: Guenter Roeck <groeck-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>
> ---
>
> Changes in v15: None
> Changes in v14: None
> Changes in v13:
> - add dptx and apb reset
>
> Changes in v12: None
> Changes in v11:
> - refer dp phy
>
> Changes in v10:
> - add pclk_vio_grf clock
>
> Changes in v9:
> - modify the reference phy = <&tcphy0 0>, <&tcphy1 0>;
>
> Changes in v8: None
> Changes in v7: None
> Changes in v6:
> - add assigned-clocks and assigned-clock-rates
> - add power-domains
>
> Changes in v5: None
> Changes in v4:
> - add a reset node
> - support 2 phys
>
> Changes in v3:
> - add SoC specific compatible string
> - remove reg = <1>;
>
> Changes in v2: None
> Changes in v1:
> - add extcon node description
> - add #sound-dai-cells description
>
> .../bindings/display/rockchip/cdn-dp-rockchip.txt | 75 ++++++++++++++++++++++
> 1 file changed, 75 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
>
> diff --git a/Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
> new file mode 100644
> index 0000000..9bd2c13
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/rockchip/cdn-dp-rockchip.txt
> @@ -0,0 +1,75 @@
> +Rockchip RK3399 specific extensions to the cdn Display Port
> +================================
> +
> +Required properties:
> +- compatible: must be "rockchip,rk3399-cdn-dp"
> +
> +- reg: physical base address of the controller and length
> +
> +- clocks: from common clock binding: handle to dp clock.
> +
> +- clock-names: from common clock binding:
> + Required elements: "core-clk" "pclk" "spdif" "grf"
> +
> +- resets : a list of phandle + reset specifier pairs
> +- reset-names : string reset name, must be:
> + "spdif", "dptx", "apb".
> +- power-domains : power-domain property defined with a phandle
> + to respective power domain.
> +- assigned-clocks: main clock, should be <&cru SCLK_DP_CORE>
> +- assigned-clock-rates : the DP core clk frequency, shall be: 100000000
> +
> +- rockchip,grf: this soc should set GRF regs, so need get grf here.
> +
> +- ports: contain a port nodes with endpoint definitions as defined in
> + Documentation/devicetree/bindings/media/video-interfaces.txt.
> + contained 2 endpoints, connecting to the output of vop.
> +
> +- phys: from general PHY binding: the phandle for the PHY device.
> +
> +- extcon: extcon specifier for the Power Delivery
> +
> +- #sound-dai-cells = it must be 1 if your system is using 2 DAIs: I2S, SPDIF
> +
> +-------------------------------------------------------------------------------
> +
> +Example:
> + cdn_dp: dp@fec00000 {
> + compatible = "rockchip,rk3399-cdn-dp";
> + reg = <0x0 0xfec00000 0x0 0x100000>;
> + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>,
> + <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>;
> + clock-names = "core-clk", "pclk", "spdif", "grf";
> + assigned-clocks = <&cru SCLK_DP_CORE>;
> + assigned-clock-rates = <100000000>;
> + power-domains = <&power RK3399_PD_HDCP>;
> + phys = <&tcphy0_dp>, <&tcphy1_dp>;
> + resets = <&cru SRST_DPTX_SPDIF_REC>, <&cru SRST_P_UPHY0_DPTX>,
> + <&cru SRST_P_UPHY0_APB>;
> + reset-names = "spdif", "dptx", "apb";
> + extcon = <&fusb0>, <&fusb1>;
> + rockchip,grf = <&grf>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #sound-dai-cells = <1>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + dp_in: port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + dp_in_vopb: endpoint@0 {
> + reg = <0>;
> + remote-endpoint = <&vopb_out_dp>;
> + };
> +
> + dp_in_vopl: endpoint@1 {
> + reg = <1>;
> + remote-endpoint = <&vopl_out_dp>;
> + };
> + };
> + };
> + };
> --
> 1.9.1
>
CC'ing Mark Yao
I saw that the cdn-dp driver is merged but not the documentation
binding. Maybe we forget to include this patch with the pull request?
Or there is another reason?
Thanks,
Enric
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-27 17:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-10 2:15 [PATCH v15 0/5] Rockchip Type-C DisplayPort driver Chris Zhong
[not found] ` <1473473748-22331-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-09-10 2:15 ` [PATCH v15 2/5] Documentation: bindings: add dt documentation for cdn DP controller Chris Zhong
[not found] ` <1473473748-22331-3-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-02-27 17:27 ` Enric Balletbo Serra
2016-09-10 2:15 ` [PATCH v15 5/5] ASoC: rockchip: Add DP dai-links to the rk3399-gru machine driver Chris Zhong
[not found] ` <1473473748-22331-6-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-09-19 21:37 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).