devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * [PATCH v5 5/8] ASoC: rt5616: add mclk property for rt5616 document
           [not found] <1454384032-6794-1-git-send-email-wxt@rock-chips.com>
           [not found] ` <1454384032-6794-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
    @ 2016-02-02  3:44 ` Caesar Wang
      2016-02-02  3:44   ` [PATCH v5 6/8] ASoC: rt5616: trivial: fix the typo Caesar Wang
                         ` (2 more replies)
      2016-02-02  3:48 ` [PATCH v5 2/8] clk: rockchip: rk3036: fix and add node id for emac clock Caesar Wang
      2 siblings, 3 replies; 14+ messages in thread
    From: Caesar Wang @ 2016-02-02  3:44 UTC (permalink / raw)
      To: broonie, bardliao
      Cc: alsa-devel, oder_chiou, robh+dt, heiko, devicetree,
    	linux-rockchip, keescook, linux-kernel, jeffy.chen, leozwang,
    	Caesar Wang
    
    This patch adds the mclk property for the CODEC driver,
    since sometimes the CODEC driver needs the clock enabled.
    
    The system clock of ALC5616 can be selected from MCLK,
    That also makes the codec the master clock provider.
    
    Signed-off-by: Caesar Wang <wxt@rock-chips.com>
    Acked-by: Rob Herring <robh@kernel.org>
    
    Cc:  alsa-devel@alsa-project.org
    Cc:  Mark Brown <broonie@kernel.org>
    Cc:  Bard Liao <bardliao@realtek.com>
    
    ---
    
    Changes in v5:
    - Fix the wrong word, as the Rob comments on
      https://patchwork.kernel.org/patch/8147731/.
    - Cc the related alsa experts.
    
    Changes in v4:
    - Add this patch included in kylin series patches.
    
     Documentation/devicetree/bindings/sound/rt5616.txt | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/Documentation/devicetree/bindings/sound/rt5616.txt b/Documentation/devicetree/bindings/sound/rt5616.txt
    index efc48c6..e410858 100644
    --- a/Documentation/devicetree/bindings/sound/rt5616.txt
    +++ b/Documentation/devicetree/bindings/sound/rt5616.txt
    @@ -8,6 +8,12 @@ Required properties:
     
     - reg : The I2C address of the device.
     
    +Optional properties:
    +
    +- clocks: The phandle of the master clock to the CODEC.
    +
    +- clock-names: Should be "mclk".
    +
     Pins on the device (for linking into audio routes) for RT5616:
     
       * IN1P
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 14+ messages in thread
  • * [PATCH v5 2/8] clk: rockchip: rk3036: fix and add node id for emac clock
           [not found] <1454384032-6794-1-git-send-email-wxt@rock-chips.com>
           [not found] ` <1454384032-6794-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
      2016-02-02  3:44 ` [PATCH v5 5/8] ASoC: rt5616: add mclk property for rt5616 document Caesar Wang
    @ 2016-02-02  3:48 ` Caesar Wang
      2 siblings, 0 replies; 14+ messages in thread
    From: Caesar Wang @ 2016-02-02  3:48 UTC (permalink / raw)
      To: mturquette, sboyd
      Cc: linux-clk, heiko, devicetree, linux-rockchip, keescook,
    	linux-kernel, jeffy.chen, leozwang, zhengxing, Caesar Wang
    
    From: zhengxing <zhengxing@rock-chips.com>
    
    In the emac driver, we need to refer HCLK_MAC since there are
    only 3PLLs (APLL/GPLL/DPLL) on the rk3036, most clock are under the
    GPLL, and it is unable to provide the accurate rate for mac_ref which
    need to 50MHz probability, we should let it under the DPLL and are
    able to set the freq which integer multiples of 50MHz, so we add these
    emac node for reference.
    
    Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
    Signed-off-by: Caesar Wang <wxt@rock-chips.com>
    
    ---
    
    Changes in v5: None
    Changes in v4:
    - fix the commit, pick up from the
      https://patchwork.kernel.org/patch/7976631/.
    - The emac parent shouldn't depend on the APLL. instead of DPLL.
    
     drivers/clk/rockchip/clk-rk3036.c      | 9 ++++++---
     include/dt-bindings/clock/rk3036-cru.h | 2 ++
     2 files changed, 8 insertions(+), 3 deletions(-)
    
    diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
    index be71a41..701f702 100644
    --- a/drivers/clk/rockchip/clk-rk3036.c
    +++ b/drivers/clk/rockchip/clk-rk3036.c
    @@ -343,8 +343,11 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
     			RK2928_CLKSEL_CON(16), 0, 2, MFLAGS, 2, 5, DFLAGS,
     			RK2928_CLKGATE_CON(10), 5, GFLAGS),
     
    -	COMPOSITE_NOGATE(0, "mac_pll_src", mux_pll_src_3plls_p, 0,
    -			RK2928_CLKSEL_CON(21), 0, 2, MFLAGS, 9, 5, DFLAGS),
    +	MUX(SCLK_MACPLL, "mac_pll_pre", mux_pll_src_3plls_p, 0,
    +			RK2928_CLKSEL_CON(21), 0, 2, MFLAGS),
    +	DIV(0, "mac_pll_src", "mac_pll_pre", 0,
    +			RK2928_CLKSEL_CON(21), 9, 5, DFLAGS),
    +
     	MUX(SCLK_MACREF, "mac_clk_ref", mux_mac_p, CLK_SET_RATE_PARENT,
     			RK2928_CLKSEL_CON(21), 3, 1, MFLAGS),
     
    @@ -404,7 +407,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
     	GATE(HCLK_OTG1, "hclk_otg1", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(7), 3, GFLAGS),
     	GATE(HCLK_I2S, "hclk_i2s", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS),
     	GATE(0, "hclk_sfc", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(3), 14, GFLAGS),
    -	GATE(0, "hclk_mac", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(3), 15, GFLAGS),
    +	GATE(HCLK_MAC, "hclk_mac", "hclk_peri", 0, RK2928_CLKGATE_CON(3), 5, GFLAGS),
     
     	/* pclk_peri gates */
     	GATE(0, "pclk_peri_matrix", "pclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(4), 1, GFLAGS),
    diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h
    index ebc7a7b..de44109 100644
    --- a/include/dt-bindings/clock/rk3036-cru.h
    +++ b/include/dt-bindings/clock/rk3036-cru.h
    @@ -54,6 +54,7 @@
     #define SCLK_PVTM_VIDEO		125
     #define SCLK_MAC		151
     #define SCLK_MACREF		152
    +#define SCLK_MACPLL		153
     #define SCLK_SFC		160
     
     /* aclk gates */
    @@ -92,6 +93,7 @@
     #define HCLK_SDMMC		456
     #define HCLK_SDIO		457
     #define HCLK_EMMC		459
    +#define HCLK_MAC		460
     #define HCLK_I2S		462
     #define HCLK_LCDC		465
     #define HCLK_ROM		467
    -- 
    1.9.1
    
    
    ^ permalink raw reply related	[flat|nested] 14+ messages in thread

  • end of thread, other threads:[~2016-02-21  2:18 UTC | newest]
    
    Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1454384032-6794-1-git-send-email-wxt@rock-chips.com>
         [not found] ` <1454384032-6794-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
    2016-02-02  3:40   ` [PATCH v5 1/8] ARM: dts: rockchip: add hdmi/vop device node for rk3036 Caesar Wang
    2016-02-02  3:40     ` [PATCH v5 3/8] ARM: dts: rockchip: add support emac for RK3036 Caesar Wang
    2016-02-02  3:40     ` [PATCH v5 4/8] ARM: dts: rockchip: add mclk for rt5616 on kylin board Caesar Wang
    2016-02-02 21:23       ` Heiko Stübner
    2016-02-02  3:40     ` [PATCH v5 8/8] ARM: dts: rockchip: support the spi for rk3036 Caesar Wang
         [not found]       ` <1454384453-7127-4-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
    2016-02-02 21:29         ` Heiko Stübner
         [not found]     ` <1454384453-7127-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
    2016-02-21  0:03       ` [PATCH v5 1/8] ARM: dts: rockchip: add hdmi/vop device node " Heiko Stuebner
    2016-02-21  2:18         ` Caesar Wang
    2016-02-02  3:44 ` [PATCH v5 5/8] ASoC: rt5616: add mclk property for rt5616 document Caesar Wang
    2016-02-02  3:44   ` [PATCH v5 6/8] ASoC: rt5616: trivial: fix the typo Caesar Wang
    2016-02-02  3:44   ` [PATCH v5 7/8] ASoC: rt5616: add the mclk for the codec driver Caesar Wang
         [not found]   ` <1454384680-7197-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
    2016-02-02 19:36     ` [PATCH v5 5/8] ASoC: rt5616: add mclk property for rt5616 document Mark Brown
    2016-02-03  0:52       ` Caesar Wang
    2016-02-02  3:48 ` [PATCH v5 2/8] clk: rockchip: rk3036: fix and add node id for emac clock Caesar Wang
    

    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).