Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1517890lqb; Sun, 26 May 2024 05:06:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUO9PnxNbzID+pc5CyBjJZEyaEf8qOrF4lF3thkRv9nWCd8Uk/ItUeMYOgZc+Wr6rC8dB545o47Ba1t1BFcnxBLdVjUiX8BZsRziB3qrg== X-Google-Smtp-Source: AGHT+IGd5FUTTlhL3BbBcWKnsJKcxSTX39FGP9daD7GMdoh/N9BtptbaywO3tBvWdRp+hiGDBnKF X-Received: by 2002:a05:6122:2016:b0:4e4:ea33:1fd8 with SMTP id 71dfb90a1353d-4e4efa7aba9mr6099671e0c.1.1716725188237; Sun, 26 May 2024 05:06:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716725188; cv=pass; d=google.com; s=arc-20160816; b=sG7zd/Jem6CCLhb2TJHdL649FCQfhTNHaZfXmQbiFqKk+cMtRqifQUEndRX7WxPLHA QpTz0qpDWfW2/52p+khOX3G1ha7tT64V0Dw+vYZvfGW3RiR8NlAps2erOF2r6kj0cZpr 1dpb02qnFYELo2b4S1IRdz8IeL4Sc6Y1fhJh17wbP0+/wuPVty8Jgud6kpllHRWhZULv 01kKqzAVQLFbTMk0TxVoPmVwnHj/aaq+bx75M3zhZQE0/1u8xe6ZN5h6Y9Blx34sRhaw XvwE2rk2vDCXcgd1YFiE0lsb+Jurpexk4yYVHxU1huglfgU0nQ8cylKkWYA2D4vtqxjs Cvkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:from :dkim-signature; bh=QzPjQrvRFTNCaY9bkkx1AdOfiqg86uxrelAFKCvzxQw=; fh=2CNSiLuTL0tmgL0NLE/8Od9QT3sI2KvBcmk7iI5kn3E=; b=wMixv0/BbO6ywAHD95oA/F5+ciiA1IFhkBCV75S94fVfbM4aTrFzxj/WQo6O26Xqvz sHCPlCW1GE0crwGcDFG56VuYMnJRde8xjF1SaTCDAsQaZ+Hsnqfvw9CAZRqhOwqEa9c5 Kd8lruxv7cRiGUYl551tZ7JxfTSwlsZU9BsOr3HbqK3Ll5LLGhb75ocbGc7B/n8TMlML NNcZJAGNAVofnnNP8lgX5QPyqea5ZUKL+4MIHbIviVGbLOkAcLuj5xU+qMpLkhaTXhCH /khFfHdB5XlH2HqLCxtqpgywIlq2wKs42Uk7zWJndQmbD/2WNDjBTyG7jcIQ2jIblxTs vhxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pa5TGMbS; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-189729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189729-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48a3a39c72csi1319014137.588.2024.05.26.05.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 05:06:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pa5TGMbS; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-189729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189729-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E03511C20A12 for ; Sun, 26 May 2024 12:06:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67248DDCD; Sun, 26 May 2024 12:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="pa5TGMbS" Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 159B1D28D for ; Sun, 26 May 2024 12:06:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716725179; cv=none; b=htosunKFJ0t+dCfHSFkAs4Kq49uUoKwrfSLrDbvkm+HMAgDkIkq18AJxV9cBO6kwnzf9MP9TdjcbKv9lMmA/UrnOsT2wjz9+uLORvCPRRoF49F9d7t6zMPIBSODwyJt33psdU4OUNT4UM4P3QeRemBGvdmiRtzZJqZ2duhL3l6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716725179; c=relaxed/simple; bh=rNFPvgBklmUcC86gDjg2X8Vr+FvzY/KOE2Yw4BNMby0=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=o7aSsU0BegI9uHqCQsvJ0onw0YV8/UapIKtHAAXpoHNskA/LhrIf7AI1vuFWZwBrnitVczi7EVLlb6yckoeFc6bMmaJqXMmmlqXiOPqywGJOk4dv7Jzd5akf3tgXZt9G6NP1pPl6plmKoc6df6JEI/JQsvAV8BoZLwwitF1H5uU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=pa5TGMbS; arc=none smtp.client-ip=185.125.188.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id EF7824070C for ; Sun, 26 May 2024 12:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1716725174; bh=QzPjQrvRFTNCaY9bkkx1AdOfiqg86uxrelAFKCvzxQw=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=pa5TGMbSlenTZwNfPJ+u/sJui9RFxmMEs7OCuLvktaKCVsvS0eM+udp5JOr04MJA2 coNSCxNoi4viaNs2GN4Zd1lfcp0VLcE+4Mwszhoz8tPaNvmVs21ei6RB7SW9Z7YSLz v13PvvWbYXiqoVyTy03ikZLOFOo4ktB+eyCB66EjyB3zPsVAUO8sHhkYRG0jBNf0si SmRTQ5tRh4BOXAUjAhqfiEykrwFLqJ/FSuwXHMdu+ETatAYLc8+Dtj5U/sAOoOn/Tg i0TYj1toENQkmINa5k6Y7ZtVKpRgAWVylZNe9D47d0/g4hCZSOHEBTP4pkl29WLd1G Sup/LBNz9vIwQ== Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-5295c099a53so1682067e87.0 for ; Sun, 26 May 2024 05:06:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716725172; x=1717329972; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QzPjQrvRFTNCaY9bkkx1AdOfiqg86uxrelAFKCvzxQw=; b=d12WUKnb719h4qV+G6ade8w9NThoLP3GLL97TAuWV1iT6OUCSYFoZotqTfTtGIwTDE 0404ZsnNazP8GmuQ06D6FImJO0UdxPD0LNHb/qyfnPv5weNOlUddOaHyCCjNS/e9KdI+ eemkKQZ0wGK/bmv57CTqH/qlSZIwfiGmt+OmbsSk7zOSZHO+0VMtmRZ3OqBXKtGWXUbt YCU7j15ih88cAvT7ubhJs5LL8rKnBY5NE4rTX6Hlt/o8Uj/Y/o7rfsMh/N98oGG8Nfcw 2WpXtpCl8RvOaqlT4SCe9IHZvrICTvdJkHvA9kyeD7gZFKoaV/j9arwB5K+hT4W96hu+ V84w== X-Forwarded-Encrypted: i=1; AJvYcCXPRourHwdwuEDa003IBSLJ65rWex0hKg8/mve3mn342WzXkUZBguObSLWr/7gZk3RdPRAAO6vNcYZC47Bh+ST/EVqYl+DAXS6zj0sP X-Gm-Message-State: AOJu0YxsTgf7eVrTHpRbVUwW/w9EBxlB8KZtBilEHWTGzDLMO452mKyK 4XXrgnylsFdPXiKK6khAUYFg6zB8YzcPZM1nsoVzwSNFtTDZusfxiLchsJyFgyy/HL8JT5KgkOu nA2RHhUhHmUJZQWROA+6HTaInOAROp7nDYz9bSa3B6uEBeggV9slQyRPB0ZqyrGtr/m6zZ8UE/B iPQbaKaFTNv90ShoSTtPZiRPgL8pXhQi2Tt++tsiy+bt52GiujUUN2 X-Received: by 2002:a05:6512:344c:b0:519:1a91:30cc with SMTP id 2adb3069b0e04-5296410ae61mr3785540e87.4.1716725172285; Sun, 26 May 2024 05:06:12 -0700 (PDT) X-Received: by 2002:a05:6512:344c:b0:519:1a91:30cc with SMTP id 2adb3069b0e04-5296410ae61mr3785524e87.4.1716725171737; Sun, 26 May 2024 05:06:11 -0700 (PDT) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Sun, 26 May 2024 08:06:10 -0400 From: Emil Renner Berthing In-Reply-To: <20240517-i2c-th1520-v2-3-d364d135ccc6@bootlin.com> References: <20240517-i2c-th1520-v2-0-d364d135ccc6@bootlin.com> <20240517-i2c-th1520-v2-3-d364d135ccc6@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Date: Sun, 26 May 2024 08:06:10 -0400 Message-ID: Subject: Re: [PATCH v2 3/3] riscv: dts: thead: Enable I2C on the BeagleV-Ahead To: Thomas Bonnefille , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Drew Fustini , Emil Renner Berthing , Conor Dooley Cc: Palmer Dabbelt , Albert Ou , Paul Walmsley , Thomas Petazzoni , =?UTF-8?Q?Miqu=C3=A8l_Raynal?= , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Thomas Bonnefille wrote: > This commit enables the I2C0 controller of the TH1520, together with > the FT24C32A EEPROM that is connected to it. > In addition, this commit also enables the I2C controllers I2C2, I2C4 > and I2C5 as they are all three exposed on headers (P9 19 and 20 for I2C2, > P9 17 and 18 for I2C5 and MikroBus 7 and 5 for I2C4). > It also defined the required pinctrl nodes. > > Signed-off-by: Thomas Bonnefille > --- > arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 84 ++++++++++++++++++++++ > 1 file changed, 84 insertions(+) > > diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts > index 57a2578123eb..aeb04f5159d5 100644 > --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts > +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts > @@ -121,6 +121,47 @@ led-pins { > }; > }; > > +&padctrl1_apsys { These node references should be ordered alphabetically, so please put this below &padctrl0_apsys. > + i2c0_pins: i2c0-0 { > + i2c-pins { > + pins = "I2C0_SDA", > + "I2C0_SCL"; > + function = "i2c"; > + bias-pull-up = <2100>; Are you sure the strong pull-up is needed here and below? > + drive-strength = <7>; > + input-enable; > + input-schmitt-enable; > + slew-rate = <0>; > + }; > + }; > + > + i2c4_pins: i2c4-0 { > + i2c-pins { > + pins = "GPIO0_19", /*I2C4_SDA*/ > + "GPIO0_18"; /*I2C4_SCL*/ Please add spaces here like other kernel comments. Eg. /* I2C4_SDA */ > + function = "i2c"; > + bias-pull-up = <2100>; > + drive-strength = <7>; > + input-enable; > + input-schmitt-enable; > + slew-rate = <0>; > + }; > + }; > + > + i2c5_pins: i2c5-0 { > + i2c-pins { > + pins = "QSPI1_D0_MOSI", /*I2C5_SDA*/ > + "QSPI1_CSN0"; /*I2C5_SCL*/ Same here. > + function = "i2c"; > + bias-pull-up = <2100>; > + drive-strength = <7>; > + input-enable; > + input-schmitt-enable; > + slew-rate = <0>; > + }; > + }; > +}; > + > &padctrl0_apsys { > uart0_pins: uart0-0 { > tx-pins { > @@ -143,6 +184,19 @@ rx-pins { > slew-rate = <0>; > }; > }; > + > + i2c2_pins: i2c2-0 { i2c2-0 sorts before uart0-0 alphabetically. > + i2c-pins { > + pins = "I2C2_SDA", > + "I2C2_SCL"; > + function = "i2c"; > + bias-pull-up = <2100>; > + drive-strength = <7>; > + input-enable; > + input-schmitt-enable; > + slew-rate = <0>; > + }; > + }; > }; > > &uart0 { > @@ -150,3 +204,33 @@ &uart0 { > pinctrl-0 = <&uart0_pins>; > status = "okay"; > }; > + > +&i2c0 { Again please sort these references alphabetically. > + status = "okay"; And the properties. Eg. move status below pinctrl-0. > + clock-frequency = <100000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c0_pins>; > + > + eeprom@50 { > + compatible = "atmel,24c32"; > + reg = <0x50>; > + }; > +}; > + > +&i2c2 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c2_pins>; > +}; > + > +&i2c4 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c4_pins>; > +}; > + > +&i2c5 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c5_pins>; > +}; > > -- > 2.45.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv