From patchwork Tue Jan 9 12:58:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13514907 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 CCD15C4707C for ; Tue, 9 Jan 2024 12:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ypw7GHKiBY8IcusXnSE1hExDO27RTFIdoHDBvqTOvaU=; b=zrmP1ubdZru9O2 MrDeJ7YjeqsgnBTy4VDjGybQt0DMH3O78F/QmgUY0sjoVpCEJRCfyRlp04VWw2eKhaMbu4e8G9Tez YOp2F0WiBdNiDFAdK2LboHpZVE7CnFW0tK+EK9LreZ+B1hP5LJi78y6/dZUafYqKm25hnRPMVAmp9 NNZiPWOaHlfNqAZE9y+d21oFTQ64POOrCicmvvrhkDmmnToSUi305pJMaKRzhQUI1o1S3H3K0Or/r uoPX5IIR35B0fhluOGqx8Plv+jD8Fp323odIxDzEOApxzLkhgJbIldTRc5pGW7yji5sG9Hjv8ompW UltFQuvkMqmsaCsdnEiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNBgt-008IV9-2a; Tue, 09 Jan 2024 12:58:47 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNBgn-008IOx-0x for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2024 12:58:42 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-336897b6bd6so3001362f8f.2 for ; Tue, 09 Jan 2024 04:58:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704805117; x=1705409917; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=76U22CGER4KqXBDXUKva048KHZBhjzcIPjnq3/iJdsQ=; b=zn7OQWl1WExvZvbKsGoWoP9aqm3dMxDHCgpg9xzACPGC1vigDjXc5dFTHGdyX8zcq2 NaZiXfEa81TsRy4ELFZhWsbrNcjffs55jOxu2NcDmhaZAuX+n04bD5EmIRbbwrOjHd6u 5iAxVHgPVXg1zNTGCgtHv7rUr2AB8fn664AYQL3cbRwi1YEGlW+gEkqeC/bMVwLAfglK 786aIsG2Vc5CreKNNkCAgtki9wOGKlEN4WML6t78nEkIrSmgYIbajEgVnp2zqSMdQloI hpK0kGDRTr4gltFEtYPghvGgHTC9FgSxVTDlUeR2GerBVZ/2VjvZE71bKb5QAO+gWhS0 X1LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704805117; x=1705409917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=76U22CGER4KqXBDXUKva048KHZBhjzcIPjnq3/iJdsQ=; b=v+GmIoFw5J95qW4rD+WRdHyFt61ISaLAtXhE0VQ8pUneGfbe46fy1rS62Hgmq1bm0i QU2YL/yzLT1BHRgKxWoH4I5KDisxISlAJcxlluvPcT699gjK9Oa/84cqhRSDy1s+WiNt hmuWq4+GUOTQD8pNCCUvMFWUD5+WHkEu38sH1+mcTLGRjtjyRXlDNGaPy+zMxZFgmL2N 0DxzW4Xr8JLSsN/v39YSL4b3nI9V2vOqfUYi5eK6YywWpyyR0INU5KIRw650iM87feU/ 8prAbj9bm29Woec7JKx8ximsQcplQt0R5AO+0lnsQD9nxpW03SaJm/d+u0Hp/PlMedHh 0HxQ== X-Gm-Message-State: AOJu0YwgX2fTxOBPSfCwjigzDfN/7FuKlFtRN3LNsHGhBlFuw2m9LzrL D19EeFq1Rnlc9dxf9j+eulHLA728EULqZQ== X-Google-Smtp-Source: AGHT+IGfTVOxZ1Ho2+dMSFGhcbHn85rCRhUsxpYmob34IB77B2T6ZjXcPLNi8PrEkA4cKi8r5HQUrw== X-Received: by 2002:a5d:614d:0:b0:336:8d4f:6b1b with SMTP id y13-20020a5d614d000000b003368d4f6b1bmr443504wrt.131.1704805117683; Tue, 09 Jan 2024 04:58:37 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id cw16-20020a056000091000b0033753a61e96sm2351302wrb.108.2024.01.09.04.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 04:58:36 -0800 (PST) From: Tudor Ambarus To: peter.griffin@linaro.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, alim.akhtar@samsung.com, jirislaby@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, cw00.choi@samsung.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 06/12] tty: serial: samsung: add gs101 earlycon support Date: Tue, 9 Jan 2024 12:58:08 +0000 Message-ID: <20240109125814.3691033-7-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240109125814.3691033-1-tudor.ambarus@linaro.org> References: <20240109125814.3691033-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_045841_349044_3394E1B1 X-CRM114-Status: GOOD ( 10.07 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The entire bus (PERIC) on which the GS101 serial resides only allows 32-bit register accesses. The reg-io-width dt property is disallowed for the "google,gs101-uart" compatible and instead the iotype is inferred from the compatible. Always set UPIO_MEM32 iotype for the gs101 earlycon. Reviewed-by: Peter Griffin Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski Reviewed-by: Sam Protsenko --- v3: collect Peter's R-b tag v2: update commit message drivers/tty/serial/samsung_tty.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index a81b61953a28..fed50423b7c1 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2812,6 +2812,17 @@ OF_EARLYCON_DECLARE(exynos4210, "samsung,exynos4210-uart", OF_EARLYCON_DECLARE(artpec8, "axis,artpec8-uart", s5pv210_early_console_setup); +static int __init gs101_early_console_setup(struct earlycon_device *device, + const char *opt) +{ + /* gs101 always expects MMIO32 register accesses. */ + device->port.iotype = UPIO_MEM32; + + return s5pv210_early_console_setup(device, opt); +} + +OF_EARLYCON_DECLARE(gs101, "google,gs101-uart", gs101_early_console_setup); + /* Apple S5L */ static int __init apple_s5l_early_console_setup(struct earlycon_device *device, const char *opt)