From patchwork Tue Jan 14 04:03:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 11331281 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2317921 for ; Tue, 14 Jan 2020 04:03:28 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7ABC32187F for ; Tue, 14 Jan 2020 04:03:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.kernel.org header.i=@linux.kernel.org header.b="ePJ6cfIs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ABC32187F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+26986+1201+1554929+3438807@linux.kernel.org X-Received: by 127.0.0.2 with SMTP id L7qfYY1556264xjYOJBtoVhR; Mon, 13 Jan 2020 20:03:28 -0800 X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web09.6146.1578974607980134937 for ; Mon, 13 Jan 2020 20:03:28 -0800 X-Received: by mail.kernel.org (Postfix) id C4D84222C3; Tue, 14 Jan 2020 04:03:27 +0000 (UTC) X-Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A14212187F for ; Tue, 14 Jan 2020 04:03:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A14212187F X-Received: by mail-pf1-f193.google.com with SMTP id z16so5929675pfk.0 for ; Mon, 13 Jan 2020 20:03:27 -0800 (PST) X-Gm-Message-State: WPPak04PuP925RbXdDEcE9PUx1554929AA= X-Google-Smtp-Source: APXvYqykeM9sr4icXjk9kJPgtTtyVjWGDRPWbkd+53qH0vkjz8uVHOyq4tBEujnEXMCsWI36wJXJwA== X-Received: by 2002:a63:b64a:: with SMTP id v10mr25260436pgt.145.1578974606948; Mon, 13 Jan 2020 20:03:26 -0800 (PST) X-Received: from localhost.localdomain ([2409:4072:618a:cee9:38fe:8c63:d2a2:7397]) by smtp.gmail.com with ESMTPSA id h3sm11222025pjs.0.2020.01.13.20.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 20:03:26 -0800 (PST) From: Manivannan Sadhasivam To: Linuxkernel+Patchwork-Soc via Email Integration Cc: sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, Manivannan Sadhasivam Subject: [PATCH 1/2] arm64: dts: bitmain: Add clock controller support for BM1880 SoC Date: Tue, 14 Jan 2020 09:33:10 +0530 Message-Id: <20200114040311.6599-2-manivannan.sadhasivam@linaro.org> In-Reply-To: <20200114040311.6599-1-manivannan.sadhasivam@linaro.org> References: <20200114040311.6599-1-manivannan.sadhasivam@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1578974608; bh=NE7r4ZTm+P0LWt1nkzz5hQEsYhjKYlof8cPAkOV9TPo=; h=Cc:Date:From:Reply-To:Subject:To; b=ePJ6cfIscCTymKU4nsO/HZVbO9cXaQfvih+5qQ4tZhZYxwq9zd7j0NbCF0OCEzxtCmI wALE3TNV8g6mgCWwnyiBxl5HmL7/grvwE9xTuYlLkFUpZHAMTKom1v7NkMBgiktar7u71 7z8tE5QG8JXWg+dX30P8pvkFog+cY/b0LzQ= Add clock controller support for Bitmain BM1880 SoC. Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/bitmain/bm1880.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/bitmain/bm1880.dtsi b/arch/arm64/boot/dts/bitmain/bm1880.dtsi index d65453f99a99..8471662413da 100644 --- a/arch/arm64/boot/dts/bitmain/bm1880.dtsi +++ b/arch/arm64/boot/dts/bitmain/bm1880.dtsi @@ -4,6 +4,7 @@ * Author: Manivannan Sadhasivam */ +#include #include #include @@ -66,6 +67,12 @@ ; }; + osc: osc { + compatible = "fixed-clock"; + clock-frequency = <25000000>; + #clock-cells = <0>; + }; + soc { compatible = "simple-bus"; #address-cells = <2>; @@ -94,6 +101,15 @@ reg = <0x400 0x120>; }; + clk: clock-controller@e8 { + compatible = "bitmain,bm1880-clk"; + reg = <0xe8 0x0c>, <0x800 0xb0>; + reg-names = "pll", "sys"; + clocks = <&osc>; + clock-names = "osc"; + #clock-cells = <1>; + }; + rst: reset-controller@c00 { compatible = "bitmain,bm1880-reset"; reg = <0xc00 0x8>; From patchwork Tue Jan 14 04:03:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 11331285 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 162D9921 for ; Tue, 14 Jan 2020 04:03:32 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4C7D222C2 for ; Tue, 14 Jan 2020 04:03:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.kernel.org header.i=@linux.kernel.org header.b="I8Kc0395" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4C7D222C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+26986+1202+1554929+3438807@linux.kernel.org X-Received: by 127.0.0.2 with SMTP id Rf2QYY1556264xx7XeTMP1Qb; Mon, 13 Jan 2020 20:03:31 -0800 X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web12.6007.1578974611491396797 for ; Mon, 13 Jan 2020 20:03:31 -0800 X-Received: by mail.kernel.org (Postfix) id 4245824655; Tue, 14 Jan 2020 04:03:31 +0000 (UTC) X-Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20CC824656 for ; Tue, 14 Jan 2020 04:03:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20CC824656 X-Received: by mail-pj1-f67.google.com with SMTP id m13so5243807pjb.2 for ; Mon, 13 Jan 2020 20:03:31 -0800 (PST) X-Gm-Message-State: EmI8AZaZT4unqhgDU1VeyIfAx1554929AA= X-Google-Smtp-Source: APXvYqx4t9bCNDv6E+QwwdT47O96lrVNOs3W62A+lHgUtZejQGcwbJM2PqFGzrn+kmbks1+p8FtnfQ== X-Received: by 2002:a17:902:ab84:: with SMTP id f4mr24683298plr.35.1578974610352; Mon, 13 Jan 2020 20:03:30 -0800 (PST) X-Received: from localhost.localdomain ([2409:4072:618a:cee9:38fe:8c63:d2a2:7397]) by smtp.gmail.com with ESMTPSA id h3sm11222025pjs.0.2020.01.13.20.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 20:03:29 -0800 (PST) From: Manivannan Sadhasivam To: Linuxkernel+Patchwork-Soc via Email Integration Cc: sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, Manivannan Sadhasivam Subject: [PATCH 2/2] arm64: dts: bitmain: Source common clock for UART controllers Date: Tue, 14 Jan 2020 09:33:11 +0530 Message-Id: <20200114040311.6599-3-manivannan.sadhasivam@linaro.org> In-Reply-To: <20200114040311.6599-1-manivannan.sadhasivam@linaro.org> References: <20200114040311.6599-1-manivannan.sadhasivam@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1578974611; bh=dbiMiAoc7XeWNA2lxzULDJrI1bMYUu150FIBYQ+Iv5c=; h=Cc:Date:From:Reply-To:Subject:To; b=I8Kc0395U1xIanfzUwxZvciFgX8F4Q9/t2JoeHnmWyAW9ZxOz1QvhuKEnbGZobYL8Os kLg7apMc7TOT3WMbIZfaDORas4Ly5j/oelid/6FdqbdOBqfTojKp0QcDxzM2ntm38HmVp vdcKo+rENsrAlI3fv43vhpb163wYAxIWD+Q= Remove fixed clock and source common clock for UART controllers. Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/bitmain/bm1880-sophon-edge.dts | 9 --------- arch/arm64/boot/dts/bitmain/bm1880.dtsi | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/bitmain/bm1880-sophon-edge.dts b/arch/arm64/boot/dts/bitmain/bm1880-sophon-edge.dts index 3e8c70778e24..7a2c7f9c2660 100644 --- a/arch/arm64/boot/dts/bitmain/bm1880-sophon-edge.dts +++ b/arch/arm64/boot/dts/bitmain/bm1880-sophon-edge.dts @@ -49,12 +49,6 @@ reg = <0x1 0x00000000 0x0 0x40000000>; // 1GB }; - uart_clk: uart-clk { - compatible = "fixed-clock"; - clock-frequency = <500000000>; - #clock-cells = <0>; - }; - soc { gpio0: gpio@50027000 { porta: gpio-controller@0 { @@ -173,21 +167,18 @@ &uart0 { status = "okay"; - clocks = <&uart_clk>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart0_default>; }; &uart1 { status = "okay"; - clocks = <&uart_clk>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1_default>; }; &uart2 { status = "okay"; - clocks = <&uart_clk>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart2_default>; }; diff --git a/arch/arm64/boot/dts/bitmain/bm1880.dtsi b/arch/arm64/boot/dts/bitmain/bm1880.dtsi index 8471662413da..fa6e6905f588 100644 --- a/arch/arm64/boot/dts/bitmain/bm1880.dtsi +++ b/arch/arm64/boot/dts/bitmain/bm1880.dtsi @@ -174,6 +174,9 @@ uart0: serial@58018000 { compatible = "snps,dw-apb-uart"; reg = <0x0 0x58018000 0x0 0x2000>; + clocks = <&clk BM1880_CLK_UART_500M>, + <&clk BM1880_CLK_APB_UART>; + clock-names = "baudclk", "apb_pclk"; interrupts = ; reg-shift = <2>; reg-io-width = <4>; @@ -184,6 +187,9 @@ uart1: serial@5801A000 { compatible = "snps,dw-apb-uart"; reg = <0x0 0x5801a000 0x0 0x2000>; + clocks = <&clk BM1880_CLK_UART_500M>, + <&clk BM1880_CLK_APB_UART>; + clock-names = "baudclk", "apb_pclk"; interrupts = ; reg-shift = <2>; reg-io-width = <4>; @@ -194,6 +200,9 @@ uart2: serial@5801C000 { compatible = "snps,dw-apb-uart"; reg = <0x0 0x5801c000 0x0 0x2000>; + clocks = <&clk BM1880_CLK_UART_500M>, + <&clk BM1880_CLK_APB_UART>; + clock-names = "baudclk", "apb_pclk"; interrupts = ; reg-shift = <2>; reg-io-width = <4>; @@ -204,6 +213,9 @@ uart3: serial@5801E000 { compatible = "snps,dw-apb-uart"; reg = <0x0 0x5801e000 0x0 0x2000>; + clocks = <&clk BM1880_CLK_UART_500M>, + <&clk BM1880_CLK_APB_UART>; + clock-names = "baudclk", "apb_pclk"; interrupts = ; reg-shift = <2>; reg-io-width = <4>;