Re: [linux-sunxi] How to enable S/PDIF output on cubieboard2?

2018-01-10 Thread Code Kipper
On 11 January 2018 at 03:34, Kai wrote: > Cubieboard2 exposes SPDIF interface on GPIO (pin 64 regarding to the > diagram). > On a legacy kernel, to enable it, script.fex is used, however mainline > kernel uses dts. > Both using A20, cubietruck exported SPDIF by default, but I cannot use it on > cb

[linux-sunxi] [PATCH v5 2/2] media: V3s: Add support for Allwinner CSI.

2018-01-10 Thread Yong Deng
Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 interface and CSI1 is used for parallel interface. This is not documented in datasheet but by test and guess. This patch implement a v4l2 framework driver for it. Currently, the driver only support the parallel interface. MIPI

[linux-sunxi] [PATCH] clk: sunxi-ng: defaultly enable DE2 CCU for sun8i/sun50i

2018-01-10 Thread Icenowy Zheng
As DE2 support for more SoCs are introducing, there's many reports that the DE2 is not functional due to DE2 CCU code not included in kernel. Defaultly enable DE2 CCU for sun8i/sun50i to reduce this kind of problems. Signed-off-by: Icenowy Zheng --- drivers/clk/sunxi-ng/Kconfig | 2 ++ 1 file c

[linux-sunxi] [PATCH v5 1/2] dt-bindings: media: Add Allwinner V3s Camera Sensor Interface (CSI)

2018-01-10 Thread Yong Deng
Add binding documentation for Allwinner V3s CSI. Signed-off-by: Yong Deng --- .../devicetree/bindings/media/sun6i-csi.txt| 59 ++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/sun6i-csi.txt diff --git a/Documentation/dev

[linux-sunxi] [PATCH v5 0/2] Initial Allwinner V3s CSI Support

2018-01-10 Thread Yong Deng
This patchset add initial support for Allwinner V3s CSI. Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 interface and CSI1 is used for parallel interface. This is not documented in datasheet but by test and guess. This patchset implement a v4l2 framework driver and add a b

[linux-sunxi] How to enable S/PDIF output on cubieboard2?

2018-01-10 Thread Kai
Cubieboard2 exposes SPDIF interface on GPIO (pin 64 regarding to the diagram). On a legacy kernel, to enable it, script.fex is used, however mainline kernel uses dts. Both using A20, cubietruck exported SPDIF by default, but I cannot use it on cb2. Would someone help providing a SPDIF-enabled d

[linux-sunxi] [PATCH v2 06/12] dt-bindings: display: sun4i-drm: Add A83T HDMI pipeline

2018-01-10 Thread Jernej Skrabec
This commit adds all necessary compatibles and descriptions needed to implement A83T HDMI pipeline. Mixer is already properly described, so only compatible is added. However, A83T TV TCON, which is connected to HDMI, doesn't have channel 0, contrary to all TCONs currently described. Because of th

[linux-sunxi] [PATCH v2 08/12] drm/sun4i: Add support for A83T second TCON

2018-01-10 Thread Jernej Skrabec
This TCON is connected to HDMI encoder. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 0815c528d08e..adfa39f372cf 100644 --- a/drivers/gpu

[linux-sunxi] [PATCH v2 11/12] ARM: dts: sun8i: a83t: Add HDMI display pipeline

2018-01-10 Thread Jernej Skrabec
This commit adds all bits necessary for HDMI on A83T - mixer1, tcon1, hdmi, hdmi phy and hdmi pinctrl entries. Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-a83t.dtsi | 119 +- 1 file changed, 118 insertions(+), 1 deletion(-) diff --git a/arch/arm

[linux-sunxi] [PATCH v2 10/12] drm/sun4i: Implement A83T HDMI driver

2018-01-10 Thread Jernej Skrabec
A83T has DW HDMI IP block with a custom PHY similar to Synopsys gen2 HDMI PHY. Only video output was tested, while HW also supports audio and CEC. Support for them will be added later. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/Kconfig | 9 + drivers/gpu/drm/sun4i/Makefi

[linux-sunxi] [PATCH v2 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-10 Thread Jernej Skrabec
This commit changes formula from this: Freq = (parent_freq * N * K) / (M * P) to this: Freq = (parent_freq / M) * N * K / P This improves situation when N is in the range 1-255. PLL parent clock is almost always 24 MHz, which means that for N >= 180 original formula overflows and result becomes

[linux-sunxi] [PATCH v2 09/12] drm/sun4i: Add support for A83T second DE2 mixer

2018-01-10 Thread Jernej Skrabec
It supports 1 VI and 1 UI plane and HW scaling on both planes. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.

[linux-sunxi] [PATCH v2 12/12] ARM: dts: sun8i: a83t: Enable HDMI on BananaPi M3

2018-01-10 Thread Jernej Skrabec
BananaPi M3 includes HDMI connector, so add support for it. Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-b

[linux-sunxi] [PATCH v2 07/12] drm/sun4i: Add has_channel_0 TCON quirk

2018-01-10 Thread Jernej Skrabec
Some TCONs on newer SoCs doesn't support channel 0, since they are meant to be used only with TV or HDMI encoder. Prepare support for them with adding has_channel_0 quirk. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 41 +++--- drivers/g

[linux-sunxi] [PATCH v2 04/12] drm/bridge/synopsys: dw-hdmi: Export some PHY related functions

2018-01-10 Thread Jernej Skrabec
Parts of PHY code could be useful also for custom PHYs. For example, Allwinner A83T has custom PHY which is probably Synopsys gen2 PHY with few additional memory mapped registers, so most of the Synopsys PHY related code could be reused. Functions exported here are actually not specific to Synopsy

[linux-sunxi] [PATCH v2 05/12] drm/bridge/synopsys: dw-hdmi: Add deinit callback

2018-01-10 Thread Jernej Skrabec
Some SoCs, like Allwinner A83T, have to do additional cleanup when HDMI driver unloads. When using DW HDMI through DRM bridge API, there is no place to store driver's private data so it can be accessed in unbind function. Because of that, add deinit function which is called at the very end, so driv

[linux-sunxi] [PATCH v2 01/12] clk: sunxi-ng: Mask nkmp factors when setting register

2018-01-10 Thread Jernej Skrabec
Currently, if one of the factors isn't present, bit 0 gets always set to 1. For example, A83T has NMP PLLs modelled as NKMP PLL without K. Since K is not specified, it's offset, width and shift is 0. Driver assumes that lowest value possible is 1, otherwise we would get division by 0. That situatio

[linux-sunxi] [PATCH v2 03/12] drm/bridge/synopsys: dw-hdmi: Enable workaround for v1.32a

2018-01-10 Thread Jernej Skrabec
Allwinner SoCs have dw hdmi controller v1.32a which exhibits same magenta line issue as i.MX6Q and i.MX6DL. Enable workaround for it. Tests show that one iteration is enough. Acked-by: Laurent Pinchart Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 +--- 1

[linux-sunxi] [PATCH v2 00/12] drm/sun4i: Add A83T HDMI support

2018-01-10 Thread Jernej Skrabec
This patch series implements support for A83T DW HDMI and PHY. Contrary to v1 series, this one is based on latest linux-next, since all needed patches were merged. While exactly this combination of HDMI controller and PHY is not common in Allwinner SoCs, this patch series nevertheless makes ground