Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4114984rwb; Mon, 31 Jul 2023 01:17:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEG3pB6HcAPNAlrDhbJ5Ff59xQ4yfHeBOZIRNz7gsBnnDlvHe8522FA4BSPP3D6nA/AFR5H X-Received: by 2002:a17:906:6496:b0:99b:d4a0:1322 with SMTP id e22-20020a170906649600b0099bd4a01322mr6592065ejm.41.1690791462181; Mon, 31 Jul 2023 01:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690791462; cv=none; d=google.com; s=arc-20160816; b=eSQhuq/ANQDiIM7VA9JPz8TOJgxgjQajr2+BG9iVudkK9mW9cg+oJjUAmX7miBaXLb p/hloE8uNtgV3OkOyvuElqTrGMAxM7N7aWkxcYI8KPcwid1AceyQCv/bEygjRs8y/ooi xa+rnCb3YrNG0EI+Ysau6j2UDlAacug6JhnYcLpqDiCXQZmje547NAmj3Sg/28QXOc/y Bj6LP9hFrR6V0XRQCmjcyxUkgFNAN/TYBpqYQm1ySj+lPHXkuLl/qG6hNNm0P3VScMVI J7K6Wvu6qI1F5PvbBFs6NRYHexC5u5F7quwBgMu5YRyLp3KK9TAioMNjBZ8W5sPLEQ91 MWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4QzEYIktEA2+sOlnGV7rZYJnYleI7xYKEEZG31RhhOY=; fh=ws0YEqroHyHN8fKCcFG4aR6igXntDqxOJVz+pLGzQKk=; b=yx6Mzb/Po/P9dNoLdFuCoNvKcnJFUSb/Icq1ChNqmSpejEwxEPZkfBuYyrPZuE2Nys R3Na/bTWEIBjrBG1OkCYUyw83f97NwihNtCZ/qrGKQJKbayLcgEbFemyTbZh72PGoZI8 baykz/H7NWPi02Uk4FCDdXgBclpIfUIC0B3N1DPNHjif7bZf8Faafi8wgBvs7Vb+Z9Kx kdUD4alQZ2eYsJxds1j9H9c2ssdr16COAQ+sKzNyluHlTNX8uN6yNHMkOyBz5wVYTIuD /rh4Z0LZ6Y6sFTLPZ2FRlYU6ddZVsDZ36YIm6TvC/NxbmMT45WYWLecphqUZMasmANm+ BshQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=SjA7izv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lu22-20020a170906fad600b009938cb10548si1707906ejb.549.2023.07.31.01.17.16; Mon, 31 Jul 2023 01:17:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=SjA7izv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231485AbjGaHdZ (ORCPT + 99 others); Mon, 31 Jul 2023 03:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbjGaHcv (ORCPT ); Mon, 31 Jul 2023 03:32:51 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 50A281BFB; Mon, 31 Jul 2023 00:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=4QzEY IktEA2+sOlnGV7rZYJnYleI7xYKEEZG31RhhOY=; b=SjA7izv8EbXsrjF7antlF wongP/KnyRu9bisW7vU2CmecVYp+YPevp3tOXGyh4jbJaCgIV7OQrheYZNtEWc41 hlXvUz797PghwUMbG3oBWDX90lTZoqWJ7iQBBk1HL0dHRAWtQ0UbSEyH+0tJn0qU VIWZTIPjZyyeyhTN5lxMb4= Received: from localhost.localdomain (unknown [39.144.138.187]) by zwqz-smtp-mta-g3-1 (Coremail) with SMTP id _____wBHp79qX8dkyjkSBw--.38597S3; Mon, 31 Jul 2023 15:14:53 +0800 (CST) From: xingtong_wu@163.com To: hdegoede@redhat.com, markgross@kernel.org, henning.schild@siemens.com, andriy.shevchenko@linux.intel.com, lee@kernel.org, xingtong.wu@siemens.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] platform/x86: simatic-ipc: add new models BX-56A/BX-59A Date: Mon, 31 Jul 2023 15:14:24 +0800 Message-Id: <20230731071424.4663-2-xingtong_wu@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230731071424.4663-1-xingtong_wu@163.com> References: <20230731071424.4663-1-xingtong_wu@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wBHp79qX8dkyjkSBw--.38597S3 X-Coremail-Antispam: 1Uf129KBjvJXoWxAFWDWry3JFW5tF43Kry7GFg_yoW5KFW7pF n5ArW8AFW3Wa40ywn3Ga9rZFZxZwsIkr47GayUArnrA3sFgrsYqF9rAF4fJFy3Jw45W3y3 W3Z5trW7WF4DZrUanT9S1TB71UUUUjUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jyQ6JUUUUU= X-Originating-IP: [39.144.138.187] X-CM-SenderInfo: p0lqw35rqjs4rx6rljoofrz/xtbCfge90GDcO8jJkQAAsD X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L4, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "xingtong.wu" This adds support for the Siemens Simatic IPC models BX-56A/BX-59A, led/watchdog/battery on these models are same, actual drivers for models will be sent in separate patches. Signed-off-by: xingtong.wu --- drivers/platform/x86/siemens/simatic-ipc.c | 12 ++++++++++-- include/linux/platform_data/x86/simatic-ipc-base.h | 1 + include/linux/platform_data/x86/simatic-ipc.h | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/siemens/simatic-ipc.c b/drivers/platform/x86/siemens/simatic-ipc.c index 13c857316c7f..02c540cf4070 100644 --- a/drivers/platform/x86/siemens/simatic-ipc.c +++ b/drivers/platform/x86/siemens/simatic-ipc.c @@ -78,6 +78,12 @@ static struct { {SIMATIC_IPC_IPCBX_21A, SIMATIC_IPC_DEVICE_BX_21A, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_BX_21A, { "emc1403", NULL }}, + {SIMATIC_IPC_IPCBX_56A, + SIMATIC_IPC_DEVICE_BX_59A, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_BX_59A, + { "emc1403", "w83627hf_wdt" }}, + {SIMATIC_IPC_IPCBX_59A, + SIMATIC_IPC_DEVICE_BX_59A, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_BX_59A, + { "emc1403", "w83627hf_wdt" }}, }; static int register_platform_devices(u32 station_id) @@ -103,7 +109,9 @@ static int register_platform_devices(u32 station_id) pdevname = KBUILD_MODNAME "_batt_apollolake"; if (battmode == SIMATIC_IPC_DEVICE_BX_21A) pdevname = KBUILD_MODNAME "_batt_elkhartlake"; - if (battmode == SIMATIC_IPC_DEVICE_227G || battmode == SIMATIC_IPC_DEVICE_BX_39A) + if (battmode == SIMATIC_IPC_DEVICE_227G || + battmode == SIMATIC_IPC_DEVICE_BX_39A || + battmode == SIMATIC_IPC_DEVICE_BX_59A) pdevname = KBUILD_MODNAME "_batt_f7188x"; platform_data.devmode = battmode; ipc_batt_platform_device = @@ -121,7 +129,7 @@ static int register_platform_devices(u32 station_id) pdevname = KBUILD_MODNAME "_leds"; if (ledmode == SIMATIC_IPC_DEVICE_127E) pdevname = KBUILD_MODNAME "_leds_gpio_apollolake"; - if (ledmode == SIMATIC_IPC_DEVICE_227G) + if (ledmode == SIMATIC_IPC_DEVICE_227G || SIMATIC_IPC_DEVICE_BX_59A) pdevname = KBUILD_MODNAME "_leds_gpio_f7188x"; if (ledmode == SIMATIC_IPC_DEVICE_BX_21A) pdevname = KBUILD_MODNAME "_leds_gpio_elkhartlake"; diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h index 4ca21065c862..2d7f7120ba6b 100644 --- a/include/linux/platform_data/x86/simatic-ipc-base.h +++ b/include/linux/platform_data/x86/simatic-ipc-base.h @@ -22,6 +22,7 @@ #define SIMATIC_IPC_DEVICE_227G 5 #define SIMATIC_IPC_DEVICE_BX_21A 6 #define SIMATIC_IPC_DEVICE_BX_39A 7 +#define SIMATIC_IPC_DEVICE_BX_59A 8 struct simatic_ipc_platform { u8 devmode; diff --git a/include/linux/platform_data/x86/simatic-ipc.h b/include/linux/platform_data/x86/simatic-ipc.h index f2eafa43a605..8d8b3b919674 100644 --- a/include/linux/platform_data/x86/simatic-ipc.h +++ b/include/linux/platform_data/x86/simatic-ipc.h @@ -36,6 +36,8 @@ enum simatic_ipc_station_ids { SIMATIC_IPC_IPCBX_39A = 0x00001001, SIMATIC_IPC_IPCPX_39A = 0x00001002, SIMATIC_IPC_IPCBX_21A = 0x00001101, + SIMATIC_IPC_IPCBX_56A = 0x00001201, + SIMATIC_IPC_IPCBX_59A = 0x00001202, }; static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len) -- 2.25.1