Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp13748yba; Tue, 23 Apr 2019 18:27:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJEucaun+oM253jo0Z3XBpOKQzvwcJlNaloejBBeLp7infEcYqFvJzVGWC9Aks2OrxGY0Z X-Received: by 2002:a63:6ac1:: with SMTP id f184mr28432096pgc.25.1556069277459; Tue, 23 Apr 2019 18:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556069277; cv=none; d=google.com; s=arc-20160816; b=s6oZbH2AT1D0VS+Ob1jiW2bBqcSjID/ka3XXlqQxvm219zs5cmUxjBhBMM23ZRNQFD 4VZ/P9cEV/4EaUi1zYE4gTt04ofeNSN7ImNXIwPNyi5wR5E7A82Bbyn6gVU5Sy2F0zqL KfA3uWoxwGfLiqeI5yOzMun2TJtKRJvVzOQU2wmPUH45UYpnGR2JnniRH6MBXP3xCnLA 9g7BmMmIrDX9gBQpkzuV0gYDGvbcMmt3ysWsPBExgcpRta3L5lrcNeprSGSuC7dsNhx5 ULwG0h+2VF8pc6GzYl3hqvw3JOw8+yw+AuPrS8o8BW/DMPgVMAD6bykFdKRXh6Tir/UN Vyqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=/9bi5wN+cWQlylqLzY4OlPoLlB1z5okQvdm8IsO97Yw=; b=izafRfL+yfvpGRYCrXF79fW2MtJx9ai88CcTc0C17zgJxGWBmH0EcMDToRqUG4X7um C/VHuWfLL64/48f8DY9lzNwVFKR9ecExXGLPDyX0CJsJ5kQhgRTxT/fKsR0UYffuzEnH U106FDYYUjlkbdRHjYVspEZc22xKQSZ0E4ixJpz2tj5bHauIEnWXgGHX7PMbfwTPqz9t iL/BKjbrtkoup+Kyvj2VU1P9NeH2um3G5Y8VCfU97j0Rp1mlX6eA1Aa3x4FhRK5hSMx+ p7nFDpZkzdjVxcRtIqpO1X4NNRjZl3WhhHKmGXjpiykyEzvO6JpOnSv8dtR/tux7Lwky tTqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si16891453plt.28.2019.04.23.18.27.42; Tue, 23 Apr 2019 18:27:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729203AbfDXB0u (ORCPT + 99 others); Tue, 23 Apr 2019 21:26:50 -0400 Received: from inva020.nxp.com ([92.121.34.13]:50986 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729033AbfDXB0u (ORCPT ); Tue, 23 Apr 2019 21:26:50 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 39A931A004D; Wed, 24 Apr 2019 03:26:47 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 484AB1A0023; Wed, 24 Apr 2019 03:26:43 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 17ACA402A3; Wed, 24 Apr 2019 09:26:38 +0800 (SGT) From: andy.tang@nxp.com To: mturquette@baylibre.com Cc: sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yuantian Tang Subject: [PATCH] clk: qoriq: Add ls1028a clock configuration Date: Wed, 24 Apr 2019 09:19:12 +0800 Message-Id: <20190424011912.2179-1-andy.tang@nxp.com> X-Mailer: git-send-email 2.14.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yuantian Tang Enable clock driver by adding clock configuration for ls1028a chip. Signed-off-by: Yuantian Tang --- drivers/clk/clk-qoriq.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 1212a9b..8b0cb0b 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -245,6 +245,58 @@ static u32 cg_in(struct clockgen *cg, u32 __iomem *reg) }, }; +static const struct clockgen_muxinfo ls1028a_hwa1 = { + { + { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV4 }, + {}, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 }, + }, +}; + +static const struct clockgen_muxinfo ls1028a_hwa2 = { + { + { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV4 }, + {}, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 }, + }, +}; + +static const struct clockgen_muxinfo ls1028a_hwa3 = { + { + { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV4 }, + {}, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 }, + }, +}; + +static const struct clockgen_muxinfo ls1028a_hwa4 = { + { + { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 }, + { CLKSEL_VALID, CGA_PLL2, PLL_DIV4 }, + {}, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 }, + { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 }, + }, +}; + static const struct clockgen_muxinfo ls1043a_hwa1 = { { {}, @@ -508,6 +560,21 @@ static void __init t4240_init_periph(struct clockgen *cg) .pll_mask = 0x03, }, { + .compat = "fsl,ls1028a-clockgen", + .cmux_groups = { + &clockgen2_cmux_cga12 + }, + .hwaccel = { + &ls1028a_hwa1, &ls1028a_hwa2, + &ls1028a_hwa3, &ls1028a_hwa4 + }, + .cmux_to_group = { + 0, 0, 0, 0, -1 + }, + .pll_mask = 0x07, + .flags = CG_VER3 | CG_LITTLE_ENDIAN, + }, + { .compat = "fsl,ls1043a-clockgen", .init_periph = t2080_init_periph, .cmux_groups = { @@ -1423,6 +1490,7 @@ static void __init clockgen_init(struct device_node *np) CLK_OF_DECLARE(qoriq_clockgen_b4860, "fsl,b4860-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1012a, "fsl,ls1012a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1021a, "fsl,ls1021a-clockgen", clockgen_init); +CLK_OF_DECLARE(qoriq_clockgen_ls1028a, "fsl,ls1028a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1043a, "fsl,ls1043a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1046a, "fsl,ls1046a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1088a, "fsl,ls1088a-clockgen", clockgen_init); -- 1.7.1