From patchwork Tue Jan 9 07:20:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Delphine CC Chiu X-Patchwork-Id: 761244 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2063.outbound.protection.outlook.com [40.107.255.63]) (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 56AA09444; Tue, 9 Jan 2024 07:21:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wiwynn.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wiwynn.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wiwynn.com header.i=@wiwynn.com header.b="DXuZ+KSf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HSz4y6UDm+IFd+zObDjNT3i6l+pXG0LwQgO9B4+fRwcER0nXXXeXyZQmvj68jk1Msr6C/xrHqwXwt5XgHxYgdhAymzCmQO+Fbori25LU1pcfrpB1DGiYwYwC+r8j5d3Jq3GAmQrn7Xw5aaAM1ady3i+/FFK/1XJ8o+n4gZQ4OviQb4AU3RK4BnUS+6g9rnepBQOC8C+CER6AaAtsrdDPpL3Iu/AUwWTu6KnHzGfRqym1l7xvVRxnpFZx585NQ/DGAXB7KJqCY7UzHXTzX0thOBh+mjXTv9WJJRyVFDrzcgXknCzCIYBuZqPzGC67XY7buMSexZVMi+ynLpOYZueU9Q== 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=EmSKcEEWKURPlkS19SqAb+0saPQht4EwjxaRbHrRzNY=; b=PtlNyob9jGE05Tkv1CWSqr1qnTAkbFtK6+i2wQ2zNB/yNARcK07n+f6hFX1Fzh70qoAOgWaUxyTxKXJSaI6XiX+nnrpb4H3Ayg9CUkDFH5Bdyof6YV/4d3s/oGt4aazf3Qlhg+3BI0Q9uH9hkVZkHoqoDsZ67McuYfqPzrK1TqXfoLJQhDPJ/0NlnWRNyIwwUsgs5cXCbqWiu5WEc+vwQVGYI6KMNdjmEg7EF251lu3ffRX3ounwH2ehSCz4yhjxyZJ8rmDzFtAQsx9hsQUNMlbD1AWIN0PJ3Zll+VpHRJh9pBhZm6rVP7pYK+hP32ccuBcEThThoJVxyV+MQhGNUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 211.20.1.79) smtp.rcpttodomain=stwcx.xyz smtp.mailfrom=wiwynn.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=wiwynn.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiwynn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EmSKcEEWKURPlkS19SqAb+0saPQht4EwjxaRbHrRzNY=; b=DXuZ+KSfs2FxWEQbdzoc5qn6V8MFCPkKcOeQXYmUrRfAGbTTd2mdY0SKjlGMnxdYgAPSUefsTlBLP5m+YZLZE0Hvow7Bn7TY2kaDePlesOWiu98VLaCHnMeKqTQwwaNeSGi6SrMd9zbFuF9EZIiURNhtLYHrrySTKZ+XL3+9QReuCTB4+mwKP1B74bHH8SBvCnmjYPMZLHUNlP8Yw3BpfX1us9oivXnRdANxvBliTd+fQpBKxhAptcSQ+hURsQJfgrWCKwSMFGViu1rpGibt/5eDw/3M/o2IphkTQfYhmYVX9xf3UzrlORI/xx2iDalkZXTZcfvy56fNQQfGFCwTjA== Received: from PUZP153CA0009.APCP153.PROD.OUTLOOK.COM (2603:1096:301:c2::10) by TYZPR04MB4495.apcprd04.prod.outlook.com (2603:1096:400:5e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.14; Tue, 9 Jan 2024 07:20:59 +0000 Received: from HK3PEPF0000021E.apcprd03.prod.outlook.com (2603:1096:301:c2:cafe::79) by PUZP153CA0009.outlook.office365.com (2603:1096:301:c2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.7 via Frontend Transport; Tue, 9 Jan 2024 07:20:59 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 211.20.1.79) smtp.mailfrom=wiwynn.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=wiwynn.com; Received-SPF: Fail (protection.outlook.com: domain of wiwynn.com does not designate 211.20.1.79 as permitted sender) receiver=protection.outlook.com; client-ip=211.20.1.79; helo=localhost.localdomain; Received: from localhost.localdomain (211.20.1.79) by HK3PEPF0000021E.mail.protection.outlook.com (10.167.8.40) with Microsoft SMTP Server id 15.20.7181.13 via Frontend Transport; Tue, 9 Jan 2024 07:20:58 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Andrew Jeffery Cc: Delphine CC Chiu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 01/19] ARM: dts: aspeed: yosemite4: Revise i2c-mux devices Date: Tue, 9 Jan 2024 15:20:33 +0800 Message-Id: <20240109072053.3980855-2-Delphine_CC_Chiu@wiwynn.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240109072053.3980855-1-Delphine_CC_Chiu@wiwynn.com> References: <20240109072053.3980855-1-Delphine_CC_Chiu@wiwynn.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HK3PEPF0000021E:EE_|TYZPR04MB4495:EE_ X-MS-Office365-Filtering-Correlation-Id: 1225718d-88cf-4406-4878-08dc10e38711 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dobb9ea2xYoC7UCpCWrfUC+oCy50PrRxADHspucTGuBRoq95LgXlppduhLwjlL94GSupZJzyIfbPCDRaR0CkPLKJoU2cH1Uj/dKWveYCmxPGQOL+NV+S0fNG2eoS6FBWHn2//B6LCSsOY8KpQ0+kB4mZtTiPYmiUE91Ck1AID/B2vwVeeGirJDS3NSQP+nqdW05jedV0050AnjG7b/N0sPllQtj0uEpNARp5pICQHCPMJtOFRLXr6lMRTzguk/ZPB5YSFwSU+Xa9cuuamkygrJUJwf5aH+Ci7CK6iPOs4sg2E7T9lVibXinucQsmJ8nEuKvOjzJJ2IbWL6/YKGaINfupkK+qX1z30gsPeOhRuvxPq7PRK8w+q99p1QBm4KIGD86DXMMuDcuTllhBR1/R6DHh2m4EqMI9BaUwSb301pkjX2RnfKZ776ZA1N40tcVen6UsPT9Qb+es4DodZ+FLNDEYZsTDHz4SaReBun9ulCkuNvjIDR+udB4EBbdpmFBrWl2qgAyffg9sCmFndFHJj5+1GPm3VvgV/w64+zaYu/+bZLQTD+H6G2noDlIWpVcIX3AsoRDtZoKhy6fDCNy8GtO6ROV89/ic2cki6VHn7Bh/wUyzf/GhzLKSEvlbmcQ3QztQm8KlzeDh+nHbjZUllTOsOzPJISUQzbMZ4JvearKsSZbqu4GvdP5eX2pLyHAkYiHN9GVd1PRCDV2qYHk1Cg== X-Forefront-Antispam-Report: CIP:211.20.1.79; CTRY:TW; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:211-20-1-79.hinet-ip.hinet.net; CAT:NONE; SFS:(13230031)(6069001)(4636009)(376002)(346002)(396003)(136003)(39850400004)(230922051799003)(64100799003)(451199024)(1800799012)(82310400011)(186009)(46966006)(36840700001)(4326008)(83380400001)(36860700001)(2906002)(8936002)(86362001)(8676002)(47076005)(5660300002)(7416002)(9316004)(82740400003)(478600001)(36736006)(41300700001)(6486002)(6666004)(6512007)(6506007)(70206006)(36756003)(70586007)(316002)(40480700001)(110136005)(956004)(2616005)(1076003)(356005)(336012)(26005)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2024 07:20:58.7413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1225718d-88cf-4406-4878-08dc10e38711 X-MS-Exchange-CrossTenant-Id: da6e0628-fc83-4caf-9dd2-73061cbab167 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=da6e0628-fc83-4caf-9dd2-73061cbab167; Ip=[211.20.1.79]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: HK3PEPF0000021E.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB4495 Revise Yosemite 4 devicetree for devices behind i2c-mux - Add gpio and eeprom behind i2c-mux - Remove redundant idle-state setting for i2c-mux Signed-off-by: Delphine CC Chiu --- .../aspeed/aspeed-bmc-facebook-yosemite4.dts | 381 ++++++++++++++++-- 1 file changed, 347 insertions(+), 34 deletions(-) diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts index 64075cc41d92..dac58d3ea63c 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts @@ -17,6 +17,25 @@ aliases { serial6 = &uart7; serial7 = &uart8; serial8 = &uart9; + + i2c16 = &imux16; + i2c17 = &imux17; + i2c18 = &imux18; + i2c19 = &imux19; + i2c20 = &imux20; + i2c21 = &imux21; + i2c22 = &imux22; + i2c23 = &imux23; + i2c24 = &imux24; + i2c25 = &imux25; + i2c26 = &imux26; + i2c27 = &imux27; + i2c28 = &imux28; + i2c29 = &imux29; + i2c30 = &imux30; + i2c31 = &imux31; + i2c32 = &imux32; + i2c33 = &imux33; }; chosen { @@ -259,9 +278,109 @@ &i2c8 { bus-frequency = <400000>; i2c-mux@70 { compatible = "nxp,pca9544"; - idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x70>; + + imux16: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux17: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux18: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux19: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; }; }; @@ -270,15 +389,174 @@ &i2c9 { bus-frequency = <400000>; i2c-mux@71 { compatible = "nxp,pca9544"; - idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x71>; + + imux20: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux21: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux22: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux23: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; }; }; &i2c10 { status = "okay"; bus-frequency = <400000>; + i2c-mux@74 { + compatible = "nxp,pca9544"; + i2c-mux-idle-disconnect; + reg = <0x74>; + + imux28: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio@24 { + compatible = "nxp,pca9506"; + reg = <0x24>; + gpio-controller; + #gpio-cells = <2>; + gpio-line-names = + "","","","", + "NIC0-MAIN-PWR-EN","NIC1-MAIN-PWR-EN", + "NIC2-MAIN-PWR-EN","NIC3-MAIN-PWR-EN", + "","","","","","","","", + "","","","","","","","", + "","","","","","","",""; + }; + }; + + imux29: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + }; }; &i2c11 { @@ -433,16 +711,14 @@ eeprom@51 { reg = <0x51>; }; - i2c-mux@71 { - compatible = "nxp,pca9846"; + i2c-mux@74 { + compatible = "nxp,pca9546"; #address-cells = <1>; #size-cells = <0>; - - idle-state = <0>; i2c-mux-idle-disconnect; - reg = <0x71>; + reg = <0x74>; - i2c@0 { + imux30: i2c@0 { #address-cells = <1>; #size-cells = <0>; reg = <0>; @@ -450,26 +726,26 @@ i2c@0 { adc@1f { compatible = "ti,adc128d818"; reg = <0x1f>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; pwm@20{ - compatible = "max31790"; + compatible = "maxim,max31790"; + pwm-as-tach = <4 5>; reg = <0x20>; - #address-cells = <1>; - #size-cells = <0>; }; gpio@22{ compatible = "ti,tca6424"; reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; }; - pwm@23{ - compatible = "max31790"; - reg = <0x23>; - #address-cells = <1>; - #size-cells = <0>; + pwm@2f{ + compatible = "maxim,max31790"; + pwm-as-tach = <4 5>; + reg = <0x2f>; }; adc@33 { @@ -492,34 +768,34 @@ gpio@61 { }; }; - i2c@1 { + imux31: i2c@1 { #address-cells = <1>; #size-cells = <0>; - reg = <0>; + reg = <1>; adc@1f { compatible = "ti,adc128d818"; reg = <0x1f>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; pwm@20{ - compatible = "max31790"; + compatible = "maxim,max31790"; + pwm-as-tach = <4 5>; reg = <0x20>; - #address-cells = <1>; - #size-cells = <0>; }; gpio@22{ compatible = "ti,tca6424"; reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; }; - pwm@23{ - compatible = "max31790"; - reg = <0x23>; - #address-cells = <1>; - #size-cells = <0>; + pwm@2f{ + compatible = "maxim,max31790"; + pwm-as-tach = <4 5>; + reg = <0x2f>; }; adc@33 { @@ -547,12 +823,10 @@ i2c-mux@73 { compatible = "nxp,pca9544"; #address-cells = <1>; #size-cells = <0>; - - idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x73>; - i2c@0 { + imux32: i2c@0 { #address-cells = <1>; #size-cells = <0>; reg = <0>; @@ -563,10 +837,10 @@ adc@35 { }; }; - i2c@1 { + imux33: i2c@1 { #address-cells = <1>; #size-cells = <0>; - reg = <0>; + reg = <1>; adc@35 { compatible = "maxim,max11617"; @@ -589,9 +863,48 @@ mctp@10 { i2c-mux@72 { compatible = "nxp,pca9544"; - idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x72>; + + imux24: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + temperature-sensor@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + }; + + imux25: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + temperature-sensor@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + }; + + imux26: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + temperature-sensor@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + }; + + imux27: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + temperature-sensor@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + }; }; };