From patchwork Tue Jan 31 15:26:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734943 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=cwisAuUS; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P5psk1xRCz23gV for ; Wed, 1 Feb 2023 02:30:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E2D5585B17; Tue, 31 Jan 2023 16:29:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="cwisAuUS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C4D485B06; Tue, 31 Jan 2023 16:28:19 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 6872085AF8 for ; Tue, 31 Jan 2023 16:27:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x130.google.com with SMTP id u8so6604023ilq.13 for ; Tue, 31 Jan 2023 07:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=E3aYAYDCntU5TG62qL4xulrI1QXA9v6Hn0NRJL2oZ8Y=; b=cwisAuUSo/KKt1/cP0S0Y4OS4U0+Qk5eMJnE8IF4Vin0ucL3Dmcfc2vs4i5SnINNq0 lT2kNWKtvk7e5uScGyfhwHaGa1zu5s2mpfJA1Lxr2RTCBKBDNa4as1S7Xj3+vsEnAKZ3 lbvq7DHeQq5FLcPIhsd919NwjEUMC+H8i5Fiw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=E3aYAYDCntU5TG62qL4xulrI1QXA9v6Hn0NRJL2oZ8Y=; b=ZXOZ0OK34zt34y0pL7XEstyuDuFzD/k+6ZGhtuUSCkavuKNOlPM9qtEvo0hY7BOgK/ 4KSjK3ZE4Vc4ypDItWNcdKit/c/izX3caXKdnTU3eE4To5Qq4Q6wI6kd7ZXzGASJjFSV EHIldRzn1oHOD4HSmUjdElWkrEMwgkddGIk8LA8Ea+GIOBJuhmWBK2tDkIExqNLOkLTz kGoHocH33Ulrmi8THmuz7dRZc+1B5Jtnd34dpsWLPm83cfzbsOrTnmbpdkSt1m7dQV95 1RJf+a2gIgHnrbZ3k6+xPVmaY6yfS8SYXcFikGUJiqof8tCcS6I5FCbzLsC3Og+aUacd iDiA== X-Gm-Message-State: AO0yUKWoaKdVrxfzx9EGdBXLtgkcpLmJ4kDiqg0no9f9XtyxstKu7wVP gbrniAHZpG5E+5Ng06mrmxt30eEqCzSxWv+n X-Google-Smtp-Source: AK7set97jQM5LUesIdmvTrtahsQMyaemU+uTNTDs4NBtgq4R8ORie3I5IwnxTApBgLkB1PRtkGqjGQ== X-Received: by 2002:a05:6e02:15c6:b0:310:ae72:32a0 with SMTP id q6-20020a056e0215c600b00310ae7232a0mr11406151ilu.21.1675178870142; Tue, 31 Jan 2023 07:27:50 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 14/32] sandbox: Tidy up I2C options Date: Tue, 31 Jan 2023 08:26:44 -0700 Message-Id: <20230131152702.249197-15-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean At present we enable the sandbox I2C driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass --- drivers/i2c/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 347ba4d7822..70451e7c98b 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -47,6 +47,16 @@ config SPL_DM_I2C device (bus child) info is kept as parent platdata. The interface is defined in include/i2c.h. +config TPL_DM_I2C + bool "Enable Driver Model for I2C drivers in TPL" + depends on TPL_DM && DM_I2C + help + Enable driver model for I2C. The I2C uclass interface: probe, read, + write and speed, is implemented with the bus drivers operations, + which provide methods for bus setting and data transfer. Each chip + device (bus child) info is kept as parent platdata. The interface + is defined in include/i2c.h. + config VPL_DM_I2C bool "Enable Driver Model for I2C drivers in VPL" depends on VPL_DM && DM_I2C @@ -508,6 +518,16 @@ config SYS_I2C_ROCKCHIP config SYS_I2C_SANDBOX bool "Sandbox I2C driver" depends on SANDBOX && DM_I2C + default y + help + Enable I2C support for sandbox. This is an emulation of a real I2C + bus. Devices can be attached to the bus using the device tree + which specifies the driver to use. See sandbox.dts as an example. + +config SPL_SYS_I2C_SANDBOX + bool "Sandbox I2C driver (SPL)" + depends on SPL && SANDBOX && DM_I2C + default y help Enable I2C support for sandbox. This is an emulation of a real I2C bus. Devices can be attached to the bus using the device tree