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

2018-02-14 Thread Jernej Skrabec
This TCON is connected to HDMI encoder. Acked-by: Maxime Ripard 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

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

2018-02-14 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

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

2018-02-14 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 ++

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

2018-02-14 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

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

2018-02-14 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. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec ---

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

2018-02-14 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

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

2018-02-14 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 | 108 +- 1 file changed, 107 insertions(+), 1

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

2018-02-14 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

[linux-sunxi] [PATCH v5 05/12] drm/bridge/synopsys: dw-hdmi: don't clobber drvdata

2018-02-14 Thread Jernej Skrabec
dw_hdmi shouldn't set drvdata since some drivers might need to store it's own data there. Rework dw_hdmi in a way to return struct dw_hdmi instead to store it in drvdata. This way drivers are responsible to store and pass structure when needed. Idea was taken from the following commit:

[linux-sunxi] [PATCH v5 02/12] clk: sunxi-ng: Use u64 for calculation of nkmp rate

2018-02-14 Thread Jernej Skrabec
When parent rate is 24MHz and multiplier N >= 180, intermediate clock rate doesn't fit in 32 bit variable anymore. Because of that, introduce function for calculating clock rate which uses 64 bit variable for intermediate result. Acked-by: Maxime Ripard Signed-off-by:

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

2018-02-14 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

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

2018-02-14 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

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

2018-02-14 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

[linux-sunxi] [PATCH v2 2/2] arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators

2018-02-14 Thread Philipp Rossak
This patch fixes a bootproblem with the Bananapi M2 board. Since there are some regulators missing we add them right now. Those values come from the schematic, below you can find a small overview: * reg_aldo1: 3,3V, powers the wifi * reg_aldo2: 2,5V, powers the IO of the RTL8211E * reg_aldo3:

[linux-sunxi] [PATCH v2 1/2] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties

2018-02-14 Thread Philipp Rossak
The eldoin is supplied from the dcdc1 regulator. The N_VBUSEN pin is connected to an external power regulator (SY6280AAC). With this commit we update the pmic binding properties to support those features. Fixes: 7daa21370075 ("ARM: dts: sunxi: Add regulators for Sinovoip BPI-M2") Signed-off-by:

[linux-sunxi] [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators

2018-02-14 Thread Philipp Rossak
This patchseries fixes the bananapi m1 devicetree, to be able to boot again. The first two patches update/improve the devicetree and the last patch adds all missing regulators. Regards, Philipp Changes since v1: * squashed commit 1 and 3 * fix wrong mmc regulator Philipp Rossak

[linux-sunxi] [PATCH v3] rtc: ac100: Fix ac100 determine rate bug

2018-02-14 Thread Philipp Rossak
This patch fixes a bug, that prevents the Allwinner A83T and the A80 from a successful boot. The bug is there since v4.16-rc1 and appeared after the clk branch was merged. You can find the shortend trace below: Unable to handle kernel NULL pointer dereference at virtual address pgd =