From patchwork Tue Jul 30 10:25:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30EFDC3DA7F for ; Tue, 30 Jul 2024 11:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TBZhk/MGRot4TwePmLL/hdaT6gPq3BSmEScwiW49uQ4=; b=TsmpUiR1Sg160b4A3SjKqxdwAv aCtQesGJaULfeCt1o85QcxGEn7dLZfhb/VowNo6jVhyL5SYEjZqWY1jfIk2o1bpZARXR3oDeqdzcu niLH0RF2f6oRYVJwbo04iLgLTUuwLtS9/x4T+QVLjIuLAYRyRDs+llBi459KgX+Vgb8Lk82ORzVHi oqhl8Ds7BEY/HdwjVMxyqf/DhiG+iNDNwn5zn76l+w6zedXb7WFabIwgC76v7GamqG+r5M/84T270 OKyCLCUcoXBI6NJm1s/0bcFZ2j8Jy/OZBkHVQluWJb/8NihI6jTbbzb4j2xXFj4/V/OsSnXZgl+Or +qyTxczg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3q-0000000Etp4-1NZN; Tue, 30 Jul 2024 11:30:34 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3f-0000000EiMT-02DB for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=TBZhk/MGRot4TwePmLL/hdaT6gPq3BSmEScwiW49uQ4=; b=gUMx2D+uJzeOp/fqeK4BonADpU PrsphTfKI7ePitDhxgNkpcZufu94jiX/K3NFI68R3lzhA2/6/yd/1rLpuUCjKzm84ljNWb0g2ax8w /KM1s8Q9aBuJWLr5vb+2zEjYh5SX1LQ3J4Ym6+h5/rnN2m0wNtY7tm4pObkLNNebDzGHpARavzR6n 9ctWhF7hJ2E1SxWAogJZXBsh1j6p/B+HHBub20tr9R6P1so6fLPs0rYXJmqVyT9QcZjubMRsSFPJF ApuO/H7FHNXiF4a0nGYII/8S8CEOsEkUKk7NX7857oaJBtMNZYcCOSddVywfb4n5BI5zzXhY6RQ16 vyj4YK6g==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3a-00000004xs6-21TT for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 31F9161E27; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id CDD92C4AF09; Tue, 30 Jul 2024 10:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335170; bh=GIlbtTAG+SpsrUj+oKCIMENxrl7XU+zvMPZn2MH3m64=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=godcYnyGTo1ILsH5fJrwgfI2UrufTn4Di+Etr2NgBphdQ6oRynxp9BfZDHs3mauKj ZxJ8TMZWP9obD7RwumR6yaOHtJYMBJ4q6ZxyFIEdBTnKf9ziMDmZS7VxKemMeAhXit Z1FvsC/RoNVpA8/AY5KZh337raH7FUHseYOc7AlEPR18tPddL+3SF40C67AylA6G7q LaPB8yIf5y4X62UbSlG+82w68/DSalqzQJKuSf2hUmg/3NzAh7eKRXMt+cBGISSPny 71v9G6Y95ceBxkjo0gKmgSOaRYtZJyX2yLrocDNSVBRnTq+xsVXOCzkeNCdFRIyuD+ tmuBSg1fddz+w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDE86C3DA7F; Tue, 30 Jul 2024 10:26:10 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:09 +0200 Subject: [PATCH v11 01/12] clk: mmp: Switch to use struct u32_fract instead of custom one MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-1-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andy Shevchenko X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=10502; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=WZDqO4o4/nDKV7+l/G8915ON/cRfk/nDyxJ0ufM+k0A=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m+2FdoS4/Sje0k0l5PE06otvX4Fy77rf73wse6xx vvp6d1sHaUsDGJcDLJiiiy5/x2v8X4W2bo9e5kBzBxWJpAhDFycAjCRVa8Y/spVd8oXLV1mJKu9 nr9LZa0y89HI3UvX79t1NXXfB7PDM/MY/juIuG3d2aUZOPNUSf2peIuNQuHtumcFzzanv980Mcu VhwUA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112615_025991_8C33C990 X-CRM114-Status: GOOD ( 21.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Andy Shevchenko The struct mmp_clk_factor_tbl repeats the generic struct u32_fract. Kill the custom one and use the generic one instead. Signed-off-by: Andy Shevchenko Tested-by: Duje Mihanović Reviewed-by: Linus Walleij Reviewed-by: Stephen Boyd Signed-off-by: Duje Mihanović --- drivers/clk/mmp/clk-frac.c | 57 ++++++++++++++++++++-------------------- drivers/clk/mmp/clk-of-mmp2.c | 26 +++++++++--------- drivers/clk/mmp/clk-of-pxa168.c | 4 +-- drivers/clk/mmp/clk-of-pxa1928.c | 6 ++--- drivers/clk/mmp/clk-of-pxa910.c | 4 +-- drivers/clk/mmp/clk.h | 10 +++---- 6 files changed, 51 insertions(+), 56 deletions(-) diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c index 1b90867b60c4..6556f6ada2e8 100644 --- a/drivers/clk/mmp/clk-frac.c +++ b/drivers/clk/mmp/clk-frac.c @@ -26,14 +26,15 @@ static long clk_factor_round_rate(struct clk_hw *hw, unsigned long drate, { struct mmp_clk_factor *factor = to_clk_factor(hw); u64 rate = 0, prev_rate; + struct u32_fract *d; int i; for (i = 0; i < factor->ftbl_cnt; i++) { - prev_rate = rate; - rate = *prate; - rate *= factor->ftbl[i].den; - do_div(rate, factor->ftbl[i].num * factor->masks->factor); + d = &factor->ftbl[i]; + prev_rate = rate; + rate = (u64)(*prate) * d->denominator; + do_div(rate, d->numerator * factor->masks->factor); if (rate > drate) break; } @@ -52,23 +53,22 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, { struct mmp_clk_factor *factor = to_clk_factor(hw); struct mmp_clk_factor_masks *masks = factor->masks; - unsigned int val, num, den; + struct u32_fract d; + unsigned int val; u64 rate; val = readl_relaxed(factor->base); /* calculate numerator */ - num = (val >> masks->num_shift) & masks->num_mask; + d.numerator = (val >> masks->num_shift) & masks->num_mask; /* calculate denominator */ - den = (val >> masks->den_shift) & masks->den_mask; - - if (!den) + d.denominator = (val >> masks->den_shift) & masks->den_mask; + if (!d.denominator) return 0; - rate = parent_rate; - rate *= den; - do_div(rate, num * factor->masks->factor); + rate = (u64)parent_rate * d.denominator; + do_div(rate, d.numerator * factor->masks->factor); return rate; } @@ -82,18 +82,18 @@ static int clk_factor_set_rate(struct clk_hw *hw, unsigned long drate, int i; unsigned long val; unsigned long flags = 0; + struct u32_fract *d; u64 rate = 0; for (i = 0; i < factor->ftbl_cnt; i++) { - rate = prate; - rate *= factor->ftbl[i].den; - do_div(rate, factor->ftbl[i].num * factor->masks->factor); + d = &factor->ftbl[i]; + rate = (u64)prate * d->denominator; + do_div(rate, d->numerator * factor->masks->factor); if (rate > drate) break; } - if (i > 0) - i--; + d = i ? &factor->ftbl[i - 1] : &factor->ftbl[0]; if (factor->lock) spin_lock_irqsave(factor->lock, flags); @@ -101,10 +101,10 @@ static int clk_factor_set_rate(struct clk_hw *hw, unsigned long drate, val = readl_relaxed(factor->base); val &= ~(masks->num_mask << masks->num_shift); - val |= (factor->ftbl[i].num & masks->num_mask) << masks->num_shift; + val |= (d->numerator & masks->num_mask) << masks->num_shift; val &= ~(masks->den_mask << masks->den_shift); - val |= (factor->ftbl[i].den & masks->den_mask) << masks->den_shift; + val |= (d->denominator & masks->den_mask) << masks->den_shift; writel_relaxed(val, factor->base); @@ -118,7 +118,8 @@ static int clk_factor_init(struct clk_hw *hw) { struct mmp_clk_factor *factor = to_clk_factor(hw); struct mmp_clk_factor_masks *masks = factor->masks; - u32 val, num, den; + struct u32_fract d; + u32 val; int i; unsigned long flags = 0; @@ -128,23 +129,22 @@ static int clk_factor_init(struct clk_hw *hw) val = readl(factor->base); /* calculate numerator */ - num = (val >> masks->num_shift) & masks->num_mask; + d.numerator = (val >> masks->num_shift) & masks->num_mask; /* calculate denominator */ - den = (val >> masks->den_shift) & masks->den_mask; + d.denominator = (val >> masks->den_shift) & masks->den_mask; for (i = 0; i < factor->ftbl_cnt; i++) - if (den == factor->ftbl[i].den && num == factor->ftbl[i].num) + if (d.denominator == factor->ftbl[i].denominator && + d.numerator == factor->ftbl[i].numerator) break; if (i >= factor->ftbl_cnt) { val &= ~(masks->num_mask << masks->num_shift); - val |= (factor->ftbl[0].num & masks->num_mask) << - masks->num_shift; + val |= (factor->ftbl[0].numerator & masks->num_mask) << masks->num_shift; val &= ~(masks->den_mask << masks->den_shift); - val |= (factor->ftbl[0].den & masks->den_mask) << - masks->den_shift; + val |= (factor->ftbl[0].denominator & masks->den_mask) << masks->den_shift; } if (!(val & masks->enable_mask) || i >= factor->ftbl_cnt) { @@ -168,8 +168,7 @@ static const struct clk_ops clk_factor_ops = { struct clk *mmp_clk_register_factor(const char *name, const char *parent_name, unsigned long flags, void __iomem *base, struct mmp_clk_factor_masks *masks, - struct mmp_clk_factor_tbl *ftbl, - unsigned int ftbl_cnt, spinlock_t *lock) + struct u32_fract *ftbl, unsigned int ftbl_cnt, spinlock_t *lock) { struct mmp_clk_factor *factor; struct clk_init_data init; diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c index eaad36ee323d..a4f15cee630e 100644 --- a/drivers/clk/mmp/clk-of-mmp2.c +++ b/drivers/clk/mmp/clk-of-mmp2.c @@ -143,9 +143,9 @@ static struct mmp_clk_factor_masks uart_factor_masks = { .den_shift = 0, }; -static struct mmp_clk_factor_tbl uart_factor_tbl[] = { - {.num = 8125, .den = 1536}, /*14.745MHZ */ - {.num = 3521, .den = 689}, /*19.23MHZ */ +static struct u32_fract uart_factor_tbl[] = { + { .numerator = 8125, .denominator = 1536 }, /* 14.745MHZ */ + { .numerator = 3521, .denominator = 689 }, /* 19.23MHZ */ }; static struct mmp_clk_factor_masks i2s_factor_masks = { @@ -157,16 +157,16 @@ static struct mmp_clk_factor_masks i2s_factor_masks = { .enable_mask = 0xd0000000, }; -static struct mmp_clk_factor_tbl i2s_factor_tbl[] = { - {.num = 24868, .den = 511}, /* 2.0480 MHz */ - {.num = 28003, .den = 793}, /* 2.8224 MHz */ - {.num = 24941, .den = 1025}, /* 4.0960 MHz */ - {.num = 28003, .den = 1586}, /* 5.6448 MHz */ - {.num = 31158, .den = 2561}, /* 8.1920 MHz */ - {.num = 16288, .den = 1845}, /* 11.2896 MHz */ - {.num = 20772, .den = 2561}, /* 12.2880 MHz */ - {.num = 8144, .den = 1845}, /* 22.5792 MHz */ - {.num = 10386, .den = 2561}, /* 24.5760 MHz */ +static struct u32_fract i2s_factor_tbl[] = { + { .numerator = 24868, .denominator = 511 }, /* 2.0480 MHz */ + { .numerator = 28003, .denominator = 793 }, /* 2.8224 MHz */ + { .numerator = 24941, .denominator = 1025 }, /* 4.0960 MHz */ + { .numerator = 28003, .denominator = 1586 }, /* 5.6448 MHz */ + { .numerator = 31158, .denominator = 2561 }, /* 8.1920 MHz */ + { .numerator = 16288, .denominator = 1845 }, /* 11.2896 MHz */ + { .numerator = 20772, .denominator = 2561 }, /* 12.2880 MHz */ + { .numerator = 8144, .denominator = 1845 }, /* 22.5792 MHz */ + { .numerator = 10386, .denominator = 2561 }, /* 24.5760 MHz */ }; static DEFINE_SPINLOCK(acgr_lock); diff --git a/drivers/clk/mmp/clk-of-pxa168.c b/drivers/clk/mmp/clk-of-pxa168.c index c5a7ba1deaa3..5f250427e60d 100644 --- a/drivers/clk/mmp/clk-of-pxa168.c +++ b/drivers/clk/mmp/clk-of-pxa168.c @@ -106,8 +106,8 @@ static struct mmp_clk_factor_masks uart_factor_masks = { .den_shift = 0, }; -static struct mmp_clk_factor_tbl uart_factor_tbl[] = { - {.num = 8125, .den = 1536}, /*14.745MHZ */ +static struct u32_fract uart_factor_tbl[] = { + { .numerator = 8125, .denominator = 1536 }, /* 14.745MHZ */ }; static void pxa168_pll_init(struct pxa168_clk_unit *pxa_unit) diff --git a/drivers/clk/mmp/clk-of-pxa1928.c b/drivers/clk/mmp/clk-of-pxa1928.c index 9def4b5f10e9..ebb6e278eda3 100644 --- a/drivers/clk/mmp/clk-of-pxa1928.c +++ b/drivers/clk/mmp/clk-of-pxa1928.c @@ -61,9 +61,9 @@ static struct mmp_clk_factor_masks uart_factor_masks = { .den_shift = 0, }; -static struct mmp_clk_factor_tbl uart_factor_tbl[] = { - {.num = 832, .den = 234}, /*58.5MHZ */ - {.num = 1, .den = 1}, /*26MHZ */ +static struct u32_fract uart_factor_tbl[] = { + { .numerator = 832, .denominator = 234 }, /* 58.5MHZ */ + { .numerator = 1, .denominator = 1 }, /* 26MHZ */ }; static void pxa1928_pll_init(struct pxa1928_clk_unit *pxa_unit) diff --git a/drivers/clk/mmp/clk-of-pxa910.c b/drivers/clk/mmp/clk-of-pxa910.c index 7a38c424782e..fe65e7bdb411 100644 --- a/drivers/clk/mmp/clk-of-pxa910.c +++ b/drivers/clk/mmp/clk-of-pxa910.c @@ -86,8 +86,8 @@ static struct mmp_clk_factor_masks uart_factor_masks = { .den_shift = 0, }; -static struct mmp_clk_factor_tbl uart_factor_tbl[] = { - {.num = 8125, .den = 1536}, /*14.745MHZ */ +static struct u32_fract uart_factor_tbl[] = { + { .numerator = 8125, .denominator = 1536 }, /* 14.745MHZ */ }; static void pxa910_pll_init(struct pxa910_clk_unit *pxa_unit) diff --git a/drivers/clk/mmp/clk.h b/drivers/clk/mmp/clk.h index 55ac05379781..c83cec169ddc 100644 --- a/drivers/clk/mmp/clk.h +++ b/drivers/clk/mmp/clk.h @@ -3,6 +3,7 @@ #define __MACH_MMP_CLK_H #include +#include #include #include @@ -20,16 +21,11 @@ struct mmp_clk_factor_masks { unsigned int enable_mask; }; -struct mmp_clk_factor_tbl { - unsigned int num; - unsigned int den; -}; - struct mmp_clk_factor { struct clk_hw hw; void __iomem *base; struct mmp_clk_factor_masks *masks; - struct mmp_clk_factor_tbl *ftbl; + struct u32_fract *ftbl; unsigned int ftbl_cnt; spinlock_t *lock; }; @@ -37,7 +33,7 @@ struct mmp_clk_factor { extern struct clk *mmp_clk_register_factor(const char *name, const char *parent_name, unsigned long flags, void __iomem *base, struct mmp_clk_factor_masks *masks, - struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt, + struct u32_fract *ftbl, unsigned int ftbl_cnt, spinlock_t *lock); /* Clock type "mix" */ From patchwork Tue Jul 30 10:25:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747275 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19D74C3DA49 for ; Tue, 30 Jul 2024 11:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RRemH8o9PITjaeyS0efQfDV7VKWJS7fQ+0/cPX/ucTY=; b=aSFOK2eZEfu4GenHrWHB746imt pTMDdru82P9h0gSCFyOd+7ZooB25qshS58ScepxwaVozjl1GsNPCRz7OVTh9YswS0gb+cqwdU5Cbr vwsu2832dCbiaClAG9yYl3+K4WAy9IJEjyG5JhYZw2TVf2ZxC/iM3IFpaF64JPrxVZImBRtEgWke6 Uwqb8qDODB2JWMX1Lf+EWNWWBzHlnEbUt+Q+TD8r4TdMyxd5BosOdeYT3k4Z7+BvPOgRo16z+2YDO MkMS9uitycHGwTBUqn3giQa0Pe1Juye4wGtScwZ1poHXZmj53IsbMOETCHUAGuDT5vuA6CTYBG5UP QzW5VRCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3s-0000000EtqK-0tUA; Tue, 30 Jul 2024 11:30:36 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3g-0000000EiMy-3iDV for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=RRemH8o9PITjaeyS0efQfDV7VKWJS7fQ+0/cPX/ucTY=; b=K1kQaEBcrRsz16nWzkW8u9FldO w7e8nU0FG42OCDsYguhbIu53FTlOmJS/JanoPx+8+HRFts/YQcec9mWEYkIeDjrxf4xEJthojbo57 HKkW4Oqc/JPQG8W3mS3gHpU9Xy7setcn4MyT4lQwGmafVsc0Nv34ujFAhsyKntaGBKHT9q06nanIr tcoGI5XSSL5o2qkn6Cf39cDd5irryO1vebrnWZZcbyiOmCR5nu8urmr6WZHH55HoYN8reQTOsivCr aofCM/Vagpqy1kx2Fz6XYNux/t/uxwZis5ZiJQCHEVeqKLeB/d/Cxqy1qaUVY7AXvOjWO9G2HH2iE nCMm0Bvg==; Received: from sin.source.kernel.org ([145.40.73.55]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3b-00000004xsf-11Qd for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:19 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 28D85CE0F72; Tue, 30 Jul 2024 10:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id E18B9C4AF15; Tue, 30 Jul 2024 10:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=46Oqf2WgSUncFl6KJ/Rl3s+WL3FozDK9b2e8JLoL7Ns=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=N+BXSZjBPJ05X2LFbTDl1h09oy5MmBGn370bk2kuqsqPK19WsbTPSNHWdkwOejE4r roP+CQgYjlGiJuEANaEYhh/FvfH5NriT4+aVKMYDcgLq7hRUAKM4d+K7nTAkWToN0x xoAjB31G17BY5iGI4s1aLuExj/ClKBgXB+prS8OEzpO326sOCtj4SPrTcuT6Nk1Hcf w7dgSBsy5ifw94SsnBSCeuKfdM0j2oJSAxsiKTUn7uc/mZjjMIzrquwTvzWitXyo6f qZczdGLRjgqpHV4Jp/1dMzAPgXk7Rm8VNkk5TuXUAnX+dGDeHzRWqtSDFlOaP/bU/S oOlTEbC5cHVVQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEE7BC3DA61; Tue, 30 Jul 2024 10:26:10 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:10 +0200 Subject: [PATCH v11 02/12] dt-bindings: pinctrl: pinctrl-single: add marvell,pxa1908-padconf compatible MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-2-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=989; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=mlhjrL140onBNKS/OlhGE8aipvQXsIEzCBjKg3OZbFE=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m8+fdLL/eGBzkMCxouFiiYUTRASq25QeL3z0Z5gk +Ri33enO0pZGMS4GGTFFFly/zte4/0ssnV79jIDmDmsTCBDGLg4BWAir9YwMvwrNghK8u14+ff+ J62MmJmh19wPbnN/9l7YdlJ5yq+tZtkM/6zz7vI973IKMHrxWLNzGZOk58HsmfanTJbH9+w4/dZ rMx8A X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112616_467961_09F0335F X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add the "marvell,pxa1908-padconf" compatible to allow migrating to a separate pinctrl driver later. Reviewed-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Duje Mihanović --- Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml index e02595316c9f..f83dbf32ad18 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml @@ -33,6 +33,10 @@ properties: - ti,omap5-padconf - ti,j7200-padconf - const: pinctrl-single + - items: + - enum: + - marvell,pxa1908-padconf + - const: pinconf-single reg: maxItems: 1 From patchwork Tue Jul 30 10:25:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33C4FC3DA7E for ; Tue, 30 Jul 2024 11:30:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=36z5Vv2XJz2FZd/s8TGeMACgIiRMzw6OKSGZ52imvDg=; b=WsapQWB7yA6i0MC0PxpvRGVTvS hrhv/MSjri6YoXXJdwfb62ZL8rcx/dsVucSDwpQ/6qPyt/Eug1jUIK/aLxcrG/s15dh6U9Vgd9O/8 aJqe69L+989jer5PLJdzvIJiOl1Tm7y+SEDXFeu7RPcIQImK4HXvOYEuv4ayE8VsjGprKE9DANEmd Ju+sKQf4vusKJVsnZMp0a3bhJWRSWRrUDP3qJS3gd7wAWRWzXOSjFJldcmAr7mmG0ILKtu6tnzf+J 7m07QCfCIEDCKHJM51/S+ND/uO1V9f6fsNRJK+0wXAXppANpgQBJn4nBtmmDzBEvhneNJpzLJh04P 9HSqy1Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3q-0000000EtpE-3zST; Tue, 30 Jul 2024 11:30:34 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3g-0000000EiMv-1PeG for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=36z5Vv2XJz2FZd/s8TGeMACgIiRMzw6OKSGZ52imvDg=; b=NNz+d9/12WeRNZuaNnKPfOwhY5 lpCcUzE9TEqtYxRLUTz/+v3XBBCynJEIZ8ZgBfYwdsc1ZnmafoLRxlGQL6HrqWPRtEWOuC+B3lqwz MMyD8IeLXiniYX7GmahiID+3HxuEHtRGjRXT9X+VMaOUPZ7fP+JVetLusEuX+eTMNK8E84oehH236 A2JThMmXekgLTkxttKE+lA4IVHDHHlVi8S9p4enTEc74JEPzWQe0YTdZwxOdrbf9oHQPWlPDDpZe8 VQopY9zTIfagmYufVkIBj8vStvpDqx0Xy+xO70mCZqndm0NZjE34PayF3m2k4JsxH80fL65O5MsU4 +dN+ICEQ==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3a-00000004xsY-2hkt for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7B43C61E66; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 05553C4AF1D; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=0d4cLa1Ic0Cl8c4k7lLoTR7z9RYXhTtJPGblfCY7fmA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=mpjpVRlZXRop/445ykUNovxlhgtsY6jwRuom1qF3JKAz9HzG9KEU2h7lW0mODTZwY tkoqBzVdNbBsXN8A30Zc0n2AWQ63iza7Kyyw5BOYge2uddHGc+21rcnt+cqMripxh/ k4Gzlcxdo3f5eEi2Ce7FolltndD+s+cnRb1o7HcuEk3a+r0H1D0dSXTrSqw/r0UpIK X0WwWGdyicK8smf5284Mk5wQ1y3gMYh0KIzmdcm8t/piMLaPtAPO1NRk+BtgCQEMsH mzi+Bn15axZ2dEZRPsLoeltERfEzvGn4W7jt+8i8Bln7gGFHMc9TFN2P1RACfabghC RTUzXdnuieckw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF0BBC49EA1; Tue, 30 Jul 2024 10:26:10 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:11 +0200 Subject: [PATCH v11 03/12] pinctrl: single: add marvell,pxa1908-padconf compatible MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-3-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=938; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=nYweYn5B7a8N7bBvBLtJmhM3QSMoorGx+lcXKMQV7l4=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m9eP3WLv5jdTY/XV//s5Fhl/Ccwfv83q3u1UeXHv z1327/hTUcpC4MYF4OsmCJL7n/Ha7yfRbZuz15mADOHlQlkCAMXpwBMpCqA4b+/tkfBubsKvQL1 /Ru897LV2Gdz9jpe9Di27tIKFf+L3pcZ/un5dUzct3XLwthreTbRDEu55jAc+3v4aadVyrrKqGC hDRwA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112615_184817_119BFF9B X-CRM114-Status: GOOD ( 10.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add the "marvell,pxa1908-padconf" compatible to allow migrating to a separate pinctrl driver later. Acked-by: Linus Walleij Signed-off-by: Duje Mihanović --- drivers/pinctrl/pinctrl-single.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 4c6bfabb6bd7..45166d479c70 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1963,6 +1963,7 @@ static const struct pcs_soc_data pinconf_single = { }; static const struct of_device_id pcs_of_match[] = { + { .compatible = "marvell,pxa1908-padconf", .data = &pinconf_single }, { .compatible = "ti,am437-padconf", .data = &pinctrl_single_am437x }, { .compatible = "ti,am654-padconf", .data = &pinctrl_single_am654 }, { .compatible = "ti,dra7-padconf", .data = &pinctrl_single_dra7 }, From patchwork Tue Jul 30 10:25:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35239C3DA49 for ; Tue, 30 Jul 2024 10:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2iY7P0d9jtGx15LOEkKuAOagvBRD/YI04IAWkS+BiC8=; b=4BhZUzcGcKG348STEkC0sqyeoT 62kZP8Mbauv1ZbmtvantvaCkjVJbZtOdBEf3lYqxPLb9Wgt0HjGE6JLnGu8XAG6SZw9BWJyVQX5+e +MUQJdb3xsloeZqpH2MzDPYEzs6684MiMalEMpQO39v4ktWQRIruYByfyeR58iTb3BLQYgs9zZhO1 zKpYKkSmcJeYRZ3osVQoZgplR7v0/tr3q2JmiPm6D/bzY36jChZUCyPIUJmKzn2hckczNapTiS96s oDOPnXg0Dk8/xyWEXIsWm/c9aOZv20ZHJkYWC74ZFj7DWVncG3dq18zOd0WYaefYN3hlNBXUl3zxs HwTfukUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk87-0000000EjHv-1zon; Tue, 30 Jul 2024 10:30:55 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3k-0000000EiNs-3pjf for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=2iY7P0d9jtGx15LOEkKuAOagvBRD/YI04IAWkS+BiC8=; b=Qnau/WcKhwvdjuzWmzbiAf+8ty 3KwjgM5P9AHlkDQjIPrq/ZMfZ0kTVroDibrMzfgAHRL9aDt6RkY5cNWa8Y2++nsl36HCytObGQ1Hs JNQ10fJAYAnwB/vuvG2n4I0zuKbqxzxamagIYOc/kIDb7GLNIpuDJCaXLuUegak86d0/OAU9GM22k QbMxq6lT5H536GUTvQhZZls3ugwMZCf5ra7705s/x0xfl2dbqM8QgOrQQ/6PsOc+YCbIPfkglvKkP pvEu6w9aIWkzjDAGfgKbHm22aZhHZAvsWhsddK5ly57krAVbdxGj53ir8R2y/6aCLDxo11nBXm6oZ 8hxRUaHA==; Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3g-0000000EZg8-0ERY for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:23 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9C12DCE0F96; Tue, 30 Jul 2024 10:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 12ED0C4AF52; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=HTq8KxdlBff6aHVfaDL9tdZs8oniKPuVqDJdX3FXXA0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=hmXjW1fpsVHmTfgmyeFyogd6JxcedGzI2LkuLqbPM0AXFk85YvL0EgzPtb9Gduke/ l4TithREs+VE2u/kRG2kzavTOrnGyWMuSPCI3tam73vyrFN7tPZEthudAwr0S7Qn0G FqmCVSe+U8NBB5dPY0dVBR1Qb/R/+rtSziw498v+IAAuvjizD/xiGDjV2/mEabL0pm PzbouARYdADjHHTKVHKzp5XGCbFHSKnwUWD7cDuFzBn81F6c3gzjXuF/EVjxjz9rxB nQpL9CkV4aSsS38AD5GHoxCAuexfGMceo9HslfSGaZB0Wbynidt1t5n1BATnI26ddu GHbnDo8Zfrm/w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08114C3DA49; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:12 +0200 Subject: [PATCH v11 04/12] dt-bindings: clock: Add Marvell PXA1908 clock bindings MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-4-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Conor Dooley X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4973; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=KMQL466nychebb4YZnaiI07BFVr6kSgzNovpEb0k4I8=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m9Zvdp+opL46fb1FrdEz5rtEU878zU1kCszpUa1N Ui7kOdMRykLgxgXg6yYIkvuf8drvJ9Ftm7PXmYAM4eVCWQIAxenAEzkbRDDf9fdcUcrJ7yesKbn fIXCioT/t5VWPfvXMl+/mZl55T2b1kRGhkcs8ae+VMY48d1zznRz6Vepf2FSwBP9KPBNyrc9d28 +5AMA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112620_622870_97D4CD0C X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add dt bindings and documentation for the Marvell PXA1908 clock controller. Reviewed-by: Conor Dooley Reviewed-by: Stephen Boyd Signed-off-by: Duje Mihanović --- .../devicetree/bindings/clock/marvell,pxa1908.yaml | 48 ++++++++++++ include/dt-bindings/clock/marvell,pxa1908.h | 88 ++++++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml new file mode 100644 index 000000000000..4e78933232b6 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/marvell,pxa1908.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA1908 Clock Controllers + +maintainers: + - Duje Mihanović + +description: | + The PXA1908 clock subsystem generates and supplies clock to various + controllers within the PXA1908 SoC. The PXA1908 contains numerous clock + controller blocks, with the ones currently supported being APBC, APBCP, MPMU + and APMU roughly corresponding to internal buses. + + All these clock identifiers could be found in . + +properties: + compatible: + enum: + - marvell,pxa1908-apbc + - marvell,pxa1908-apbcp + - marvell,pxa1908-mpmu + - marvell,pxa1908-apmu + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + # APMU block: + - | + clock-controller@d4282800 { + compatible = "marvell,pxa1908-apmu"; + reg = <0xd4282800 0x400>; + #clock-cells = <1>; + }; diff --git a/include/dt-bindings/clock/marvell,pxa1908.h b/include/dt-bindings/clock/marvell,pxa1908.h new file mode 100644 index 000000000000..fb15b0d0cd4c --- /dev/null +++ b/include/dt-bindings/clock/marvell,pxa1908.h @@ -0,0 +1,88 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ +#ifndef __DTS_MARVELL_PXA1908_CLOCK_H +#define __DTS_MARVELL_PXA1908_CLOCK_H + +/* plls */ +#define PXA1908_CLK_CLK32 1 +#define PXA1908_CLK_VCTCXO 2 +#define PXA1908_CLK_PLL1_624 3 +#define PXA1908_CLK_PLL1_416 4 +#define PXA1908_CLK_PLL1_499 5 +#define PXA1908_CLK_PLL1_832 6 +#define PXA1908_CLK_PLL1_1248 7 +#define PXA1908_CLK_PLL1_D2 8 +#define PXA1908_CLK_PLL1_D4 9 +#define PXA1908_CLK_PLL1_D8 10 +#define PXA1908_CLK_PLL1_D16 11 +#define PXA1908_CLK_PLL1_D6 12 +#define PXA1908_CLK_PLL1_D12 13 +#define PXA1908_CLK_PLL1_D24 14 +#define PXA1908_CLK_PLL1_D48 15 +#define PXA1908_CLK_PLL1_D96 16 +#define PXA1908_CLK_PLL1_D13 17 +#define PXA1908_CLK_PLL1_32 18 +#define PXA1908_CLK_PLL1_208 19 +#define PXA1908_CLK_PLL1_117 20 +#define PXA1908_CLK_PLL1_416_GATE 21 +#define PXA1908_CLK_PLL1_624_GATE 22 +#define PXA1908_CLK_PLL1_832_GATE 23 +#define PXA1908_CLK_PLL1_1248_GATE 24 +#define PXA1908_CLK_PLL1_D2_GATE 25 +#define PXA1908_CLK_PLL1_499_EN 26 +#define PXA1908_CLK_PLL2VCO 27 +#define PXA1908_CLK_PLL2 28 +#define PXA1908_CLK_PLL2P 29 +#define PXA1908_CLK_PLL2VCODIV3 30 +#define PXA1908_CLK_PLL3VCO 31 +#define PXA1908_CLK_PLL3 32 +#define PXA1908_CLK_PLL3P 33 +#define PXA1908_CLK_PLL3VCODIV3 34 +#define PXA1908_CLK_PLL4VCO 35 +#define PXA1908_CLK_PLL4 36 +#define PXA1908_CLK_PLL4P 37 +#define PXA1908_CLK_PLL4VCODIV3 38 + +/* apb (apbc) peripherals */ +#define PXA1908_CLK_UART0 1 +#define PXA1908_CLK_UART1 2 +#define PXA1908_CLK_GPIO 3 +#define PXA1908_CLK_PWM0 4 +#define PXA1908_CLK_PWM1 5 +#define PXA1908_CLK_PWM2 6 +#define PXA1908_CLK_PWM3 7 +#define PXA1908_CLK_SSP0 8 +#define PXA1908_CLK_SSP1 9 +#define PXA1908_CLK_IPC_RST 10 +#define PXA1908_CLK_RTC 11 +#define PXA1908_CLK_TWSI0 12 +#define PXA1908_CLK_KPC 13 +#define PXA1908_CLK_SWJTAG 14 +#define PXA1908_CLK_SSP2 15 +#define PXA1908_CLK_TWSI1 16 +#define PXA1908_CLK_THERMAL 17 +#define PXA1908_CLK_TWSI3 18 + +/* apb (apbcp) peripherals */ +#define PXA1908_CLK_UART2 1 +#define PXA1908_CLK_TWSI2 2 +#define PXA1908_CLK_AICER 3 + +/* axi (apmu) peripherals */ +#define PXA1908_CLK_CCIC1 1 +#define PXA1908_CLK_ISP 2 +#define PXA1908_CLK_DSI1 3 +#define PXA1908_CLK_DISP1 4 +#define PXA1908_CLK_CCIC0 5 +#define PXA1908_CLK_SDH0 6 +#define PXA1908_CLK_SDH1 7 +#define PXA1908_CLK_USB 8 +#define PXA1908_CLK_NF 9 +#define PXA1908_CLK_CORE_DEBUG 10 +#define PXA1908_CLK_VPU 11 +#define PXA1908_CLK_GC 12 +#define PXA1908_CLK_SDH2 13 +#define PXA1908_CLK_GC2D 14 +#define PXA1908_CLK_TRACE 15 +#define PXA1908_CLK_DVC_DFC_DEBUG 16 + +#endif From patchwork Tue Jul 30 10:25:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747280 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90C55C3DA49 for ; Tue, 30 Jul 2024 11:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FC3JGvKXMAnz00JpZ79F+gt7woupokB2LTl2OfUsdBs=; b=abEqrevsZhHM6SpGZW0zsNO4TS 3MxZS06FEIGdhl71ozcm1gqxMlQjLXk87wogYtJ2JvKJYB9h2MlOj+TNtEnCP4BA0Z4K/2O9ZKl1D TefTuf6wcyYL3L2ME+DObaKDzp0t5cWnaBsPk2Qn99S1cavXz5G5SMmna38moKIZoZ3bjRnD9lXHo adPwVuBgwQ/3kNR2XF/dAFi1Mf7O+ZrCZXQqxyfVn+42vVjUv1jWes9cEJFXuMwwrCTAhheEXA0F/ lcBYiVLmOTy5Qi8LLO/rPMatQnGctj4gLW9Snzp+4EEJJHOS5wAtcZxJOphsfiX7Di/+8fbiY4NLm M7QJ8sfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3r-0000000Etpc-2T1N; Tue, 30 Jul 2024 11:30:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3g-0000000EiMw-2F7v for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=FC3JGvKXMAnz00JpZ79F+gt7woupokB2LTl2OfUsdBs=; b=qhDeOoysq7BHyXPnCaYGQ9XXJM /YxISRuzgknVnNkVLnfObACBeVG67/HGBAXCcV8Bqp62k072H5sPtx5gPHvVGyyhhRH0JbOIgWbRc 7hpkm1pc+7PS1CcOYfuYrVbmIzK0voHPQpMHm/hpXIgQDomg76vNjL0XEDmVKDDtLPmr1nfLh0+x8 cPw7VUUdr8U5fRFAAnmAQ/QKJRTFU7G8TUgXic9AJpCwv9fsrsmQ5Gju7k04Hz0iBTfDGXcldwcCH a+oIuS5oXwnRhwqK7dN3sjHgGhhNOHJME05IVkMdby3s/BB9uQ0smWwDmWwlMbnpRu/Db5p5rjEpN BdTtxpIw==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3a-00000004xsa-3F81 for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C9B8C61E8A; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 2372AC4AF53; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=AEWNeN+JICR4EcZxZthCK+HHrZK9kPhdty3g+UJ4U+I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=emQbiUxZTwsra0sh7zDncdSBAaFnEaJJePqmr7WivbMxZ/Mbip3n9G8WuZUvRaz7j iANeNn/g+sg+5DUNlvJZAQL/AcXHnVuOs3t7w5SbFz/UScezgX8GE291rKQUY1fJm+ h6uQbH4fNx/Z2q/cwahLASLzbT9wyLoCJclKHRPeYYTdaqd/IKYBh8+d4uEncGn3iw 7sKOQZjpzLvFvdiUlBunkQe4fcVnQsPkQGXgK7u2IXt7N5idRCEQe/fCbJlwUszHHL SPiueQVsQKGR3/J38JzKpV7ch52nwREyjY07uM3bQ7Qcb1v6mG5bvPVnCpoSWFeTHz EPvsUKC6Dw9CQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17960C3DA7F; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:13 +0200 Subject: [PATCH v11 05/12] clk: mmp: Add Marvell PXA1908 APBC driver MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-5-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6279; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=LjTRA+snmoaVUrrzBhCFmFBGgt+UrcvoIXtSXsRi8aE=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m9R6bj6ePqfi68S5HfsWd6oeDrsRuiNLfyea/zeL ph5b/mFNR2lLAxiXAyyYoosuf8dr/F+Ftm6PXuZAcwcViaQIQxcnAIwkeuPGRkeHuVrKcw9cVr8 +DdxDX++e8ZXdooKaW2afK1V+ved7pTNDH/4Kovu3rBR/+RbP8PkaM3as8UnduR1Mz29Ub/N+MT FNac5AA== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112615_421163_7C726803 X-CRM114-Status: GOOD ( 17.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add driver for the APBC controller block found on Marvell's PXA1908 SoC. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/Makefile | 2 +- drivers/clk/mmp/clk-pxa1908-apbc.c | 131 +++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mmp/Makefile b/drivers/clk/mmp/Makefile index 441bf83080a1..685bb80f8ae1 100644 --- a/drivers/clk/mmp/Makefile +++ b/drivers/clk/mmp/Makefile @@ -11,4 +11,4 @@ obj-$(CONFIG_MACH_MMP_DT) += clk-of-pxa168.o clk-of-pxa910.o obj-$(CONFIG_COMMON_CLK_MMP2) += clk-of-mmp2.o clk-pll.o pwr-island.o obj-$(CONFIG_COMMON_CLK_MMP2_AUDIO) += clk-audio.o -obj-y += clk-of-pxa1928.o +obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o diff --git a/drivers/clk/mmp/clk-pxa1908-apbc.c b/drivers/clk/mmp/clk-pxa1908-apbc.c new file mode 100644 index 000000000000..a418b9f895c1 --- /dev/null +++ b/drivers/clk/mmp/clk-pxa1908-apbc.c @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include +#include +#include +#include +#include + +#include + +#include "clk.h" + +#define APBC_UART0 0x0 +#define APBC_UART1 0x4 +#define APBC_GPIO 0x8 +#define APBC_PWM0 0xc +#define APBC_PWM1 0x10 +#define APBC_PWM2 0x14 +#define APBC_PWM3 0x18 +#define APBC_SSP0 0x1c +#define APBC_SSP1 0x20 +#define APBC_IPC_RST 0x24 +#define APBC_RTC 0x28 +#define APBC_TWSI0 0x2c +#define APBC_KPC 0x30 +#define APBC_SWJTAG 0x40 +#define APBC_SSP2 0x4c +#define APBC_TWSI1 0x60 +#define APBC_THERMAL 0x6c +#define APBC_TWSI3 0x70 + +#define APBC_NR_CLKS 19 + +struct pxa1908_clk_unit { + struct mmp_clk_unit unit; + void __iomem *base; +}; + +static DEFINE_SPINLOCK(pwm0_lock); +static DEFINE_SPINLOCK(pwm2_lock); + +static DEFINE_SPINLOCK(uart0_lock); +static DEFINE_SPINLOCK(uart1_lock); + +static const char * const uart_parent_names[] = {"pll1_117", "uart_pll"}; +static const char * const ssp_parent_names[] = {"pll1_d16", "pll1_d48", "pll1_d24", "pll1_d12"}; + +static struct mmp_param_gate_clk apbc_gate_clks[] = { + {PXA1908_CLK_TWSI0, "twsi0_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI0, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_TWSI1, "twsi1_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI1, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_TWSI3, "twsi3_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI3, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_GPIO, "gpio_clk", "vctcxo", CLK_SET_RATE_PARENT, APBC_GPIO, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_KPC, "kpc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_KPC, 0x7, 3, 0, MMP_CLK_GATE_NEED_DELAY, NULL}, + {PXA1908_CLK_RTC, "rtc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_RTC, 0x87, 0x83, 0, MMP_CLK_GATE_NEED_DELAY, NULL}, + {PXA1908_CLK_PWM0, "pwm0_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_PWM0, 0x2, 2, 0, 0, &pwm0_lock}, + {PXA1908_CLK_PWM1, "pwm1_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_PWM1, 0x6, 2, 0, 0, NULL}, + {PXA1908_CLK_PWM2, "pwm2_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_PWM2, 0x2, 2, 0, 0, NULL}, + {PXA1908_CLK_PWM3, "pwm3_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_PWM3, 0x6, 2, 0, 0, NULL}, + {PXA1908_CLK_UART0, "uart0_clk", "uart0_mux", CLK_SET_RATE_PARENT, APBC_UART0, 0x7, 3, 0, 0, &uart0_lock}, + {PXA1908_CLK_UART1, "uart1_clk", "uart1_mux", CLK_SET_RATE_PARENT, APBC_UART1, 0x7, 3, 0, 0, &uart1_lock}, + {PXA1908_CLK_THERMAL, "thermal_clk", NULL, 0, APBC_THERMAL, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_IPC_RST, "ipc_clk", NULL, 0, APBC_IPC_RST, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_SSP0, "ssp0_clk", "ssp0_mux", 0, APBC_SSP0, 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_SSP2, "ssp2_clk", "ssp2_mux", 0, APBC_SSP2, 0x7, 3, 0, 0, NULL}, +}; + +static struct mmp_param_mux_clk apbc_mux_clks[] = { + {0, "uart0_mux", uart_parent_names, ARRAY_SIZE(uart_parent_names), CLK_SET_RATE_PARENT, APBC_UART0, 4, 3, 0, &uart0_lock}, + {0, "uart1_mux", uart_parent_names, ARRAY_SIZE(uart_parent_names), CLK_SET_RATE_PARENT, APBC_UART1, 4, 3, 0, &uart1_lock}, + {0, "ssp0_mux", ssp_parent_names, ARRAY_SIZE(ssp_parent_names), 0, APBC_SSP0, 4, 3, 0, NULL}, + {0, "ssp2_mux", ssp_parent_names, ARRAY_SIZE(ssp_parent_names), 0, APBC_SSP2, 4, 3, 0, NULL}, +}; + +static void pxa1908_apb_periph_clk_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + struct clk *clk; + + mmp_clk_register_gate(NULL, "pwm01_apb_share", "pll1_d48", + CLK_SET_RATE_PARENT, + pxa_unit->base + APBC_PWM0, + 0x5, 1, 0, 0, &pwm0_lock); + mmp_clk_register_gate(NULL, "pwm23_apb_share", "pll1_d48", + CLK_SET_RATE_PARENT, + pxa_unit->base + APBC_PWM2, + 0x5, 1, 0, 0, &pwm2_lock); + clk = mmp_clk_register_apbc("swjtag", NULL, + pxa_unit->base + APBC_SWJTAG, 10, 0, NULL); + mmp_clk_add(unit, PXA1908_CLK_SWJTAG, clk); + mmp_register_mux_clks(unit, apbc_mux_clks, pxa_unit->base, + ARRAY_SIZE(apbc_mux_clks)); + mmp_register_gate_clks(unit, apbc_gate_clks, pxa_unit->base, + ARRAY_SIZE(apbc_gate_clks)); +} + +static int pxa1908_apbc_probe(struct platform_device *pdev) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = devm_kzalloc(&pdev->dev, sizeof(*pxa_unit), GFP_KERNEL); + if (IS_ERR(pxa_unit)) + return PTR_ERR(pxa_unit); + + pxa_unit->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pxa_unit->base)) + return PTR_ERR(pxa_unit->base); + + mmp_clk_init(pdev->dev.of_node, &pxa_unit->unit, APBC_NR_CLKS); + + pxa1908_apb_periph_clk_init(pxa_unit); + + return 0; +} + +static const struct of_device_id pxa1908_apbc_match_table[] = { + { .compatible = "marvell,pxa1908-apbc" }, + { } +}; +MODULE_DEVICE_TABLE(of, pxa1908_apbc_match_table); + +static struct platform_driver pxa1908_apbc_driver = { + .probe = pxa1908_apbc_probe, + .driver = { + .name = "pxa1908-apbc", + .of_match_table = pxa1908_apbc_match_table + } +}; +module_platform_driver(pxa1908_apbc_driver); + +MODULE_AUTHOR("Duje Mihanović "); +MODULE_DESCRIPTION("Marvell PXA1908 APBC Clock Driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jul 30 10:25:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747225 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90660C3DA49 for ; Tue, 30 Jul 2024 10:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=po7LRHIZxTimbaDiFp5A5SbJnDGOm2gY6t73mSaxVpU=; b=Ftw0lP4QPBpVxJ4RJXtrZNZDk1 jebvaC00qnbMaL7gPQYThbeBtpU+/fOSmMoS/SrXiPw4qTIV9fJ9mAGTwZkQ3CLluxOjPZ+BSRE/j 1Ojiibui8wy/vYi7LqjwTV4AI+237dobrxQV0ZwHszjBbrocnMC//kGf7bHTVwBdzIVGBNWYFeLNU J8Cs81dO6JmRUbnR0U3g5nIkDM8P6DnnCv8+i8c8xGtJcxq8fHjy9PVUV9uLzDVrsSLtLzG4b5ACq KZx8l1EA2AC9D7LwWuLuZ59bfqUWadYBMKD8cQPFemFNNV9kFUjxZ5HWUI+uIwKW5+2CQpv+/pEsi aqotM6jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk8x-0000000Ejbm-3grI; Tue, 30 Jul 2024 10:31:47 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3p-0000000EiOx-0d9t for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=po7LRHIZxTimbaDiFp5A5SbJnDGOm2gY6t73mSaxVpU=; b=SSXomFBSH5z5hPmDWH+eGBaVLp M2g+PvDpDNvsGki2d6oikqUO+NLkVsLrpvtUrJVdWJyL5F9BUDDYPddOi4jW72y28dUdnOGEvlw+p LzrEMP10D0+QPAtVGm9K85j547lfuVo/Mtq+dRwIRImbYrSOrx1igdsYZFoUKGzVDF4etc6ztT0Xq ezxM6V1L3lK2tjmKBhfEYesG15lXat/fwlgZ+j6Kdvk7c/vDealorbTRmCaustzWv6GCWqqBIQl6R MePpKlsyI9SeprRtxFJpTZKDPWk6nTexoZPotuOdMK5YaGqeMIcAKZRPGVAo8P1BAK1fve9Me4YT2 zI+nafoA==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3b-00000004xsb-3KVc for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E6B1961E90; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 31222C4AF62; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=6eHddPVGPNGu45tjA8N1T/anIVe7WOGhBOGi7XxkJdc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=XmrITfTnfROV+LelKGCXviuRkwwL6L0i2KBYhV3T/sZ+voMjCh8buRzuRVjpw+9ym HbVYdjlaC1lFfmNcdxiAzOzCVTGRJgmgHSToj4ZheeOfiQ242/wSCdj8YrjTyQoouU DlbZ5vYgjtIIuR9FK1HvtFf300ncb+6+KOO5zFLTe4e8ukBZ+D1epSvEkI0oy93C28 9zfRPWEiIapepUF8X8+5j3W+olFCEFhfUA3hhztJ125xF0hbDW81+nys2oQkX8IMvm VT8V9ltN5hMKaqYsSHSePKKFqPvwJgPDZrcQPehG+nnT2RNdH6Ll//Gcjg0b7knQZT WhSIwg0xz5NmA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 264A1C52D1D; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:14 +0200 Subject: [PATCH v11 06/12] clk: mmp: Add Marvell PXA1908 APBCP driver MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-6-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3684; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=USsJLoGDJXHCWdJAW+Lle+IllTO8RpuR/kOtJOEgQTM=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m9h8uD9sfqcJFdzQe3yXjarmf2h7272Tm2pO3zjQ s/Un9t3d5SyMIhxMciKKbLk/ne8xvtZZOv27GUGMHNYmUCGMHBxCsBENp5k+O9oUndwzvT71Ws2 Li3QvsgunxRQvztCtmKO8m7nJS5btWQYGa5dD8s7kNr3N+jTFA6tR/UF/Nfmcr+N7hGYmlYk9f5 wITcA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112626_265915_7B2A7D84 X-CRM114-Status: GOOD ( 17.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add driver for the APBCP controller block found on Marvell's PXA1908 SoC. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/Makefile | 2 +- drivers/clk/mmp/clk-pxa1908-apbcp.c | 84 +++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mmp/Makefile b/drivers/clk/mmp/Makefile index 685bb80f8ae1..038bcd4d035e 100644 --- a/drivers/clk/mmp/Makefile +++ b/drivers/clk/mmp/Makefile @@ -11,4 +11,4 @@ obj-$(CONFIG_MACH_MMP_DT) += clk-of-pxa168.o clk-of-pxa910.o obj-$(CONFIG_COMMON_CLK_MMP2) += clk-of-mmp2.o clk-pll.o pwr-island.o obj-$(CONFIG_COMMON_CLK_MMP2_AUDIO) += clk-audio.o -obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o +obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o clk-pxa1908-apbcp.o diff --git a/drivers/clk/mmp/clk-pxa1908-apbcp.c b/drivers/clk/mmp/clk-pxa1908-apbcp.c new file mode 100644 index 000000000000..2a53cf276407 --- /dev/null +++ b/drivers/clk/mmp/clk-pxa1908-apbcp.c @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include +#include +#include +#include +#include +#include + +#include + +#include "clk.h" + +#define APBCP_UART2 0x1c +#define APBCP_TWSI2 0x28 +#define APBCP_AICER 0x38 + +#define APBCP_NR_CLKS 4 + +struct pxa1908_clk_unit { + struct mmp_clk_unit unit; + void __iomem *base; +}; + +static DEFINE_SPINLOCK(uart2_lock); + +static const char * const uart_parent_names[] = {"pll1_117", "uart_pll"}; + +static struct mmp_param_gate_clk apbcp_gate_clks[] = { + {PXA1908_CLK_UART2, "uart2_clk", "uart2_mux", CLK_SET_RATE_PARENT, APBCP_UART2, 0x7, 0x3, 0x0, 0, &uart2_lock}, + {PXA1908_CLK_TWSI2, "twsi2_clk", "pll1_32", CLK_SET_RATE_PARENT, APBCP_TWSI2, 0x7, 0x3, 0x0, 0, NULL}, + {PXA1908_CLK_AICER, "ripc_clk", NULL, 0, APBCP_AICER, 0x7, 0x2, 0x0, 0, NULL}, +}; + +static struct mmp_param_mux_clk apbcp_mux_clks[] = { + {0, "uart2_mux", uart_parent_names, ARRAY_SIZE(uart_parent_names), CLK_SET_RATE_PARENT, APBCP_UART2, 4, 3, 0, &uart2_lock}, +}; + +static void pxa1908_apb_p_periph_clk_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_register_mux_clks(unit, apbcp_mux_clks, pxa_unit->base, + ARRAY_SIZE(apbcp_mux_clks)); + mmp_register_gate_clks(unit, apbcp_gate_clks, pxa_unit->base, + ARRAY_SIZE(apbcp_gate_clks)); +} + +static int pxa1908_apbcp_probe(struct platform_device *pdev) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = devm_kzalloc(&pdev->dev, sizeof(*pxa_unit), GFP_KERNEL); + if (IS_ERR(pxa_unit)) + return PTR_ERR(pxa_unit); + + pxa_unit->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pxa_unit->base)) + return PTR_ERR(pxa_unit->base); + + mmp_clk_init(pdev->dev.of_node, &pxa_unit->unit, APBCP_NR_CLKS); + + pxa1908_apb_p_periph_clk_init(pxa_unit); + + return 0; +} + +static const struct of_device_id pxa1908_apbcp_match_table[] = { + { .compatible = "marvell,pxa1908-apbcp" }, + { } +}; +MODULE_DEVICE_TABLE(of, pxa1908_apbcp_match_table); + +static struct platform_driver pxa1908_apbcp_driver = { + .probe = pxa1908_apbcp_probe, + .driver = { + .name = "pxa1908-apbcp", + .of_match_table = pxa1908_apbcp_match_table + } +}; +module_platform_driver(pxa1908_apbcp_driver); + +MODULE_AUTHOR("Duje Mihanović "); +MODULE_DESCRIPTION("Marvell PXA1908 APBCP Clock Driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jul 30 10:25:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 669EBC52D54 for ; Tue, 30 Jul 2024 11:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8QeD8wY4/L8q5NYFiIpG2KKsKQY9uKcmIThzJvst080=; b=Lgg3v6pFkzMVsNyOVKLBxtS8FJ LP3Qg1kvva4MuLKZEl662MQ6wv4gBqHt/ieJB7DIZX2xc9YjRdA8Z9rXyJa+jEGomdLTKNnxCcdjh f5rDwhY+tCcwlf5OdwJoe2v+gN2moYsz3LSVocoNvsWV/0Yt3RniAh3e4Fso2gnQf36oeFxNy1R1j ssaiMPoi2VoqrPZQ9ksDqOQzoI/UV+GMn4gj+HmF/CDiLA81SG/H7g2szeu0lxOiunJgUyjVo6vsW PCoMQzdiMxSxIE5fPw+T5NgTXFnQZJkXCMm4NHVmhZdHsOCWPYIFfw5m15enrf5nZWy0+o5V47PJz rGu2Jokw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3u-0000000EtsB-19KD; Tue, 30 Jul 2024 11:30:38 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3j-0000000EiNd-1s2x for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=8QeD8wY4/L8q5NYFiIpG2KKsKQY9uKcmIThzJvst080=; b=V/eOPVftymM8sziNfzGgF3SIPU Lvv4kA7fcxlTVAJGQjrbo/ZZBgmgfgbkfjnICREdBTa/cBCXHFB4InmnxqCwjXNsU0M9Ng3aQq5Xf DgqorEz20etyEQBt+KYpP5cdZC3chaUaT5E2/F0KjWsUlQ/bJLTqyCiNbv2+4HFCAynvXpd2uisi8 2DncMTlUaB9WACczQqLQh5n1AEMawGIv1AyJvZQzYWqMZp8N0qshcvY48o5P3ohCTamAsw3gAu/VM KUxMvMHX9nWq9oa/llkBV0FhVNL/pSRCB8JqimdMt2MKLGAK+I3krhGpG+FG+6ttD3Gpz7RmhuvrZ +v9uxq+A==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3f-00000004xwr-1Zsy for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0F84061E7E; Tue, 30 Jul 2024 10:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 423B1C4DDE6; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=M20NbBpDh1F5HaGtzwdKev37C19nzMd1eSdVMlGPyaE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=rIgV0rKj11pAtBEYuZiMqSvG97guqK5jKfdIdwLsIzYGp58d8rHlf3VYLIsABvQbm SOR6ue92F0jcE0gFGc/3+t8ZgvKFJwHxQq7Y/gcMdTLeYvh7IQNJdKf9c/HiiIDqxA M32D1KqEVzjwYE9IIXIETrTUngERCWlZrCT16rWoHhOuwdV0qF4LI7w3L3QfPOenKT 4vq1DfJ7e3KmMDinR2c8aw378kC4jHJVsY7AMZaKjlOxdwVwfttOQOCZC6j/3qPCPz AGzT8HTlfvSdstB6A1hC55V649k9UIgh0QdSWkcoV5BkxFgEtxMnXfhZiYPINbURAi na4RtNJ5L4Brg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 393F0C3DA49; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:15 +0200 Subject: [PATCH v11 07/12] clk: mmp: Add Marvell PXA1908 APMU driver MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-7-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5652; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=Etv7/TUpy5hEHvEFF1V/rXkT1DDO+Xoj32i8URRY6N4=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m8RvLAlemfAWoGXblY8Pp3ahbkCO1sZX1a/j3zs7 sadEXKjo5SFQYyLQVZMkSX3v+M13s8iW7dnLzOAmcPKBDKEgYtTACbS8JeR4Tin/epXHa+CGi9l TTgVX/vd4JyTWrOngle82bLTp1LPXmD4p6p1Ui8ozmCBea3F9JN3ZHa/Xrg27IFN5BNnzQzpeJt KHgA= X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112620_027855_A8BE8BC2 X-CRM114-Status: GOOD ( 18.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add driver for the APMU controller block found on Marvell's PXA1908 SoC. This driver is incomplete, lacking support for (at least) GPU, VPU, DSI and CCIC (camera related) clocks. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/Makefile | 2 +- drivers/clk/mmp/clk-pxa1908-apmu.c | 123 +++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mmp/Makefile b/drivers/clk/mmp/Makefile index 038bcd4d035e..a8b1a4b08824 100644 --- a/drivers/clk/mmp/Makefile +++ b/drivers/clk/mmp/Makefile @@ -11,4 +11,4 @@ obj-$(CONFIG_MACH_MMP_DT) += clk-of-pxa168.o clk-of-pxa910.o obj-$(CONFIG_COMMON_CLK_MMP2) += clk-of-mmp2.o clk-pll.o pwr-island.o obj-$(CONFIG_COMMON_CLK_MMP2_AUDIO) += clk-audio.o -obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o clk-pxa1908-apbcp.o +obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o clk-pxa1908-apbcp.o clk-pxa1908-apmu.o diff --git a/drivers/clk/mmp/clk-pxa1908-apmu.c b/drivers/clk/mmp/clk-pxa1908-apmu.c new file mode 100644 index 000000000000..693254539063 --- /dev/null +++ b/drivers/clk/mmp/clk-pxa1908-apmu.c @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include +#include +#include +#include +#include +#include + +#include + +#include "clk.h" + +#define APMU_CLK_GATE_CTRL 0x40 +#define APMU_CCIC1 0x24 +#define APMU_ISP 0x38 +#define APMU_DSI1 0x44 +#define APMU_DISP1 0x4c +#define APMU_CCIC0 0x50 +#define APMU_SDH0 0x54 +#define APMU_SDH1 0x58 +#define APMU_USB 0x5c +#define APMU_NF 0x60 +#define APMU_VPU 0xa4 +#define APMU_GC 0xcc +#define APMU_SDH2 0xe0 +#define APMU_GC2D 0xf4 +#define APMU_TRACE 0x108 +#define APMU_DVC_DFC_DEBUG 0x140 + +#define APMU_NR_CLKS 17 + +struct pxa1908_clk_unit { + struct mmp_clk_unit unit; + void __iomem *base; +}; + +static DEFINE_SPINLOCK(pll1_lock); +static struct mmp_param_general_gate_clk pll1_gate_clks[] = { + {PXA1908_CLK_PLL1_D2_GATE, "pll1_d2_gate", "pll1_d2", 0, APMU_CLK_GATE_CTRL, 29, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_416_GATE, "pll1_416_gate", "pll1_416", 0, APMU_CLK_GATE_CTRL, 27, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_624_GATE, "pll1_624_gate", "pll1_624", 0, APMU_CLK_GATE_CTRL, 26, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_832_GATE, "pll1_832_gate", "pll1_832", 0, APMU_CLK_GATE_CTRL, 30, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_1248_GATE, "pll1_1248_gate", "pll1_1248", 0, APMU_CLK_GATE_CTRL, 28, 0, &pll1_lock}, +}; + +static DEFINE_SPINLOCK(sdh0_lock); +static DEFINE_SPINLOCK(sdh1_lock); +static DEFINE_SPINLOCK(sdh2_lock); + +static const char * const sdh_parent_names[] = {"pll1_416", "pll1_624"}; + +static struct mmp_clk_mix_config sdh_mix_config = { + .reg_info = DEFINE_MIX_REG_INFO(3, 8, 2, 6, 11), +}; + +static struct mmp_param_gate_clk apmu_gate_clks[] = { + {PXA1908_CLK_USB, "usb_clk", NULL, 0, APMU_USB, 0x9, 0x9, 0x1, 0, NULL}, + {PXA1908_CLK_SDH0, "sdh0_clk", "sdh0_mix_clk", CLK_SET_RATE_PARENT | CLK_SET_RATE_UNGATE, APMU_SDH0, 0x12, 0x12, 0x0, 0, &sdh0_lock}, + {PXA1908_CLK_SDH1, "sdh1_clk", "sdh1_mix_clk", CLK_SET_RATE_PARENT | CLK_SET_RATE_UNGATE, APMU_SDH1, 0x12, 0x12, 0x0, 0, &sdh1_lock}, + {PXA1908_CLK_SDH2, "sdh2_clk", "sdh2_mix_clk", CLK_SET_RATE_PARENT | CLK_SET_RATE_UNGATE, APMU_SDH2, 0x12, 0x12, 0x0, 0, &sdh2_lock} +}; + +static void pxa1908_axi_periph_clk_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_register_general_gate_clks(unit, pll1_gate_clks, + pxa_unit->base, ARRAY_SIZE(pll1_gate_clks)); + + sdh_mix_config.reg_info.reg_clk_ctrl = pxa_unit->base + APMU_SDH0; + mmp_clk_register_mix(NULL, "sdh0_mix_clk", sdh_parent_names, + ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, + &sdh_mix_config, &sdh0_lock); + sdh_mix_config.reg_info.reg_clk_ctrl = pxa_unit->base + APMU_SDH1; + mmp_clk_register_mix(NULL, "sdh1_mix_clk", sdh_parent_names, + ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, + &sdh_mix_config, &sdh1_lock); + sdh_mix_config.reg_info.reg_clk_ctrl = pxa_unit->base + APMU_SDH2; + mmp_clk_register_mix(NULL, "sdh2_mix_clk", sdh_parent_names, + ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, + &sdh_mix_config, &sdh2_lock); + + mmp_register_gate_clks(unit, apmu_gate_clks, pxa_unit->base, + ARRAY_SIZE(apmu_gate_clks)); +} + +static int pxa1908_apmu_probe(struct platform_device *pdev) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = devm_kzalloc(&pdev->dev, sizeof(*pxa_unit), GFP_KERNEL); + if (IS_ERR(pxa_unit)) + return PTR_ERR(pxa_unit); + + pxa_unit->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pxa_unit->base)) + return PTR_ERR(pxa_unit->base); + + mmp_clk_init(pdev->dev.of_node, &pxa_unit->unit, APMU_NR_CLKS); + + pxa1908_axi_periph_clk_init(pxa_unit); + + return 0; +} + +static const struct of_device_id pxa1908_apmu_match_table[] = { + { .compatible = "marvell,pxa1908-apmu" }, + { } +}; +MODULE_DEVICE_TABLE(of, pxa1908_apmu_match_table); + +static struct platform_driver pxa1908_apmu_driver = { + .probe = pxa1908_apmu_probe, + .driver = { + .name = "pxa1908-apmu", + .of_match_table = pxa1908_apmu_match_table + } +}; +module_platform_driver(pxa1908_apmu_driver); + +MODULE_AUTHOR("Duje Mihanović "); +MODULE_DESCRIPTION("Marvell PXA1908 APMU Clock Driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jul 30 10:25:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A594C52D1F for ; Tue, 30 Jul 2024 11:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a1mVwF/tMfxOKwjCJzX7zWm1qxPutTXi8cibPcEZH0o=; b=wxLK28RaQ05TPqyofNrHyy4M3y XIfUtbeLRLDC/LblNceRV12D4+7lFXgA4EN443Iuw1SWs0k44bAe1tsezgrdx1ioJsb/ou8pC/pqi WDEU8Dk7JH6J6Ay/0039mqLidU2ED4hWw3lzF88NqOpur2+i1nePz1RtnZQJF1G4Jjmf72Wk+UU+o xQZhBgndsJtO7xybdRpA092qk/DhBpuAT7WdxmqCf08IdDWPC4Njdo/kownKSzxc4OyGZoNxkp4AL 6PTnm7GXDFCSA/ekSBer8v00aWCLb7XyHmpqjlw+teRL40oD3WY/mEc/zYwQ39ZLRpL/w0cYhWdFn gQ+SWZng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3s-0000000Etqi-3cwV; Tue, 30 Jul 2024 11:30:36 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3h-0000000EiNN-41XD for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=a1mVwF/tMfxOKwjCJzX7zWm1qxPutTXi8cibPcEZH0o=; b=pZrD643x3GTNiKKMU0Xzsyv5qF LTvKHi4ftDeZyIZ0dWqG8gTMmrR5V/j5n9GegOtaFm8sPG9LO6KiIhMGTFS6fKM0vPPDRWeE095fE p6zvihwFtSetYD75EGahe7YqOkVEYJXFoducRNjVH9IfenloUndnnaq908G5G3UN+xNbQJM6pEslM ccnL8QhyUrbF7390zEXQRhssoQvGPVfLTQEQplXtGZ+pWTqyPRYEnQazqQb202AP7c936jxXzanRm RFR2prnUNr2UtTyZzEgqAePUjaMrZ4+5o04Hw48ZS4xLazQ/XCflfxX6HgSkDv5R2hD9iI8cot72l Ir8LTC4g==; Received: from sin.source.kernel.org ([145.40.73.55]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3b-00000004xsi-3KXx for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6FC82CE0F87; Tue, 30 Jul 2024 10:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 5EB08C4DDEF; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=LWQPrf1FvAHGlJ3lnQwcoSykHCEJ8Ls1oovG0sX2X3E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Coogl7o7TgFBF2xIYIe0i6papUedqcpjjiOhYPZ1KjNDljSSSxzqGXyvEWoEjx+QT TBulr/pAFSn8LrMHcJeWvwp+Q+2QKErS8n/J8CEgVnIZn8kwhmv03ta+Iu475kEkvo XBmJvz65Pg3Wj9d+p+BKlsv1uV7AF2VexccLVJ6cIATyXldIMMJiI0WRGKtaNEmedr OMvuVoYjc+o2HKLMHFZE8xxPYvfnQX6daZqJY0ROxHTlLRU0Lhs2h+RaYNo0J+yj9M s0gatL4yWSd2+wUFlBo8MCq6kEzzSG7GSEiFtCqtPRrQ7WkPMjIvW/ERHpQdRu7AHB N0EWOZQCTFuMQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D148C3DA7F; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:16 +0200 Subject: [PATCH v11 08/12] clk: mmp: Add Marvell PXA1908 MPMU driver MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-8-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4933; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=fyLW+E7x8AxGG21iMnrhiFTAVRNSublrbBTu9AUPdPE=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m/ZLLhjmlnkXOs9EpLNsZK5+RF2q+od3ly4zz7/+ IPqR51CHaUsDGJcDLJiiiy5/x2v8X4W2bo9e5kBzBxWJpAhDFycAjARp1sM/+zeZzx+tfjrZ5Uv x1+Z17q7P54pKfFKqzJugsc280lP3/Qx/K/RuWJTWnT5SrmhcOFs55L5IpPWP73hupf7Xqo9+4t TXJwA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112616_751644_F854B6B9 X-CRM114-Status: GOOD ( 18.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add driver for the MPMU controller block on Marvell's PXA1908 SoC. The driver is incomplete, currently only supporting the fixed PLL1; dynamic PLLs 2-4 and CPU/DDR/AXI clock support is missing. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/Makefile | 2 +- drivers/clk/mmp/clk-pxa1908-mpmu.c | 112 +++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mmp/Makefile b/drivers/clk/mmp/Makefile index a8b1a4b08824..062cd87fa8dd 100644 --- a/drivers/clk/mmp/Makefile +++ b/drivers/clk/mmp/Makefile @@ -11,4 +11,4 @@ obj-$(CONFIG_MACH_MMP_DT) += clk-of-pxa168.o clk-of-pxa910.o obj-$(CONFIG_COMMON_CLK_MMP2) += clk-of-mmp2.o clk-pll.o pwr-island.o obj-$(CONFIG_COMMON_CLK_MMP2_AUDIO) += clk-audio.o -obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o clk-pxa1908-apbcp.o clk-pxa1908-apmu.o +obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-pxa1908-apbc.o clk-pxa1908-apbcp.o clk-pxa1908-apmu.o clk-pxa1908-mpmu.o diff --git a/drivers/clk/mmp/clk-pxa1908-mpmu.c b/drivers/clk/mmp/clk-pxa1908-mpmu.c new file mode 100644 index 000000000000..e3337bacaadd --- /dev/null +++ b/drivers/clk/mmp/clk-pxa1908-mpmu.c @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include +#include +#include +#include +#include + +#include + +#include "clk.h" + +#define MPMU_UART_PLL 0x14 + +#define MPMU_NR_CLKS 39 + +struct pxa1908_clk_unit { + struct mmp_clk_unit unit; + void __iomem *base; +}; + +static struct mmp_param_fixed_rate_clk fixed_rate_clks[] = { + {PXA1908_CLK_CLK32, "clk32", NULL, 0, 32768}, + {PXA1908_CLK_VCTCXO, "vctcxo", NULL, 0, 26 * HZ_PER_MHZ}, + {PXA1908_CLK_PLL1_624, "pll1_624", NULL, 0, 624 * HZ_PER_MHZ}, + {PXA1908_CLK_PLL1_416, "pll1_416", NULL, 0, 416 * HZ_PER_MHZ}, + {PXA1908_CLK_PLL1_499, "pll1_499", NULL, 0, 499 * HZ_PER_MHZ}, + {PXA1908_CLK_PLL1_832, "pll1_832", NULL, 0, 832 * HZ_PER_MHZ}, + {PXA1908_CLK_PLL1_1248, "pll1_1248", NULL, 0, 1248 * HZ_PER_MHZ}, +}; + +static struct mmp_param_fixed_factor_clk fixed_factor_clks[] = { + {PXA1908_CLK_PLL1_D2, "pll1_d2", "pll1_624", 1, 2, 0}, + {PXA1908_CLK_PLL1_D4, "pll1_d4", "pll1_d2", 1, 2, 0}, + {PXA1908_CLK_PLL1_D6, "pll1_d6", "pll1_d2", 1, 3, 0}, + {PXA1908_CLK_PLL1_D8, "pll1_d8", "pll1_d4", 1, 2, 0}, + {PXA1908_CLK_PLL1_D12, "pll1_d12", "pll1_d6", 1, 2, 0}, + {PXA1908_CLK_PLL1_D13, "pll1_d13", "pll1_624", 1, 13, 0}, + {PXA1908_CLK_PLL1_D16, "pll1_d16", "pll1_d8", 1, 2, 0}, + {PXA1908_CLK_PLL1_D24, "pll1_d24", "pll1_d12", 1, 2, 0}, + {PXA1908_CLK_PLL1_D48, "pll1_d48", "pll1_d24", 1, 2, 0}, + {PXA1908_CLK_PLL1_D96, "pll1_d96", "pll1_d48", 1, 2, 0}, + {PXA1908_CLK_PLL1_32, "pll1_32", "pll1_d13", 2, 3, 0}, + {PXA1908_CLK_PLL1_208, "pll1_208", "pll1_d2", 2, 3, 0}, + {PXA1908_CLK_PLL1_117, "pll1_117", "pll1_624", 3, 16, 0}, +}; + +static struct u32_fract uart_factor_tbl[] = { + {.numerator = 8125, .denominator = 1536}, /* 14.745MHz */ +}; + +static struct mmp_clk_factor_masks uart_factor_masks = { + .factor = 2, + .num_mask = GENMASK(12, 0), + .den_mask = GENMASK(12, 0), + .num_shift = 16, + .den_shift = 0, +}; + +static void pxa1908_pll_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_register_fixed_rate_clks(unit, fixed_rate_clks, + ARRAY_SIZE(fixed_rate_clks)); + + mmp_register_fixed_factor_clks(unit, fixed_factor_clks, + ARRAY_SIZE(fixed_factor_clks)); + + mmp_clk_register_factor("uart_pll", "pll1_d4", + CLK_SET_RATE_PARENT, + pxa_unit->base + MPMU_UART_PLL, + &uart_factor_masks, uart_factor_tbl, + ARRAY_SIZE(uart_factor_tbl), NULL); +} + +static int pxa1908_mpmu_probe(struct platform_device *pdev) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = devm_kzalloc(&pdev->dev, sizeof(*pxa_unit), GFP_KERNEL); + if (IS_ERR(pxa_unit)) + return PTR_ERR(pxa_unit); + + pxa_unit->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pxa_unit->base)) + return PTR_ERR(pxa_unit->base); + + mmp_clk_init(pdev->dev.of_node, &pxa_unit->unit, MPMU_NR_CLKS); + + pxa1908_pll_init(pxa_unit); + + return 0; +} + +static const struct of_device_id pxa1908_mpmu_match_table[] = { + { .compatible = "marvell,pxa1908-mpmu" }, + { } +}; +MODULE_DEVICE_TABLE(of, pxa1908_mpmu_match_table); + +static struct platform_driver pxa1908_mpmu_driver = { + .probe = pxa1908_mpmu_probe, + .driver = { + .name = "pxa1908-mpmu", + .of_match_table = pxa1908_mpmu_match_table + } +}; +module_platform_driver(pxa1908_mpmu_driver); + +MODULE_AUTHOR("Duje Mihanović "); +MODULE_DESCRIPTION("Marvell PXA1908 MPMU Clock Driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jul 30 10:25:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6195C3DA49 for ; Tue, 30 Jul 2024 10:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zrwrt8tdjGzZLJJm1vDpbsEv54dkOURqAZeTWmpqYUg=; b=EtuBfSb4pnInlh/K1Q7G9Ss2fe JWvfBmJDzmGoDCl3TIRcZEVLiQ9reeBd+TZUUem/sIhIg/lPDrPZSIe7p5LkD3ICzxsyCBGg0V3o7 J45goDf7W8fBZ8TqauwMg07HZiewkjFDlFSE6ykk3Aas9cW5SVYV6aWT//uBEMPpZEohIBmM4KLKb pJYxNyISxvgVDSLV3ojm3nv1Aao+KmYQQ6Jib4LmPO9f+9KAt0fWQoB2JsZUY/pfaQrEC3XRp22MZ FoPUZJ1+uoEe6duRyA7vmIKmo8gsRwsDjuK8ixByFGGyjeSC+IggnFK7PTMd9FeoS+KoYsS9E9t6T EqQ8R7MA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk7i-0000000EjBu-0Rcs; Tue, 30 Jul 2024 10:30:30 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3k-0000000EiNq-2iGk for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=zrwrt8tdjGzZLJJm1vDpbsEv54dkOURqAZeTWmpqYUg=; b=G7q0c4Q1JIueIVdEut4g1F78IL kMMT6xtV57UjvWZcrayZ2rrhiZRD9TMaUwI19f9hND6z4ANkyi/V7NpJZzZW1jz9/xC+3Z8j8xlzB +XOP+TjpQchzVaySE5NUFWpT7KdHLdZxEOnOdeOD7fm6yPt50pgzpC+roLBrbjoDLxBuxw8M8efsB 4RuVldg83CFvJ8YDoKetXklhRpWik4ir5ZHMU7zCFpC4a7nIytjv+ybOKr4pCq/XQQnCm7lIbkgCh lu6JV2TcyGwo7FEti4ThsJ9pp9thbOJsEMk8ROUNHqf+UYW+RHkp1LZUCFlVdQaA77P6fHEDJYWHy VnYjqPow==; Received: from sin.source.kernel.org ([145.40.73.55]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3g-0000000EZg4-0IlI for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:23 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 73683CE0F1E; Tue, 30 Jul 2024 10:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 65EA8C4DDEB; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=yfoG8mqn/X97sdC5spzqwus+gtROE5wIfNQiUg05Vcg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=MeSBDsPaJuHc76nXqAXiIB4Gp+VhTbXnfoTbXAJNzT13Lb5h0InH0zw8p91ZpIGxM eg3WBhoq9HMC0WRub2oYlJtWCQ2LUULo9IZj/EIxVXvvURo7YnEiaVHwMH74Y0L2tk sH1Bas3qPY9V3XLZOxyC6mSlcXHmXoAe7kIVLvxW1Ai4cZ8JeLL3zuv/rHGKoiSZB4 8/lv2aq0K+Z2kI8uE+/tMQt0mhTSyIq3s/qdRzoWt2xLBcb0jSx8LZtKjIxB6kZKuZ DBe1aGqISylhfXA1vJ6lselKJzddTjqtwruTS5o8DJlF0UKwHIGzfM09xKzVjtL/KO fQeFo3KChjATw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D402C49EA1; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:17 +0200 Subject: [PATCH v11 09/12] dt-bindings: marvell: Document PXA1908 SoC MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-9-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=890; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=sKkIzhW7HxgO/mwjme6nrHzJLLNyn3Ni8Blvn7ov2qY=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m85O8Viq9/kkhmrfvD8dFnHUvucI/ee1VODS382T Tm4p7f6UEcpC4MYF4OsmCJL7n/Ha7yfRbZuz15mADOHlQlkCAMXpwBMRH0+w/+cyx9zb1s3zHZr inqW/fBtq72V2JTryoUuLXWfF/6XufyAkWHxrNqNlZdr7xxnesPRLZISqMH6vOakEp+D0hVxLte bgZwA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112620_634205_0CBD6489 X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add dt binding for the Marvell PXA1908 SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Duje Mihanović --- Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml b/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml index 4c43eaf3632e..f73bb8ec3a1a 100644 --- a/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml +++ b/Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml @@ -35,6 +35,11 @@ properties: - enum: - dell,wyse-ariel - const: marvell,mmp3 + - description: PXA1908 based boards + items: + - enum: + - samsung,coreprimevelte + - const: marvell,pxa1908 additionalProperties: true From patchwork Tue Jul 30 10:25:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C4DFC52D1D for ; Tue, 30 Jul 2024 11:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LXyT+YsIV8S2IhvK8mCr1P59MiWWgED5+zaYHQzRvKM=; b=JDrz9NVV/cbtolg0wVOQx3p3/p LKorBHWVjNd+/pZC4kyW83tfpw9JkyNa9z0Nq8Hj40igarMCGKRGwRAi1hwusEXeMztXUjHMKBplD igB+BUENuFdRpMhHgL8KuUFWLJVmNGpz5iXMCC/ynPN/CE/HZZLjK2ehk+LB4FYwBT5mu7F8eAKJy bgZ71JVIDQZR/R14xHyrsmKXVdLZiX3nU6gv2s4Uc0mAiYnAC6kdrJL/USGukLjd/PaxxTMuDuKyN WGVVga2/pmckURLvxKkhgJFD4kGbSmRZdg1G8ui9r5vBCeE0ObrS/oR7UUCWRqcNOt3sgKbLR6mWX s9CClAHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYl3t-0000000EtrD-2EPq; Tue, 30 Jul 2024 11:30:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3i-0000000EiNP-2Mit for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=LXyT+YsIV8S2IhvK8mCr1P59MiWWgED5+zaYHQzRvKM=; b=DfIfTGzt1tyymPnwVGIrUmAxIu WvL5JE3ryEp4GAgK4ZaHGZo3SfWx6BxRe7brzEuPg9nNcDvMqrocT+0qioVlKyYwTDBgyZx6UQ5kB +xU7z6GSJyLbYQXUxdtov6hqSs7wGQUSnlEAZjS09zInccjwFJszQwAoZkCSRzZGZ6SSUkl3zIp+e Epm5yK0sGdDkYf3m9h6jPSv96n8zy4WIxci6FFSg74GNHbAAnbByTskUm61KUuq/oEKjgx3KpPfxR SrCV7iGEGPKkh4vm/QcNffJNAXddct83FSNbdBOpRkd9wdeZIRPfAdCWT7c53ZEEz+w+8Nbjplaqm yGN414Zg==; Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3c-00000004xuV-2ztI for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 070A8CE0FB5; Tue, 30 Jul 2024 10:26:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 74417C32782; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=3uP1ih7kI4uavjZo4LIj3wv6JlboRRHhfsZJxoGFZS8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=kY9V0dp6oosJp4JpcO4JrGdJt7Xkh4kcep9NUHeUQbyPLQX36MOhq9gS/AR9wEYx9 rhZFEUnuxUjTmQA7Brifxk3tixD1A14Oc7YtqTV/3R8zooM+s9T3EWFjWs/rc8JrKi Ppb+29tx2jkhXRe+iiTeYe308N7vVdTM92Z6HiUqIFxr8enB0G0nTpvRh/Dyl9ZF6E 8YMIUnV77fEGamutIYOyIn/JwVyqk/tdVTuJKKmOflv5C2+2Ycuo4lDv23kS/QdxaM 8a8XjjiwFNNn7FOlhJrIXviyi5Va/b9g7Ssgc136L16uT/64BSLEPG/8wljc76sWLq PY92hyDc5CcPQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 699CDC52D1D; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:18 +0200 Subject: [PATCH v11 10/12] arm64: Kconfig.platforms: Add config for Marvell PXA1908 platform MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-10-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=855; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=Lm9peBaijgoN8aADZVkx1zUvsBlNv+32SJbjS2JYwt0=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m8xD932lYON3zG1VavhfNeJHwtW6GTx+WserHgZy 73Rktu+o5SFQYyLQVZMkSX3v+M13s8iW7dnLzOAmcPKBDKEgYtTACayTpuR4YbSmfTkfQ7Fyd0X jvO88qm51Rse7HRn3dOmVusdAZctFzL8ZMx8XccyVfr4NYEmjfzWlv9GU25oVyfvXHXFuLRnTXQ GDwA= X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112617_745589_141A4A15 X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add ARCH_MMP configuration option for Marvell PXA1908 SoC. Signed-off-by: Duje Mihanović --- arch/arm64/Kconfig.platforms | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 6c6d11536b42..6cb21a278447 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -175,6 +175,14 @@ config ARCH_MESON This enables support for the arm64 based Amlogic SoCs such as the s905, S905X/D, S912, A113X/D or S905X/D2 +config ARCH_MMP + bool "Marvell MMP SoC Family" + select PINCTRL + select PINCTRL_SINGLE + help + This enables support for Marvell MMP SoC family, currently + supporting PXA1908 aka IAP140. + config ARCH_MVEBU bool "Marvell EBU SoC Family" select ARMADA_AP806_SYSCON From patchwork Tue Jul 30 10:25:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2F67C3DA7F for ; Tue, 30 Jul 2024 10:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KReR76pBYp5paUTQAAHgZCgYTNF3rNwy+E2bO60NMnQ=; b=fYZdbcTmH40YWMBoHxbNNZeY4n lqzga3xeMLPL+4Z38H7u7seoBsV831ASuoo8rkuJANtzbteF/Yr4iL5Tgyi/l/ol6/52ZcbSbB8A6 /wwHhWSsSMhm4bBgnO8LopB8mxs5lak6fJq+fQUBxlTgDiMPI/ndtStFKnyV6RUJmjB4PTGu2myiW XiI6fp+MfGyaznrlxFq5nyhxAL6BSwU9+xSJ7DJ7ONtQked9cAsx7NAtSggY7agbmwd8VyP0Lm3B5 0fae0nstYwsXnIMAYJHJwIS9rGnklo81mA4bTwf7G77AvMCT6XMhERez0WlYgZuS68HIoyUiAQHeO VBkjMYXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk7K-0000000Ej5t-0SMt; Tue, 30 Jul 2024 10:30:07 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3j-0000000EiNh-3Xj3 for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=KReR76pBYp5paUTQAAHgZCgYTNF3rNwy+E2bO60NMnQ=; b=p3+qOTnYbCQPDIXFYI5klOvhaB b8WBtbI3W4fMGtVdvr/M8iUPka5erPtmK/x8sEoBMNL6uxhTcP7R9hvpYSW6b1QYKvzwDxc1Na1eF LoYIAf8qL4mk6ZCfG/YNdBTUtcnJSYZRuY65GHZI3lUpuQVx0qnu0BO/tuHL14O3OSd7nImZSX+9a tjPxjIdjOjip9EHRoRrr2ZyMQ8IsZ/lNAVqEZZa/EJDTbBSCyZuKcA4F1aNNGiFDv+oKTQrNcbhoc p6kr44RSq2BDMC6ATcNC331F06nYaa7/1br5NX03bHpIpC8TN7W8tPN3DGP3iG2AiDgAw/i4RFuxS /xYCaKrg==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3f-00000004xwq-1ZpF for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6C1BE61EA1; Tue, 30 Jul 2024 10:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 89788C4DE01; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=ChTWqOI8kqfaizUJYRW323w7BcTZS36Wry9itwcnxIU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=JuN4njO2+9ZLVpdvTxZgq4AS3xeNeamhC3tS1hW54ZUpJJyvHiPGIyquqaKEMNu4n Z4EX9BvXr2k/j4fwo04YV7N4cKWThDhy+dK8DKe3ps7KFBrQ1/lEdibu03ypzmogrX c0+LPFrGlOfiRdal6DusVvLjgz4juVzBtqjEr0t10b1gkWRX/SiuYIJzbEc/Hwo5cs UU4FrYDxo6LxCq+uYSE81LftjaZo+q6eQ2aEPVKV5fl7ANDA/ua3VUG7qBkgujahK3 QfGyUxf1ZZux53TvB1RSwRw1xKxvbTNVsOg71K4PPn46hAImt8RxoKz1KHjATyjDBr 4Kk5Lz9KmOmXw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FE1AC3DA49; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:19 +0200 Subject: [PATCH v11 11/12] arm64: dts: Add DTS for Marvell PXA1908 and samsung,coreprimevelte MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-11-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=16553; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=ibk6iB3WnwjS4iLoKkoXs4v59MF9fy9QYTK3dCHTt5g=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m+ZzBpg93Tvwr2bJ+RxqdRKvr9eH8fx67f6qlbl7 Ie/XL9UdpSyMIhxMciKKbLk/ne8xvtZZOv27GUGMHNYmUCGMHBxCsBEthQxMmxZ0rPt0OUORQX+ I52bdwrnOr8KvV5r2x/nJ/TyMI8CVyPD/zibM2t0jk53z5bP+ztF8l5hxa3P20SP3zbjXbfHp9b 2KjMA X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112620_079703_8BE8A217 X-CRM114-Status: GOOD ( 14.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add DTS for Marvell PXA1908 SoC and Samsung Galaxy Core Prime Value Edition LTE, a smartphone based on said SoC. Signed-off-by: Duje Mihanović --- arch/arm64/boot/dts/marvell/Makefile | 3 + .../dts/marvell/pxa1908-samsung-coreprimevelte.dts | 328 +++++++++++++++++++++ arch/arm64/boot/dts/marvell/pxa1908.dtsi | 300 +++++++++++++++++++ 3 files changed, 631 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/Makefile b/arch/arm64/boot/dts/marvell/Makefile index ce751b5028e2..39c5749e631d 100644 --- a/arch/arm64/boot/dts/marvell/Makefile +++ b/arch/arm64/boot/dts/marvell/Makefile @@ -32,3 +32,6 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9130-cf-base.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9130-cf-pro.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9131-cf-solidwan.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9132-clearfog.dtb + +# MMP SoC Family +dtb-$(CONFIG_ARCH_MMP) += pxa1908-samsung-coreprimevelte.dtb diff --git a/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts new file mode 100644 index 000000000000..2a1f309c8e54 --- /dev/null +++ b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "pxa1908.dtsi" +#include +#include + +/ { + model = "Samsung Galaxy Core Prime VE LTE"; + compatible = "samsung,coreprimevelte", "marvell,pxa1908"; + + aliases { + mmc0 = &sdh2; /* eMMC */ + mmc1 = &sdh0; /* SD card */ + serial0 = &uart0; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + stdout-path = "serial0:115200n8"; + + /* S-Boot places the initramfs here */ + linux,initrd-start = <0x4d70000>; + linux,initrd-end = <0x5000000>; + + fb0: framebuffer@17177000 { + compatible = "simple-framebuffer"; + reg = <0 0x17177000 0 (480 * 800 * 4)>; + width = <480>; + height = <800>; + stride = <(480 * 4)>; + format = "a8r8g8b8"; + }; + }; + + /* Bootloader fills this in */ + memory { + device_type = "memory"; + reg = <0 0 0 0>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer@17000000 { + reg = <0 0x17000000 0 0x1800000>; + no-map; + }; + + gpu@9000000 { + reg = <0 0x9000000 0 0x1000000>; + }; + + /* Communications processor, aka modem */ + cp@5000000 { + reg = <0 0x5000000 0 0x3000000>; + }; + + cm3@a000000 { + reg = <0 0xa000000 0 0x80000>; + }; + + seclog@8000000 { + reg = <0 0x8000000 0 0x100000>; + }; + + ramoops@8100000 { + compatible = "ramoops"; + reg = <0 0x8100000 0 0x40000>; + record-size = <0x8000>; + console-size = <0x20000>; + max-reason = <5>; + }; + }; + + + i2c-muic { + compatible = "i2c-gpio"; + sda-gpios = <&gpio 30 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio 29 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <3>; + i2c-gpio,timeout-ms = <100>; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_muic_pins>; + + muic: extcon@14 { + compatible = "siliconmitus,sm5504-muic"; + reg = <0x14>; + interrupt-parent = <&gpio>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pins>; + autorepeat; + + key-home { + label = "Home"; + linux,code = ; + gpios = <&gpio 50 GPIO_ACTIVE_LOW>; + }; + + key-volup { + label = "Volume Up"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + key-voldown { + label = "Volume Down"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&smmu { + status = "okay"; +}; + +&pmx { + pinctrl-single,gpio-range = <&range 55 55 0>, + <&range 110 32 0>, + <&range 52 1 0>; + + pinctrl-names = "default"; + pinctrl-0 = <&board_pins_0 &board_pins_1 &board_pins_2>; + + board_pins_0: board-pins-0 { + pinctrl-single,pins = < + 0x160 0 + 0x164 0 + 0x168 0 + 0x16c 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0x8000 0x8000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0x8000 0 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0x288 0x388>; + }; + + board_pins_1: board-pins-1 { + pinctrl-single,pins = < + 0x44 1 + 0x48 1 + 0x20 1 + 0x18 1 + 0x14 1 + 0x10 1 + 0xc 1 + 0x8 1 + 0x68 1 + 0x58 0 + 0x54 0 + 0x7c 0 + 0x6c 0 + 0x70 0 + 0x4c 1 + 0x50 1 + 0xac 0 + 0x90 0 + 0x8c 0 + 0x88 0 + 0x84 0 + 0xc8 0 + 0x128 0 + 0x190 0 + 0x194 0 + 0x1a0 0 + 0x114 0 + 0x118 0 + 0x1d8 0 + 0x1e4 0 + 0xe8 0 + 0x100 0 + 0x204 0 + 0x210 0 + 0x218 0 + >; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa000 0x8000 0xc000>; + pinctrl-single,low-power-mode = <0x288 0x388>; + }; + + board_pins_2: board-pins-2 { + pinctrl-single,pins = < + 0x260 0 + 0x264 0 + 0x268 0 + 0x26c 0 + 0x270 0 + 0x274 0 + 0x78 0 + 0x74 0 + 0xb0 1 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + uart0_pins: uart0-pins { + pinctrl-single,pins = < + 0x198 6 + 0x19c 6 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + gpio_keys_pins: gpio-keys-pins { + pinctrl-single,pins = < + 0x11c 0 + 0x120 0 + 0x1a4 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa0000 0x8000 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + i2c_muic_pins: i2c-muic-pins { + pinctrl-single,pins = < + 0x154 0 + 0x150 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0x288 0x388>; + }; + + sdh0_pins_0: sdh0-pins-0 { + pinctrl-single,pins = < + 0x108 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa000 0x8000 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh0_pins_1: sdh0-pins-1 { + pinctrl-single,pins = < + 0x94 0 + 0x98 0 + 0x9c 0 + 0xa0 0 + 0xa4 0 + >; + pinctrl-single,drive-strength = <0x800 0x1800>; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa000 0x8000 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh0_pins_2: sdh0-pins-2 { + pinctrl-single,pins = < + 0xa8 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0x40 0 0x40 0x70>; + pinctrl-single,low-power-mode = <0x208 0x388>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; +}; + +&twsi0 { + status = "okay"; +}; + +&twsi1 { + status = "okay"; +}; + +&twsi2 { + status = "okay"; +}; + +&twsi3 { + status = "okay"; +}; + +&usb { + extcon = <&muic>, <&muic>; +}; + +&sdh2 { + /* Disabled for now because initialization fails with -ETIMEDOUT. */ + status = "disabled"; + bus-width = <8>; + non-removable; + mmc-ddr-1_8v; +}; + +&sdh0 { + pinctrl-names = "default"; + pinctrl-0 = <&sdh0_pins_0 &sdh0_pins_1 &sdh0_pins_2>; + cd-gpios = <&gpio 11 0>; + cd-inverted; + bus-width = <4>; + wp-inverted; +}; diff --git a/arch/arm64/boot/dts/marvell/pxa1908.dtsi b/arch/arm64/boot/dts/marvell/pxa1908.dtsi new file mode 100644 index 000000000000..cf2b9109688c --- /dev/null +++ b/arch/arm64/boot/dts/marvell/pxa1908.dtsi @@ -0,0 +1,300 @@ +// SPDX-License-Identifier: GPL-2.0-only +/dts-v1/; + +#include +#include + +/ { + model = "Marvell Armada PXA1908"; + compatible = "marvell,pxa1908"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&gic>; + + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0 0>; + enable-method = "psci"; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0 1>; + enable-method = "psci"; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0 2>; + enable-method = "psci"; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0 3>; + enable-method = "psci"; + }; + }; + + pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , + ; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + }; + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + smmu: iommu@c0010000 { + compatible = "arm,mmu-400"; + reg = <0 0xc0010000 0 0x10000>; + #global-interrupts = <1>; + #iommu-cells = <1>; + interrupts = , + ; + status = "disabled"; + }; + + gic: interrupt-controller@d1df9000 { + compatible = "arm,gic-400"; + reg = <0 0xd1df9000 0 0x1000>, + <0 0xd1dfa000 0 0x2000>, + /* The subsequent registers are guesses. */ + <0 0xd1dfc000 0 0x2000>, + <0 0xd1dfe000 0 0x2000>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <3>; + }; + + apb@d4000000 { + compatible = "simple-bus"; + reg = <0 0xd4000000 0 0x200000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0xd4000000 0x200000>; + + pdma: dma-controller@0 { + compatible = "marvell,pdma-1.0"; + reg = <0 0x10000>; + interrupts = ; + dma-channels = <30>; + #dma-cells = <2>; + }; + + twsi1: i2c@10800 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x10800 0x64>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_TWSI1>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + twsi0: i2c@11000 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x11000 0x64>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_TWSI0>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + twsi3: i2c@13800 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x13800 0x64>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_TWSI3>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + apbc: clock-controller@15000 { + compatible = "marvell,pxa1908-apbc"; + reg = <0x15000 0x1000>; + #clock-cells = <1>; + }; + + uart0: serial@17000 { + compatible = "mrvl,mmp-uart", "intel,xscale-uart"; + reg = <0x17000 0x1000>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_UART0>; + reg-shift = <2>; + }; + + uart1: serial@18000 { + compatible = "mrvl,mmp-uart", "intel,xscale-uart"; + reg = <0x18000 0x1000>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_UART1>; + reg-shift = <2>; + }; + + gpio: gpio@19000 { + compatible = "marvell,mmp-gpio"; + reg = <0x19000 0x800>; + #address-cells = <1>; + #size-cells = <1>; + gpio-controller; + #gpio-cells = <2>; + clocks = <&apbc PXA1908_CLK_GPIO>; + interrupts = ; + interrupt-names = "gpio_mux"; + interrupt-controller; + #interrupt-cells = <2>; + ranges = <0 0x19000 0x800>; + + gpio@0 { + reg = <0x0 0x4>; + }; + + gpio@4 { + reg = <0x4 0x4>; + }; + + gpio@8 { + reg = <0x8 0x4>; + }; + + gpio@100 { + reg = <0x100 0x4>; + }; + }; + + pmx: pinmux@1e000 { + compatible = "marvell,pxa1908-padconf", "pinconf-single"; + reg = <0x1e000 0x330>; + + #pinctrl-cells = <1>; + pinctrl-single,register-width = <32>; + pinctrl-single,function-mask = <7>; + + range: gpio-range { + #pinctrl-single,gpio-range-cells = <3>; + }; + }; + + uart2: serial@36000 { + compatible = "mrvl,mmp-uart", "intel,xscale-uart"; + reg = <0x36000 0x1000>; + interrupts = ; + clocks = <&apbcp PXA1908_CLK_UART2>; + reg-shift = <2>; + }; + + twsi2: i2c@37000 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x37000 0x64>; + interrupts = ; + clocks = <&apbcp PXA1908_CLK_TWSI2>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + apbcp: clock-controller@3b000 { + compatible = "marvell,pxa1908-apbcp"; + reg = <0x3b000 0x1000>; + #clock-cells = <1>; + }; + + mpmu: clock-controller@50000 { + compatible = "marvell,pxa1908-mpmu"; + reg = <0x50000 0x1000>; + #clock-cells = <1>; + }; + }; + + axi@d4200000 { + compatible = "simple-bus"; + reg = <0 0xd4200000 0 0x200000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0xd4200000 0x200000>; + + usbphy: phy@7000 { + compatible = "marvell,pxa1928-usb-phy"; + reg = <0x7000 0x200>; + clocks = <&apmu PXA1908_CLK_USB>; + #phy-cells = <0>; + }; + + usb: usb@8000 { + compatible = "chipidea,usb2"; + reg = <0x8000 0x200>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_USB>; + phys = <&usbphy>; + phy-names = "usb-phy"; + }; + + sdh0: mmc@80000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0x80000 0x120>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_SDH0>; + clock-names = "io"; + mrvl,clk-delay-cycles = <31>; + }; + + sdh1: mmc@80800 { + compatible = "mrvl,pxav3-mmc"; + reg = <0x80800 0x120>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_SDH1>; + clock-names = "io"; + mrvl,clk-delay-cycles = <31>; + }; + + sdh2: mmc@81000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0x81000 0x120>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_SDH2>; + clock-names = "io"; + mrvl,clk-delay-cycles = <31>; + }; + + apmu: clock-controller@82800 { + compatible = "marvell,pxa1908-apmu"; + reg = <0x82800 0x400>; + #clock-cells = <1>; + }; + }; + }; +}; From patchwork Tue Jul 30 10:25:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= X-Patchwork-Id: 13747198 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E3F9C3DA7F for ; Tue, 30 Jul 2024 10:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hnvWm9/p7frGlTr1fJz+gNCCBZLko6NkU7ZBguduLUM=; b=CCvDBpedwieG1mYgy9iJIcrpSj XdHLSwqHbGDA8kdPh/gB7v4InmjaMhx+l5JBIl/CuCcCgOYUFVvNX7bVFRAoS+uKKxinqY6wCZriI bsmK2SR686zAKvXmPQnwyqMyLnIFvi6GgWe4WPcIuAhM6XK7ImEh1OGaFlHidIYueOztYm7o0733t LW+Z/gvLANfUet/EVqsbqcY5qOmjJnAw0brVZH/FgivsMZvf4y/xNa3ZQbu6XqPmT/DjzlJBvez/m VdiJg4xvv1hWntRT1yD+08wKq6QMP36Z24hrBjwaIzQUQtzydSWzqxhEB860SgVqb+31ffKcIpvEp s8y4uSDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk8Y-0000000EjQm-0oYs; Tue, 30 Jul 2024 10:31:22 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3m-0000000EiOQ-2arC for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Jul 2024 10:26:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Reply-To:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Content-ID:Content-Description; bh=hnvWm9/p7frGlTr1fJz+gNCCBZLko6NkU7ZBguduLUM=; b=YXHRjvudYjFjaZrISMUriocony ANsZ14YzZih5ZMHSVjR3dE+Uf2KuH0yqO4fTzfObACKU5+rUvfbl78owepIOCok7cXi2hYR7uIqUZ TwM5Ey3WKXy4Mg2S5XT5nffKLS1pGEai1rX/esK/D7ynUdcDeLATkL82HbHwek449Qu1t9nbo1pFz 3+9Z1MxZWtGryhZ0/E13HOTfRRtyhArIEnjEnC1DffI2vn72NQQiRsITiQzMVaVIfrlTzCKzdUKAn GtMVPLEz9PXW1eEpf07d2z6EpNCybXMnK84+ywRWw/Uev/Q5mUsWGNrfdUsDY9+J6RhQhUTVqNKU4 2YUxdD8A==; Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYk3i-00000004xxy-37JK for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 10:26:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 33280CE0FC0; Tue, 30 Jul 2024 10:26:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 96A54C4DE04; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722335171; bh=LvMq5OWPCJvwQ+xTc3PItgAvDl5FpjadGqHgP819Ft4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=V0uM/UIOFnHBGgkYKrs0dlfAOgS+jBTE9GcJRQr3dxHi5j2W4JGpm3G725PHwXh7B U+Yw8BuzAWbMBiAMu0BzXvQL89OFu2LumHEt/Dx2+0PARUH9VOflB8I9r5Z0ibTBsK ATNPCZjGty7fSojAYlOzQ4jDCUTqapnCgN3QQD02CkYasXaFkLBZ6ENBrSlJ+zwiQi AOVfCK/6CP7XZFeQiuWXKEilv64VYocRD9/uncFJxo/PqLtjQZOXPMqM6LjGR7WI11 BY6cn/yM1RzsGBL5JM+bBnbMhZ1S6X++T3iCrkJWcXypU4/Z5RJe9IUsJ/NTwuoIzk AIOqq9f5eHzcA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EB2FC49EA1; Tue, 30 Jul 2024 10:26:11 +0000 (UTC) From: =?utf-8?q?Duje_Mihanovi=C4=87_via_B4_Relay?= Date: Tue, 30 Jul 2024 12:25:20 +0200 Subject: [PATCH v11 12/12] MAINTAINERS: add myself as Marvell PXA1908 maintainer MIME-Version: 1.0 Message-Id: <20240730-pxa1908-lkml-v11-12-21dbb3e28793@skole.hr> References: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> In-Reply-To: <20240730-pxa1908-lkml-v11-0-21dbb3e28793@skole.hr> To: Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Conor Dooley , Tony Lindgren , Haojian Zhuang , =?utf-8?q?Duje_Mihanovi=C4=87?= , Lubomir Rintel , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=906; i=duje.mihanovic@skole.hr; s=20240706; h=from:subject:message-id; bh=sg85E8aStsdrf1kcIf2gx3rGYTEorPNrQYUYJ6B5fTM=; b=owGbwMvMwCW21nBykGv/WmbG02pJDGkr9m+ZKXihIcpaS/fNh7Otz1PW7ds6P/78m8sn5jQE/ 7yycvE/oY5SFgYxLgZZMUWW3P+O13g/i2zdnr3MAGYOKxPIEAYuTgGYyFUhhv+RLQJhy1Tm3+y5 OeP7VM5rtqlHDh1Y9tlF8+U9WfUf63b6M/wvuinVL14381eznZjrKfE8ka87PZ4dS0g+ZPFHzq7 Q05sNAA== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=6DFF41D60DF314B5B76BA630AD319352458FAD03 X-Endpoint-Received: by B4 Relay for duje.mihanovic@skole.hr/20240706 with auth_id=191 X-Original-From: =?utf-8?q?Duje_Mihanovi=C4=87?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_112623_487250_0B9F38EC X-CRM114-Status: UNSURE ( 8.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: duje.mihanovic@skole.hr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Duje Mihanović Add myself as the maintainer for Marvell PXA1908 SoC support. Signed-off-by: Duje Mihanović --- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 42decde38320..40d14d11a09a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2481,6 +2481,15 @@ F: drivers/irqchip/irq-mvebu-* F: drivers/pinctrl/mvebu/ F: drivers/rtc/rtc-armada38x.c +ARM/Marvell PXA1908 SOC support +M: Duje Mihanović +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Maintained +T: git https://gitlab.com/LegoLivesMatter/linux +F: arch/arm64/boot/dts/marvell/pxa1908* +F: drivers/clk/mmp/clk-pxa1908*.c +F: include/dt-bindings/clock/marvell,pxa1908.h + ARM/Mediatek RTC DRIVER M: Eddie Huang M: Sean Wang