From patchwork Wed Jul 3 01:09:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kshevetskiy X-Patchwork-Id: 1955773 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=iopsys.eu header.i=@iopsys.eu header.a=rsa-sha256 header.s=selector2 header.b=UYf565ut; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WDMCK46mgz1xqh for ; Wed, 3 Jul 2024 11:10:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 641B9887B6; Wed, 3 Jul 2024 03:10:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=iopsys.eu 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=iopsys.eu header.i=@iopsys.eu header.b="UYf565ut"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E7FE1887C7; Wed, 3 Jul 2024 03:10:07 +0200 (CEST) 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,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8D198887BB for ; Wed, 3 Jul 2024 03:09:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=iopsys.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mikhail.kshevetskiy@genexis.eu ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aT6oTJesqc+E+vVu80pCCGdc6RYgpzCmbTum7fso79Pd9LluE0B4oltJD3Y1epVQjqG0hbq1lTvo8NPmEtUdaRBiuNq/QRmRmuf29z+7m+PP2WL6ZkP/k/WA9Ic/W0lcCq+p8B/qI9GGd0ObGNqMT9O9GG/qvsAgkl1Dv+Bv+b5WWjT1USYUkUgmcXZ/bb7afZ5QPFXLeKyHs0l0M4bccVxv8cdfb/+bLSSDraWLnqWmEtDlyYQWew1zrLqiZfnqd9QyXm3vCi8VJFU6GlQBpmtfEoLsuDQuNVSLnWmintDsAvAnqDeo4L5lQFT8obIdDjW8z41tM96Ea41QBeHkoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q0ndmVAr72ruTSn7qa7UvOALi68jcboFzobZQ6WDI/o=; b=GsVfFCdVVDR3pGbBaJ5ermH3xbpC9wpsu815xnQR54CkS0czoAsaEbuZCDD+6VmsXLMpGdLETRiVOZ4lKxPIEsWTDlpyVV3N5N/Ksg67DH21eaftld4E/x5NlFFueRNV+lPPLeORpNxsXQ5veyzF4sAGwxWkEC8Y+rwpHQKxq1YXJH3vdpY0Mv2XknekXWp4olgJlwJia36CmtI292VDcltnI2/f+CWVHnl+Bkt+IzXXvnqMh8YgHtucJtH3yS9j4IU1C0KkWAY0LrXH/h5/Py2rw8QZI2/dB/IpQTH264O1rktPNc5aw7xQC2Wyczc/pHd2x+o4WULStb+PJ+ibxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=genexis.eu; dmarc=pass action=none header.from=iopsys.eu; dkim=pass header.d=iopsys.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iopsys.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q0ndmVAr72ruTSn7qa7UvOALi68jcboFzobZQ6WDI/o=; b=UYf565utj6VNyOXbADAFkCPvvjD9+JMPLt63l9v/L1xFn2LBrcLQe0L5399bxk7602fXyRiWkC+DKtCVJEWoRyxuZwGfDf/h1iIL5hzE4R6HoskjQX5W0mkb8kkNLKMZO6vBwbFnRGIuda58tYgk5B5IzBg7yzwNOwfmMDrpjSMa6vlcTr/9zYL06X8bU4CyUfOR01P+d5AdYdbDl7ylWB3gTM/zN3MYsNs3xwSG8sVcdBfM8fzZOeLXrnGiFHPQSGAvzh4GCiLwr1qwlEgL8Os2DjVs4w7sUnJq/Wiew764l6/WLH7ps8H/QEy2t7yyi6Ucy2aQVPkIqffwuXiMpw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=iopsys.eu; Received: from GV2PR08MB8121.eurprd08.prod.outlook.com (2603:10a6:150:7d::22) by PA4PR08MB6013.eurprd08.prod.outlook.com (2603:10a6:102:eb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.23; Wed, 3 Jul 2024 01:09:58 +0000 Received: from GV2PR08MB8121.eurprd08.prod.outlook.com ([fe80::4cd3:da80:2532:daa0]) by GV2PR08MB8121.eurprd08.prod.outlook.com ([fe80::4cd3:da80:2532:daa0%5]) with mapi id 15.20.7719.029; Wed, 3 Jul 2024 01:09:58 +0000 From: Mikhail Kshevetskiy To: Tom Rini , Jagan Teki , Fabio Estevam , William Zhang , =?utf-8?q?C=C3=A9dric_Le_Goater?= , u-boot@lists.denx.de Cc: Mikhail Kshevetskiy Subject: [PATCH 1/2] spi: soft_spi: fix miso gpio property name Date: Wed, 3 Jul 2024 05:09:33 +0400 Message-Id: <20240703010934.1735889-1-mikhail.kshevetskiy@iopsys.eu> X-Mailer: git-send-email 2.39.2 X-ClientProxiedBy: LNXP265CA0085.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::25) To GV2PR08MB8121.eurprd08.prod.outlook.com (2603:10a6:150:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV2PR08MB8121:EE_|PA4PR08MB6013:EE_ X-MS-Office365-Filtering-Correlation-Id: f8039f2a-e02d-4459-34f5-08dc9afcdb50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|366016|52116014|38350700014; X-Microsoft-Antispam-Message-Info: uO64k2q202kwhspgiVmb2Xhn+r/bSgRSkOkc4MFctrjfTYoSZNe6AMyb3FISBXcqNK2cAOwKFTdG8BH38VSFMhebgASYH0nRjqgWzP9UbEHjL4gu4FA29p8K8waRmmJPYAXSUtMaUZmX2iJZx/mRF/VTOUH/jHEpCBJpDLJXYSyumgXuyp9Z1uEz9MVFK+rtLQ28XVwoICxjAEOpZp810LFPUcwKIssOOr+MHqDFQVT2FZ5lh9vMH/4mvZfGMDPD1bRtpxZxw21f3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22oFM4TrxNQK6647hyDEjWDID/r+o9+zcru+pR2ffbUNW1Bj589KLUo3B2l/fdL3vdLVkrbHbsGegnQsJD1mBw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV2PR08MB8121.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R1/DX+s8jvra5E1yv65TUD6X988dM29EjXRxQrCYQfmrrCgn3HUpdDktOtbGyqDMEHrlxUTNKrGVZ61v5/Z/kTJcdjJB/R2SbxZx85j9MOVOfIwuQ3zAGqa3ZuAaEr+ZZTQVE1VcA3OoNTcRnt0pqEghjNt71ossKXUVgMyFThvOsOSzWi53MyVj91LfcKfGFZ5TbAuyFA4XLhEdwBuNOJ+g7gIQvtQ26GI1la+iNSUErf2XYV0aAFacYGdpLcQCxKDvOdGDK8UtM3lg60Hef84Sxe+ezwm0dPxP6VMnIxDc5X2RSBfCYY1RzARelblrIO8mk7xtciwL8L8/94PoXxAGb6QFXui46fiwM8EyN7gIAvn+jaXBKLSwuCLD1tLKxNIi7ArUh2ahMwpFsjVxGcbS5kPdF0yXeJlCqB7OypfRBrZpnnb0ZecO965OIGk77QeACQFonnraJMIxEU4rroZP3SIAoV1Alb69gbbskkhTDaain9peU/eWyZgCGT0D7G8Sb3kwr5p9Wws52kKoEQP0cIU2S84lSd2GFkeG0Y5lMiBU3mrS63VPP9ua61gjuNSVSEueo8Oaj0pb5/3TIbX/ezbJzv5rKCQaZ9p0HVSR/xTaZ/flpDGhejTsWFigMQkQ/xagOFGy2kW+gUmXNnFcm69jL+hg9MrqvoJjPvEdicshTMBzg4furYY5eSpBB9KtbMhOq3/y0Eg9g38JgeagBoqhq7NnTQRXtRyjErJVebw2gV1OprLIN+8b/+UmtjbFVEoDcQ9Dwgru3GteuDNjFN20ef8I2c9teHHWX6WZGjIzY9stOldODtSeoH8iLiNuczx805OX7cq4rLwFSpxt6Vx9eLSn6Ha2DSIU4uybdaqeTSonTkH5N9kmxNJyh0z7LZxJ57VtNbcTKI6hOO2t+dh6ia53T/+D0WXJnG0mXswO30oL8EvDjB37KtSwO0j5K8LOrmNw5dlFlOuo3htKqxbM5+GPB7BKZekMTLn6RjLDHvhIzXz6r8eb5KmvhGGBDAt3xHIdC2D+CEZElLEAT/r7OIMQlBsJrq7uvbI5Ru311bneMb0+QIDQwko7Ap7BX+SCUynD+i0hqSEYzvwKJglCSXl2YMy1NA93L6/X3Kf85YEJ3leJqq7tA1mcZqPL10NMtZEj9zH4LBTmsYsJxz6CoYd+0C7ppLY4ghV0H8npmBbnmGGFRGUmSHH9Hyyscn8Ds759Jj0X4VTQbV7q1uxMDnaOOHUEImKpEx/RQxSgvMzMQ21KNdDmhb4VmeVgYh2+zk9R8KiHGVXTMYDxLRbKeUHrrLWIhrRANv01zJIG77NuXOerVbtFJ6g0ErrP+ajIZqY3D3+wrtL6YgYyRtDgTWxhQxmixvPzX/gSwOICGV/Q3re/FeOL1i3NbZMEJscnyPhB3XGGhuSG1Ih9FHJVlvyw0p4cViECRE1I584nNh7Prm6S5QyVRzH1Whyd8gBgT7dPcwnt5JEjhlkEfh2JfYXDeVtjtEkXFsR2qVOo0EkG5MahFy5XxLTq617ZwO4Wn6wyQCnS6TfQo+BGFwZ/EQE1MZjTLNKSsaDcih5P+FapjX4760kYOVvMPDzwKQ4o8LyMlSAjOXxKgg== X-OriginatorOrg: iopsys.eu X-MS-Exchange-CrossTenant-Network-Message-Id: f8039f2a-e02d-4459-34f5-08dc9afcdb50 X-MS-Exchange-CrossTenant-AuthSource: GV2PR08MB8121.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 01:09:58.3867 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8d891be1-7bce-4216-9a99-bee9de02ba58 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q4PR5Ycy3sew9mjB3lFY//mnjua5qjJ0ExZLD8rIF/YDfLM8fw4ztUSe/+NY3F/WZq9jjJDLMfb3+RLttvqlW75x7Dx2GTOccql16J67RwQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6013 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean The patch fix a missprint introduced in commit 2e9fe73a883a ("spi: soft_spi: Support the recommended soft spi properties"). Signed-off-by: Mikhail Kshevetskiy Reviewed-by: Fabio Estevam --- drivers/spi/soft_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c index 0fa14339bdc..3fe62818a44 100644 --- a/drivers/spi/soft_spi.c +++ b/drivers/spi/soft_spi.c @@ -272,7 +272,7 @@ static int soft_spi_probe(struct udevice *dev) ret = gpio_request_by_name(dev, "gpio-miso", 0, &plat->miso, GPIOD_IS_IN); if (ret) - ret = gpio_request_by_name(dev, "gpio-miso", 0, &plat->miso, + ret = gpio_request_by_name(dev, "miso-gpios", 0, &plat->miso, GPIOD_IS_IN); if (ret) plat->flags |= SPI_MASTER_NO_RX; From patchwork Wed Jul 3 01:09:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kshevetskiy X-Patchwork-Id: 1955772 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=iopsys.eu header.i=@iopsys.eu header.a=rsa-sha256 header.s=selector2 header.b=ivhrzkSN; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WDMCB3cYxz1xqh for ; Wed, 3 Jul 2024 11:10:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C49C488784; Wed, 3 Jul 2024 03:10:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=iopsys.eu 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=iopsys.eu header.i=@iopsys.eu header.b="ivhrzkSN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E20A2887BA; Wed, 3 Jul 2024 03:10:05 +0200 (CEST) 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,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2071c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::71c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A8FA88495 for ; Wed, 3 Jul 2024 03:10:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=iopsys.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mikhail.kshevetskiy@genexis.eu ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CR5CDj1JWDFq9KLzvOjuyC9ZVQojFCooXiTLWaIEGb3UTio5y/NL70HmrAqrYUD2+SzwlszPoSG0fM2TdpimtB/kjq73r4RnNyAQa/BoF03UZkxmjt5yRRMeqJpYpIKC81UzWyUELgQ7moNMC/r81qblVFT7llcy3x1LZzGGlJEbJOTJerd4JR56ylaY76653zuee3AxCf/ghoIpMw6MxTlDqLyGEjhdUpXzzhh3EH1G0AF62wkYyLnfllYYF6FH6YPSr2hVRr2aDyVvCR4RrfXijfyCRJUD+A9lmC7jhJb5xIC8BHY9INNEBHCg2Ww4KMjRzBYDfr/SbTJnJ0nXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VoInMuUocsU/HhiWh70T8JNUzRpamp9pMDoJk6qfE5k=; b=TEviAxCtlEE7QID6SSaBs4X0OH3NAJI2ulj2GHMqXEd5ViVtttSmtLP4jwgnAxFpb7rUegtgGmg8kyuRcY67yqydbRAFKDcqTNZlssAQTw2iddOYrrjS/E2tGEpftmmVGQxIpmAfcwr/6J0Bo2MSWLIj8M2ZlxJr+o/M00HkSKsnWU8zf0X9upaHAibpIpxXb1buYytPIr06qM8VLjTc6fVEpJlAyHYij1NJ7bRE8rfiNWZJRwvueZXyubkku0foJUVQIT85o4nEx3TCGWtKuqt6Ufccrh1xhMhU6E5VASASq1J/i6xukiGKXFHkLia7HxvggzirdihqTfgDRWc8FQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=genexis.eu; dmarc=pass action=none header.from=iopsys.eu; dkim=pass header.d=iopsys.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iopsys.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VoInMuUocsU/HhiWh70T8JNUzRpamp9pMDoJk6qfE5k=; b=ivhrzkSNxcgYpkzRj7e4GLBw4cRzIYzA1xDlMJF5Y07Yy6FOwGvbrEmZg/979zYmJt+ebc8b4NVyW8HJpdDdsNSmeOnfyro192IBGW8FEqF4xAvxmLLnUHkNGZhPr6gNBQqohgt2jBD4VvYfJb/hp5BlUpguyXCiN4cLsYoMibb1cqzJEuCKppVv8SwyWdnXaD1dO2c1owT/ugSxfMW9+TNvidXTroxU3o5hf3S0VZssvLiPvIcwuK5BYVJHvDtW0zDEs3I0SFn70DAZnNEelxtI/krjjYVgm7NlaAUrYpDcU6kCIXFW1g3o2YzbBJjk3X6DK6TNA8FYnVuJi/nEwA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=iopsys.eu; Received: from GV2PR08MB8121.eurprd08.prod.outlook.com (2603:10a6:150:7d::22) by PA4PR08MB6013.eurprd08.prod.outlook.com (2603:10a6:102:eb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.23; Wed, 3 Jul 2024 01:10:02 +0000 Received: from GV2PR08MB8121.eurprd08.prod.outlook.com ([fe80::4cd3:da80:2532:daa0]) by GV2PR08MB8121.eurprd08.prod.outlook.com ([fe80::4cd3:da80:2532:daa0%5]) with mapi id 15.20.7719.029; Wed, 3 Jul 2024 01:10:02 +0000 From: Mikhail Kshevetskiy To: Tom Rini , Jagan Teki , Fabio Estevam , William Zhang , =?utf-8?q?C=C3=A9dric_Le_Goater?= , u-boot@lists.denx.de Cc: Michael Polyntsov , Mikhail Kshevetskiy Subject: [PATCH 2/2] spi: soft_spi: Parse cs-gpios only if num-chipselects is not <0> Date: Wed, 3 Jul 2024 05:09:34 +0400 Message-Id: <20240703010934.1735889-2-mikhail.kshevetskiy@iopsys.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240703010934.1735889-1-mikhail.kshevetskiy@iopsys.eu> References: <20240703010934.1735889-1-mikhail.kshevetskiy@iopsys.eu> X-ClientProxiedBy: LNXP265CA0085.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::25) To GV2PR08MB8121.eurprd08.prod.outlook.com (2603:10a6:150:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV2PR08MB8121:EE_|PA4PR08MB6013:EE_ X-MS-Office365-Filtering-Correlation-Id: ca10f68e-bfcc-4fed-df90-08dc9afcddc4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|366016|52116014|38350700014; X-Microsoft-Antispam-Message-Info: UTGYd2Db7+ieotlhfZRehgL4FMnX3nx24kCSDc1A54CdEEkR/shhmYa6EcJ0JhkQEWaUzccntJbILMRkoNwGig6PZDruPzxugEwY1uIhwfQ55Rm+cTsENhxJesSdwjGTEaUjLfaXjCbjdJ74q27znZa88uZN4rJqmtvPhnxhePkgWvT5KZ5bL9X92NTz/NN8/959lNs2wNnwMG1nzeaBJ9QgIy/jJ254bnP3ULFYjKDiylImQqIaLIdmTqGvSG4ta/9Du9hFKIrVjEW9G2R36VFrUtA80gCqec/jp1qLsy/Va9nN0TP3YVkDUWbEevJ0Ltod5FPhWENlvt2kUgqn/TONWDM5o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PYmSXgvIPTKWQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV2PR08MB8121.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aqICooy6FbUYhmrfC1d4P6vNpIknZ7oEoMYB9WPIDh1IiT1bcItnWvxvrF7soWAPNYbcmTdn3rkYe55KqCZjgNnrKBZhWacTGJdnoBv5tE7f0HIdXEes+OUNIT78fFh231YRSg5Cf1+eUkqFFtMnm4OYFF7VNYpLntAbFe06Z5s7W4xg36pVZ1jOQX36yePrnEaqcxKARSKiyjb5i6h2WSrVRe+MXrdPvgjcLiyRe93HBtOc1gJsxFePxdVQtzVl1fkARWnLiDQasAArSmozgvyagEIfYBWGW6bXF+1g2393Uc1/c+poTKKcgwH9SDljR/hkIwuc2xvc9n9Fg0cj4zFyw+cbEO5DEcR+ja9ph1rEcfH5uPUzJ4Qaw371rCzQ/YdO3Cm8xCcIRdx/0pazGLRafQ57UZwzIWEDowcHqxxdc4GW55a9GguzcCCLg0qlS+mkUU7RNoG4JLJAlZI71hhCseSKeO/LR6daj8I4qhKUZAKHgNl4P4ZC1l2tZKY/q621sT0kLbKEzoB70J5v0Zzvppmnjo6idku+pz0fsqL8uhkTMXAc6/hrRapy3dECzIxpMQ8Zrh+qF/hQsf6FtuGF4FRWeir9B85CETZZtsHBZmYMPN0pSMu/mebBHVS2uP+7LKLcg9jPIZWblx5LpwXXSc3KqziAXTyt9r41N4yXVNuvvN5dWx3TecvBJXHSmtDnQ7wb9Wvb4Tj8GUTOn1RtGOAwEuwp2L0xVH+m2r4hAyqeFICD/SHreN5/8Wk76OGcPvi3j6RVz9r7Vf/3/lsEDrj7iHC8jcgsx+SwWfIFgFYwTPelb6/uSAHRmCsXvNs+CaitWm2cLCqM0ET7U2eIzGSG2H3htXHwlwxL31oE+qPYTvdMfNNbiEDdQpFcLnPB71ZKLBhYpZc2Uu5b17NFNBvl0CqIfq/4BLlhpVbjvXe3irwHdtp3BykSt5AusbodnpD37ZG73jWCMW2wujQySP1IGW744SDtEi7uQb50UpsAOc8trVg0VDq7cosDcYwEJoVgocxWrYE0ZF22Q30eK/48EsRb//cCkz1bXiZiFReV00r4DVlHqu2tQuywVACLVkszZWL132Ol8HfydyshiF9UOJyaL+g2nhj5fSP1eEhUvJvJ66GF7AFz+RQSdXEvLcmhMFsMjZBH9eBqjksfw9tZKGE82Zve7xT4vV/v5n/iM+fTGhkHqw3T7RTaNeEj92hb/WtFw+HcRgB2HfAHQEwWuCWxwq1vT64HYKHGGf9h0hPJMTzr86ecxCNKwnN6lvB82i3IGHjltKuWH6K4nJiXC4h5RwEbVQuXecRKhvu3FWBfb0z1L1CgzQicouuiWuxAJP8kvdyqTlH0b5NEUyMufB/89/9gB7s5pPqu/zxbKAF726mu9zWRpIIXRClfK2rrMeujm/+hY49jc4lrHZaK1PvRwfRu+TcGV50M/e2/HrGRd+XNhoyWtREXFudOlrgRBNH2PyVadtqVIaL+JC5ZRNdjIjPSUaaX05brHe/Iea9RdD19mkkk/Cq0SQtlxRHhmuewwsNtBxelF0PSoM+o6Z3GVuidla6fsZHrzZ67QD9dgGN+VQQ1ai3d3cda72Y0HmE/RVTgjiE1mw== X-OriginatorOrg: iopsys.eu X-MS-Exchange-CrossTenant-Network-Message-Id: ca10f68e-bfcc-4fed-df90-08dc9afcddc4 X-MS-Exchange-CrossTenant-AuthSource: GV2PR08MB8121.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 01:10:02.4288 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8d891be1-7bce-4216-9a99-bee9de02ba58 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WSYLG73CBOCTwG4Y+jQbBS6T5fQlC3WPSuP6sAISR6h1NNXX+a4WKR2no7TAwlKg+ozwdMFn1JbPXByz6Gw7ohftTEWw3nfpdmRpJAVG24o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6013 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean From: Michael Polyntsov Some boards don't have chipselect lines for leds so cs-gpios is not specified in the dts leading to probing error. Fix it by making behavior similar to the one in Linux, parse num-chipselects and if it is zero, ignore cs-gpios. Signed-off-by: Michael Polyntsov Signed-off-by: Mikhail Kshevetskiy --- doc/device-tree-bindings/spi/soft-spi.txt | 5 +++-- drivers/spi/soft_spi.c | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/doc/device-tree-bindings/spi/soft-spi.txt b/doc/device-tree-bindings/spi/soft-spi.txt index bdf7e86befb..77b01b2fd9a 100644 --- a/doc/device-tree-bindings/spi/soft-spi.txt +++ b/doc/device-tree-bindings/spi/soft-spi.txt @@ -8,14 +8,15 @@ The soft SPI node requires the following properties: Mandatory properties: compatible: "spi-gpio" -cs-gpios: GPIOs to use for SPI chip select (output) +cs-gpios: GPIOs to use for SPI chip select (output), not required if num-chipselects = <0> sck-gpios: GPIO to use for SPI clock (output) And at least one of: mosi-gpios: GPIO to use for SPI MOSI line (output) miso-gpios: GPIO to use for SPI MISO line (input) -Optional propertie: +Optional properties: spi-delay-us: Number of microseconds of delay between each CS transition +num-chipselects: Number of chipselect lines The GPIOs should be specified as required by the GPIO controller referenced. The first cell holds the phandle of the controller and the second cell diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c index 3fe62818a44..2e80b7bb08e 100644 --- a/drivers/spi/soft_spi.c +++ b/drivers/spi/soft_spi.c @@ -238,6 +238,18 @@ static int soft_spi_of_to_plat(struct udevice *dev) return 0; } +static int retrieve_num_chipselects(struct udevice *dev) +{ + int chipselects; + int ret; + + ret = ofnode_read_u32(dev_ofnode(dev), "num-chipselects", &chipselects); + if (ret) + return ret; + + return chipselects; +} + static int soft_spi_probe(struct udevice *dev) { struct spi_slave *slave = dev_get_parent_priv(dev); @@ -250,7 +262,15 @@ static int soft_spi_probe(struct udevice *dev) ret = gpio_request_by_name(dev, "cs-gpios", 0, &plat->cs, GPIOD_IS_OUT | cs_flags); - if (ret) + /* + * If num-chipselects is zero we're ignoring absence of cs-gpios. This + * code relies on the fact that `gpio_request_by_name` call above + * initiailizes plat->cs to correct value with invalid GPIO even when + * there is no cs-gpios node in dts. All other functions which work + * with plat->cs verify it via `dm_gpio_is_valid` before using it, so + * such value doesn't cause any problems. + */ + if (ret && retrieve_num_chipselects(dev) != 0) return -EINVAL; ret = gpio_request_by_name(dev, "gpio-sck", 0, &plat->sclk,