From 2525b74686bf38b4a94031ba5ad9f71804291a00 Mon Sep 17 00:00:00 2001 From: Karabek Date: Thu, 31 May 2018 14:17:56 +0200 Subject: [PATCH 1/3] added H3-mixer1 and HDMI sound nodes added general-add-H3-mixer1.patch replacing unresolved/02-add-H3-mixers.patch mixer0 was been added upstream added general-add-HDMI-sound-nodes-DT replacing unresolved/00-20-add-HDMI-sound-nodes removing the following kernel error messages: [ 10.831855] sun4i-codec 1c22c00.codec: ASoC: codec-analog@1f015c0 not registered [ 10.831884] sun4i-codec 1c22c00.codec: Failed to register our card --- .../general-add-HDMI-sound-nodes-DT.patch | 55 +++++++++++++++++++ .../sunxi-dev/general-add-h3-mixer1.patch | 30 ++++++++++ 2 files changed, 85 insertions(+) create mode 100644 patch/kernel/sunxi-dev/general-add-HDMI-sound-nodes-DT.patch create mode 100644 patch/kernel/sunxi-dev/general-add-h3-mixer1.patch diff --git a/patch/kernel/sunxi-dev/general-add-HDMI-sound-nodes-DT.patch b/patch/kernel/sunxi-dev/general-add-HDMI-sound-nodes-DT.patch new file mode 100644 index 0000000000..a41381072c --- /dev/null +++ b/patch/kernel/sunxi-dev/general-add-HDMI-sound-nodes-DT.patch @@ -0,0 +1,55 @@ +diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi +index 1be1a02..7772d16 100644 +--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi ++++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi +@@ -77,6 +77,22 @@ + }; + }; + ++ sound_hdmi: sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,name = "allwinner,hdmi"; ++ simple-audio-card,mclk-fs = <256>; ++ status = "disabled"; ++ ++ simple-audio-card,codec { ++ sound-dai = <&hdmi>; ++ }; ++ ++ simple-audio-card,cpu { ++ sound-dai = <&i2s2>; ++ }; ++ }; ++ + clocks { + #address-cells = <1>; + #size-cells = <1>; +@@ -630,6 +646,19 @@ + status = "disabled"; + }; + ++ i2s2: i2s@1c22800 { ++ #sound-dai-cells = <0>; ++ compatible = "allwinner,sun8i-h3-i2s"; ++ reg = <0x01c22800 0x400>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; ++ clock-names = "apb", "mod"; ++ dmas = <&dma 27>; ++ resets = <&ccu RST_BUS_I2S2>; ++ dma-names = "tx"; ++ status = "disabled"; ++ }; ++ + codec: codec@1c22c00 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun8i-h3-codec"; +@@ -747,6 +776,7 @@ + }; + + hdmi: hdmi@1ee0000 { ++ #sound-dai-cells = <0>; + compatible = "allwinner,sun8i-h3-dw-hdmi", + "allwinner,sun8i-a83t-dw-hdmi"; + reg = <0x01ee0000 0x10000>; diff --git a/patch/kernel/sunxi-dev/general-add-h3-mixer1.patch b/patch/kernel/sunxi-dev/general-add-h3-mixer1.patch new file mode 100644 index 0000000000..a59ee0e90b --- /dev/null +++ b/patch/kernel/sunxi-dev/general-add-h3-mixer1.patch @@ -0,0 +1,30 @@ +diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c +index 126899d..7fa7494 100644 +--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c ++++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c +@@ -500,6 +500,14 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = { + .vi_num = 1, + }; + ++static const struct sun8i_mixer_cfg sun8i_h3_mixer1_cfg = { ++ .ccsc = 1, ++ .mod_rate = 432000000, ++ .scaler_mask = 0xf, ++ .ui_num = 3, ++ .vi_num = 1, ++}; ++ + static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { + .vi_num = 2, + .ui_num = 1, +@@ -522,6 +530,10 @@ static const struct of_device_id sun8i_mixer_of_table[] = { + .data = &sun8i_h3_mixer0_cfg, + }, + { ++ .compatible = "allwinner,sun8i-h3-de2-mixer-1", ++ .data = &sun8i_h3_mixer1_cfg, ++ }, ++ { + .compatible = "allwinner,sun8i-v3s-de2-mixer", + .data = &sun8i_v3s_mixer_cfg, + }, From d0a1fd83c8795bc09620f950be41a0525d1bfcdc Mon Sep 17 00:00:00 2001 From: Karabek Date: Thu, 31 May 2018 14:19:45 +0200 Subject: [PATCH 2/3] replaced by general-add-H3-mixer1.patch mixer0 has been added upstream, "general-add-H3-mixer1.patch" adds mixer1 --- .../unresolved/02-add-H3-mixers.patch | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 patch/kernel/sunxi-dev/unresolved/02-add-H3-mixers.patch diff --git a/patch/kernel/sunxi-dev/unresolved/02-add-H3-mixers.patch b/patch/kernel/sunxi-dev/unresolved/02-add-H3-mixers.patch deleted file mode 100644 index 80372b811b..0000000000 --- a/patch/kernel/sunxi-dev/unresolved/02-add-H3-mixers.patch +++ /dev/null @@ -1,52 +0,0 @@ -From cf9c6a1a49beecea35f395017a0e3aa9d97f2f17 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Tue, 1 Aug 2017 21:12:53 +0800 -Subject: [PATCH] drm: sun4i: add support for H3 mixers - -Allwinner H3 SoC has two mixers, one has 1 VI channel and 3 UI channels, -and the other has 1 VI and 1 UI. There's also some graphics post-process -function that is missing on mixer1, however, as we currently support -none of these functions, the only difference that is shown to us is the -channel number difference. - -Add support for these two variants. - -Signed-off-by: Icenowy Zheng ---- - drivers/gpu/drm/sun4i/sun8i_mixer.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c -index cb193c5f16862..d658a3a8159a7 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_mixer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c -@@ -390,11 +390,29 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { - .ui_num = 1, - }; - -+static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = { -+ .vi_num = 1, -+ .ui_num = 3, -+}; -+ -+static const struct sun8i_mixer_cfg sun8i_h3_mixer1_cfg = { -+ .vi_num = 1, -+ .ui_num = 1, -+}; -+ - static const struct of_device_id sun8i_mixer_of_table[] = { - { - .compatible = "allwinner,sun8i-v3s-de2-mixer", - .data = &sun8i_v3s_mixer_cfg, - }, -+ { -+ .compatible = "allwinner,sun8i-h3-de2-mixer0", -+ .data = &sun8i_h3_mixer0_cfg -+ }, -+ { -+ .compatible = "allwinner,sun8i-h3-de2-mixer1", -+ .data = &sun8i_h3_mixer1_cfg -+ }, - { } - }; - MODULE_DEVICE_TABLE(of, sun8i_mixer_of_table); From ae890136943aa953cf7b1abefa8377a907523e44 Mon Sep 17 00:00:00 2001 From: Karabek Date: Thu, 31 May 2018 14:21:14 +0200 Subject: [PATCH 3/3] replaced by general-add-HDMI-sound-nodes-DT updated to 4.17 and renamed "general-add-HDMI-sound-nodes-DT" --- .../16-H3-add-HDMI-sound-nodes.patch | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 patch/kernel/sunxi-dev/unresolved/16-H3-add-HDMI-sound-nodes.patch diff --git a/patch/kernel/sunxi-dev/unresolved/16-H3-add-HDMI-sound-nodes.patch b/patch/kernel/sunxi-dev/unresolved/16-H3-add-HDMI-sound-nodes.patch deleted file mode 100644 index 11f27b7c7b..0000000000 --- a/patch/kernel/sunxi-dev/unresolved/16-H3-add-HDMI-sound-nodes.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi -index 8aa2befc..d3d70eac 100644 ---- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi -+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi -@@ -53,6 +53,22 @@ - #address-cells = <1>; - #size-cells = <1>; - -+ sound_hdmi: sound { -+ compatible = "simple-audio-card"; -+ simple-audio-card,format = "i2s"; -+ simple-audio-card,name = "allwinner,hdmi"; -+ simple-audio-card,mclk-fs = <256>; -+ status = "disabled"; -+ -+ simple-audio-card,codec { -+ sound-dai = <&hdmi>; -+ }; -+ -+ simple-audio-card,cpu { -+ sound-dai = <&i2s2>; -+ }; -+ }; -+ - clocks { - #address-cells = <1>; - #size-cells = <1>; -@@ -110,6 +126,7 @@ - }; - - hdmi: hdmi@1ee0000 { -+ #sound-dai-cells = <0>; - compatible = "allwinner,sun8i-h3-dw-hdmi"; - reg = <0x01ee0000 0x10000>, - <0x01ef0000 0x10000>; -@@ -685,6 +702,19 @@ - status = "disabled"; - }; - -+ i2s2: i2s@1c22800 { -+ #sound-dai-cells = <0>; -+ compatible = "allwinner,sun8i-h3-i2s"; -+ reg = <0x01c22800 0x400>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; -+ clock-names = "apb", "mod"; -+ dmas = <&dma 27>; -+ resets = <&ccu RST_BUS_I2S2>; -+ dma-names = "tx"; -+ status = "disabled"; -+ }; -+ - codec: codec@01c22c00 { - #sound-dai-cells = <0>; - compatible = "allwinner,sun8i-h3-codec";