Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp336778pxu; Fri, 11 Dec 2020 03:38:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzX0uIqyaK0DFZVzApKCEumiR5jcSpmhdCWorN+zlFikU12BKCWxypBowE+8OQyhWDU4zou X-Received: by 2002:aa7:d906:: with SMTP id a6mr11572212edr.121.1607686733850; Fri, 11 Dec 2020 03:38:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607686733; cv=none; d=google.com; s=arc-20160816; b=r3CXAyjW35NQAaR1AlJtABbDGNtLqdNYA/DE7STRhx+yhKBaaCtUrshOZoF15FqrBW Kb5b8d21S5HBGLV69e1D/FGU4Qyc1wS62DTY5hfuF3yafe6ejOY9ey86VRQKzdqEy8gP ZtwxJmVgp2REZNSF/wsJkeuH1ELbBRopp2pcSeUp8UiQhiGVFBW9AT2sezLdwVdeJkjc vHi20JIzRtR1xXF55f/rbvthFQjpJGlnkKsQJl+VZDDgG1DzHfjL114HrSrbtZ1/UVTQ o2E0nXQqqlecDR5Wwni+kVGv89soDnH/gmGBaiG8FyXCb0DD1thcs61Hj1Cxg5ZP3OG7 mLkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GgNvbe+EPRpeZDdlbgKIdV04B1f1oDtYWccQEAonv98=; b=bS9q0ZkCVcCiRUm78myagsXylwEbnQni8Gnpks5x303uBpfU++XJCKlrtBlyQITOB4 o7UIEOQhDkhDy9Nzpq0o1LDM1KjefTzZ1ASxxm/aAxaszrJr2C3vp1cOX1PEs+AIuMHw ZUDGqsvi2U3SGTa4CLX7DiM1SrWohc4uM05yoFHKcUzxSo642RNBSY4jUnpXGmU9PTTE KzfF0nNUbQsdHPsJFgLPwjU2kZAZuF+Izzp8wfx4yvaKPd3ug5IuwlPoxR4wzoXRePcG 21iRTre7XLnUu+UJ6bqf1cMsf12Wo8XGxQ2tSLe8zpIp1cYwDC6W2lz0H5S/2BIp29l0 DZvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si5011763eji.422.2020.12.11.03.38.31; Fri, 11 Dec 2020 03:38:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405202AbgLKDUr (ORCPT + 99 others); Thu, 10 Dec 2020 22:20:47 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:31339 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405175AbgLKDUK (ORCPT ); Thu, 10 Dec 2020 22:20:10 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 0BB3EfHa057144; Fri, 11 Dec 2020 11:14:41 +0800 (GMT-8) (envelope-from billy_tsai@aspeedtech.com) Received: from BillyTsai-pc.aspeed.com (192.168.2.149) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Dec 2020 11:17:39 +0800 From: Billy Tsai To: , , , , , , , CC: Subject: [PATCH] driver: aspeed: g6: Fix PWMG0 pinctrl setting Date: Fri, 11 Dec 2020 11:17:41 +0800 Message-ID: <20201211031741.23711-1-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.149] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 0BB3EfHa057144 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SCU offset for signal PWM8 in group PWM8G0 is wrong, fix it from SCU414 to SCU4B4. Besides that, When PWM8~15 of PWMG0 set it needs to clear SCU414 bits at the same time. Fixes: 2eda1cdec49f ("pinctrl: aspeed: Add AST2600 pinmux support") Signed-off-by: Billy Tsai --- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c index 34803a6c7664..6e61f045936f 100644 --- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c @@ -346,50 +346,58 @@ FUNC_GROUP_DECL(RGMII4, F24, E23, E24, E25, D26, D24, C25, C26, C24, B26, B25, FUNC_GROUP_DECL(RMII4, F24, E23, E24, E25, C25, C24, B26, B25, B24); #define D22 40 -SIG_EXPR_LIST_DECL_SESG(D22, SD1CLK, SD1, SIG_DESC_SET(SCU414, 8)); -SIG_EXPR_LIST_DECL_SEMG(D22, PWM8, PWM8G0, PWM8, SIG_DESC_SET(SCU414, 8)); +SIG_EXPR_LIST_DECL_SESG(D22, SD1CLK, SD1, SIG_DESC_SET(SCU414, 8)) +SIG_EXPR_LIST_DECL_SEMG(D22, PWM8, PWM8G0, PWM8, SIG_DESC_SET(SCU4B4, 8), + SIG_DESC_CLEAR(SCU414, 8)); PIN_DECL_2(D22, GPIOF0, SD1CLK, PWM8); GROUP_DECL(PWM8G0, D22); #define E22 41 SIG_EXPR_LIST_DECL_SESG(E22, SD1CMD, SD1, SIG_DESC_SET(SCU414, 9)); -SIG_EXPR_LIST_DECL_SEMG(E22, PWM9, PWM9G0, PWM9, SIG_DESC_SET(SCU4B4, 9)); +SIG_EXPR_LIST_DECL_SEMG(E22, PWM9, PWM9G0, PWM9, SIG_DESC_SET(SCU4B4, 9), + SIG_DESC_CLEAR(SCU414, 9)); PIN_DECL_2(E22, GPIOF1, SD1CMD, PWM9); GROUP_DECL(PWM9G0, E22); #define D23 42 SIG_EXPR_LIST_DECL_SESG(D23, SD1DAT0, SD1, SIG_DESC_SET(SCU414, 10)); -SIG_EXPR_LIST_DECL_SEMG(D23, PWM10, PWM10G0, PWM10, SIG_DESC_SET(SCU4B4, 10)); +SIG_EXPR_LIST_DECL_SEMG(D23, PWM10, PWM10G0, PWM10, SIG_DESC_SET(SCU4B4, 10), + SIG_DESC_CLEAR(SCU414, 10)); PIN_DECL_2(D23, GPIOF2, SD1DAT0, PWM10); GROUP_DECL(PWM10G0, D23); #define C23 43 SIG_EXPR_LIST_DECL_SESG(C23, SD1DAT1, SD1, SIG_DESC_SET(SCU414, 11)); -SIG_EXPR_LIST_DECL_SEMG(C23, PWM11, PWM11G0, PWM11, SIG_DESC_SET(SCU4B4, 11)); +SIG_EXPR_LIST_DECL_SEMG(C23, PWM11, PWM11G0, PWM11, SIG_DESC_SET(SCU4B4, 11), + SIG_DESC_CLEAR(SCU414, 11)); PIN_DECL_2(C23, GPIOF3, SD1DAT1, PWM11); GROUP_DECL(PWM11G0, C23); #define C22 44 SIG_EXPR_LIST_DECL_SESG(C22, SD1DAT2, SD1, SIG_DESC_SET(SCU414, 12)); -SIG_EXPR_LIST_DECL_SEMG(C22, PWM12, PWM12G0, PWM12, SIG_DESC_SET(SCU4B4, 12)); +SIG_EXPR_LIST_DECL_SEMG(C22, PWM12, PWM12G0, PWM12, SIG_DESC_SET(SCU4B4, 12), + SIG_DESC_CLEAR(SCU414, 12)); PIN_DECL_2(C22, GPIOF4, SD1DAT2, PWM12); GROUP_DECL(PWM12G0, C22); #define A25 45 SIG_EXPR_LIST_DECL_SESG(A25, SD1DAT3, SD1, SIG_DESC_SET(SCU414, 13)); -SIG_EXPR_LIST_DECL_SEMG(A25, PWM13, PWM13G0, PWM13, SIG_DESC_SET(SCU4B4, 13)); +SIG_EXPR_LIST_DECL_SEMG(A25, PWM13, PWM13G0, PWM13, SIG_DESC_SET(SCU4B4, 13), + SIG_DESC_CLEAR(SCU414, 13)); PIN_DECL_2(A25, GPIOF5, SD1DAT3, PWM13); GROUP_DECL(PWM13G0, A25); #define A24 46 SIG_EXPR_LIST_DECL_SESG(A24, SD1CD, SD1, SIG_DESC_SET(SCU414, 14)); -SIG_EXPR_LIST_DECL_SEMG(A24, PWM14, PWM14G0, PWM14, SIG_DESC_SET(SCU4B4, 14)); +SIG_EXPR_LIST_DECL_SEMG(A24, PWM14, PWM14G0, PWM14, SIG_DESC_SET(SCU4B4, 14), + SIG_DESC_CLEAR(SCU414, 14)); PIN_DECL_2(A24, GPIOF6, SD1CD, PWM14); GROUP_DECL(PWM14G0, A24); #define A23 47 SIG_EXPR_LIST_DECL_SESG(A23, SD1WP, SD1, SIG_DESC_SET(SCU414, 15)); -SIG_EXPR_LIST_DECL_SEMG(A23, PWM15, PWM15G0, PWM15, SIG_DESC_SET(SCU4B4, 15)); +SIG_EXPR_LIST_DECL_SEMG(A23, PWM15, PWM15G0, PWM15, SIG_DESC_SET(SCU4B4, 15), + SIG_DESC_CLEAR(SCU414, 15)); PIN_DECL_2(A23, GPIOF7, SD1WP, PWM15); GROUP_DECL(PWM15G0, A23); -- 2.25.1