From patchwork Sun Oct 25 20:00:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1387257 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SKNNTVr4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CK83N1vRfz9sSs for ; Mon, 26 Oct 2020 07:00:44 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C9C48244B; Sun, 25 Oct 2020 21:00:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SKNNTVr4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9BEF28246A; Sun, 25 Oct 2020 21:00:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D591C8244A for ; Sun, 25 Oct 2020 21:00:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id t128so1481413qke.0 for ; Sun, 25 Oct 2020 13:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Nb50HA2MnisDebMy4cuI+MwsWP5EsojKg9XUwdM+P/8=; b=SKNNTVr4TrLjyxwVkc05fHMAYBPfnlWTlGgyVtKgO71IM4/D9zAncWVE6MGBhZfPrj dpY0O1tup46FTCWgOLoaHWlFqnSYeXwzz+dnuGNxPYD+aEaFA56vx7LTE5YkBGXniA/B orNyXwCAOkj0jBF9vzUAsZ5SiRf2yrI7qOJPnq2VdOcR7Ps4Lae2OYO8Ih+OERgrlw2H L7mrjck0PToiRbp1rsgH1/XZ3lIhygH7u6K+HNHIJ225ubxLgULP+JS0LEDd2nRaV9OE bVYtaAiI7Dtit1P5bR/rItP3zFNEarjnVnWcWftHkupnS1liqZcpiT7rZa02tbpU4HWD 3jpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Nb50HA2MnisDebMy4cuI+MwsWP5EsojKg9XUwdM+P/8=; b=ANm/9eXJGLHASuUgpoWd/Az4LqJmt8YV7tX2icuMBqPaocC9MfpR0dhEU/WvyEKhSm 3XmNLhNC8ccKLLaIURWLxG+79LpH8KjvsxOS1cxAbQo9VKA/YiaZPJjHZf7aHr4q3qMo 4kvZ3m109q8wCnrfSnEHvviLzK78QqUrK3XQbK3GX4h0MgNOBot0ctk8o+G75Nza3YCZ i7Gzmpgohx39NfjiP4UVRRPI39VX7Wy86xmLg5hqOzJsGUEmNSvJmSYDi3Xjv8d02qFm 9yCGs1nStm1fw3yrNH22i8fHEvB99LKbnsCkALRfdwgmKXrV0438zqUboA+3ZAjXybCR CZ0Q== X-Gm-Message-State: AOAM530RC2E3goJ67F9voNuOMCQqmHjicWe0E7m7JcG1MvG+FKJuSalx LOMCl9frB66P9nG+HagyxfIG6LC3VAVywg== X-Google-Smtp-Source: ABdhPJzLIxhJQz3n0hg4cd4OS9aVr5mMi7kfbjKmTyse00OJqbwLz1f+AqYbr/FKVejK0qWfPaaknQ== X-Received: by 2002:a37:7183:: with SMTP id m125mr13823618qkc.237.1603656021340; Sun, 25 Oct 2020 13:00:21 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id x6sm3397149qto.48.2020.10.25.13.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 13:00:20 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Rick Chen , Simon Glass , Damien Le Moal , Sean Anderson Subject: [PATCH 1/2] pinctrl: k210: Fix inverted IE and OE for I2C Date: Sun, 25 Oct 2020 16:00:09 -0400 Message-Id: <20201025200010.550920-1-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean I2C and SCCB previously shared defaults. However, SCCB needs OE_INV and IE_INV set, but I2C cannot have those bits set. This adds a separate default for SCCB. Signed-off-by: Sean Anderson Reported-by: Damien Le Moal Reviewed-by: Rick Chen --- drivers/pinctrl/pinctrl-kendryte.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-kendryte.c b/drivers/pinctrl/pinctrl-kendryte.c index 5ad049d955..259a0b507b 100644 --- a/drivers/pinctrl/pinctrl-kendryte.c +++ b/drivers/pinctrl/pinctrl-kendryte.c @@ -55,8 +55,9 @@ #define K210_PC_MODE_IN (K210_PC_IE | K210_PC_ST) #define K210_PC_MODE_OUT (K210_PC_DRIVE_7 | K210_PC_OE) -#define K210_PC_MODE_I2C (K210_PC_MODE_IN | K210_PC_IE_INV | K210_PC_SL | \ - K210_PC_OE | K210_PC_OE_INV | K210_PC_PU) +#define K210_PC_MODE_I2C (K210_PC_MODE_IN | K210_PC_SL | K210_PC_OE | \ + K210_PC_PU) +#define K210_PC_MODE_SCCB (K210_PC_MODE_I2C | K210_PC_OE_INV | K210_PC_IE_INV) #define K210_PC_MODE_SPI (K210_PC_MODE_IN | K210_PC_IE_INV | \ K210_PC_MODE_OUT | K210_PC_OE_INV) #define K210_PC_MODE_GPIO (K210_PC_MODE_IN | K210_PC_MODE_OUT) @@ -189,6 +190,7 @@ static const u32 k210_pc_mode_id_to_mode[] = { [K210_PC_DEFAULT_IN_TIE] = K210_PC_MODE_IN, DEFAULT(OUT), DEFAULT(I2C), + DEFAULT(SCCB), DEFAULT(SPI), DEFAULT(GPIO), [K210_PC_DEFAULT_INT13] = K210_PC_MODE_IN | K210_PC_PU, @@ -362,8 +364,8 @@ static const struct k210_pcf_info k210_pcf_infos[] = { FUNC(DVP_D5, IN), FUNC(DVP_D6, IN), FUNC(DVP_D7, IN), - FUNC(SCCB_SCLK, I2C), - FUNC(SCCB_SDA, I2C), + FUNC(SCCB_SCLK, SCCB), + FUNC(SCCB_SDA, SCCB), FUNC(UART1_CTS, IN), FUNC(UART1_DSR, IN), FUNC(UART1_DCD, IN), From patchwork Sun Oct 25 20:00:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1387258 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=t+Od5XT1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CK83P6938z9sSs for ; Mon, 26 Oct 2020 07:00:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C5E6E82483; Sun, 25 Oct 2020 21:00:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="t+Od5XT1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 922518245F; Sun, 25 Oct 2020 21:00:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CEA908244B for ; Sun, 25 Oct 2020 21:00:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf41.google.com with SMTP id bl9so3351957qvb.10 for ; Sun, 25 Oct 2020 13:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f0LPU1jlSHUND9lqYPk/tcmSLWVkQt7W3aGUsIHdLag=; b=t+Od5XT1ZpbuQjTFJyt3pO2DIt7QM2JLY0AJBydn3qSY1krMf9wBF9Scwv86P0GhBl GM2oJYG14/J2UCwdnan5AtWoBYllrRkbtaC728fn6GOUmSLpA9QycOaJ2CdzqHBJGcT2 F64GIBteClQcBxRXASuVaSMd/4CjXD1mSdgkFq2sBinkfhaDzwt88SJq6a0UPEfxzciV 1KTxFL+wcqZfYhlwe83oODCxeXmFdJpWcxFplt/njb6QRBJuWp2TjJ6K5+fYLPnJrDd7 iOACbvffwl0kLt1mqJKuJddkkTq/8t4yvR84P1yi6VRkjmPGbtXQAjMOytCvSzXLVNdW vBSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f0LPU1jlSHUND9lqYPk/tcmSLWVkQt7W3aGUsIHdLag=; b=dxz84Bu7u6k6z9SMQtalvNo6WEZsVtslVRI5gtbTeQ6W8lOH60r4KA1mIfYBeTLWkk Z3uPbyUQP9w5qqGzexxQt8OP6y48XkiYQsz1CgnqYImxkrh0+OpCZearJG/0GrOKncGt dGbvmEOT4nIMB9xuYYSmmNGtmlRMgwxWMCXDKwRivk28ByXbjyKyRi9asYEsa7e8pMVy YNc4xqXIeAmGcNVdlHFPQflVikHIhLKSC+rGihy+d7tSJrQzrE1GuS3vxBg6LPPyormV /mv8xNE3a3HPlT2UcYLAP4JjDffgtBBfv/g0Da8Ke7kJw/ccOjpwZ8IWltaaj+/ZbP2R j9CA== X-Gm-Message-State: AOAM5314YhjM9KLdIaM6TxaNtCH1Osfpbe9y89jj5jBncCKFQ9zE12UI m8YiytJP8mz766BF7hlCE07fq51/Dg4lRA== X-Google-Smtp-Source: ABdhPJxN0Ev0mHNMS1pnIBlJpxekTW4ffDwZYO/ZW75jm739aaVrQ6HW2TNCThmCaDMNIVSyvBb4fQ== X-Received: by 2002:ad4:4ba8:: with SMTP id i8mr13742020qvw.59.1603656022349; Sun, 25 Oct 2020 13:00:22 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id x6sm3397149qto.48.2020.10.25.13.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 13:00:21 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Rick Chen , Simon Glass , Damien Le Moal , Sean Anderson Subject: [PATCH 2/2] pinctrl: k210: Rename power domains to match datasheet Date: Sun, 25 Oct 2020 16:00:10 -0400 Message-Id: <20201025200010.550920-2-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201025200010.550920-1-seanga2@gmail.com> References: <20201025200010.550920-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This renames power domains to match the names on the k210 datasheet. Signed-off-by: Sean Anderson Reported-by: Damien Le Moal Reviewed-by: Rick Chen --- .../pinctrl/kendryte,k210-fpioa.txt | 2 +- drivers/pinctrl/pinctrl-kendryte.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/device-tree-bindings/pinctrl/kendryte,k210-fpioa.txt b/doc/device-tree-bindings/pinctrl/kendryte,k210-fpioa.txt index 06a9cc060f..73871f5930 100644 --- a/doc/device-tree-bindings/pinctrl/kendryte,k210-fpioa.txt +++ b/doc/device-tree-bindings/pinctrl/kendryte,k210-fpioa.txt @@ -18,7 +18,7 @@ Pin configuration nodes are documented in pinctrl-bindings.txt Required properties for pin-configuration nodes or sub-nodes are: - groups: list of power groups to which the configuration applies. Valid groups are: - A0, A1, A2, B0, B1, B2, C0, C1 + A0, A1, A2, B3, B4, B5, C6, C7 (either this or "pinmux" must be specified) - pinmux: integer array representing pin multiplexing configuration. In addition to the 256 standard functions, each pin can also output the direction diff --git a/drivers/pinctrl/pinctrl-kendryte.c b/drivers/pinctrl/pinctrl-kendryte.c index 259a0b507b..3bdafc1e6b 100644 --- a/drivers/pinctrl/pinctrl-kendryte.c +++ b/drivers/pinctrl/pinctrl-kendryte.c @@ -153,11 +153,11 @@ static const char k210_pc_group_names[][3] = { [0] = "A0", [1] = "A1", [2] = "A2", - [3] = "B0", - [4] = "B1", - [5] = "B2", - [6] = "C0", - [7] = "C1", + [3] = "B3", + [4] = "B4", + [5] = "B5", + [6] = "C6", + [7] = "C7", }; static int k210_pc_get_groups_count(struct udevice *dev)