From patchwork Tue Sep 10 03:07:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13797806 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 03A06EDE994 for ; Tue, 10 Sep 2024 03:09:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: Message-Id:Content-Transfer-Encoding:Content-Type:Subject:Date:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=CVKS8S9gR882jebGmFGqmn8Z8+a42VMRtmQRyCOT3ww=; b=1Pg8JwYw9HjwVssZuQjeeJJ3VD hZMBIOm6tw6djC7+lVm4SdnmPeQx0ZsNK6L5e47h0kLamZKDwckSE7pTsCXHalsc0yBAHN7osAgof eo6WoHHOmYohVd+OBRqQx1ZP9VEhU5DLsbqs90h6H0DdErsd4Pyrx7bsVfKvaEoTQx+4V+P5xCSwm jgnGeEZ0O507mn9lSKl0ZZN3FBzyMbIg01E0eBPIMJbdlr/pp2VHINJVo4vmT+9sZtR3RUzX52IwV OC/s9rwFeIueX6/4671BLKGh/Gj5t253habHw47h/HcWuN3hIpBgEvCMyfMRpQIDfNot/Tj1H+ayv EDjwugrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snrFi-000000042Bu-4BUQ; Tue, 10 Sep 2024 03:09:15 +0000 Received: from mail-eastasiaazlp170110002.outbound.protection.outlook.com ([2a01:111:f403:c400::2] helo=HK3PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snrEh-0000000423C-08kL; Tue, 10 Sep 2024 03:08:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t+srECYw1kQkvqCbRGYy9CaD+E3aovMtMzJt77n03VKaesOmqxbwpdbmRGpL03o6rvkjjUMxy02Wyn2xrKAaU6EhJPHdpYecM3nmMawHO6gJM+3fD1wJY+66bFgb6ihKuUNWuAVMhuwrNg+R752/ryWK5uIOUFNjCXSwZP1rSErj6c6l8bvQK0Odh74GWFDFAAcdmrKoLSDzEPF0FgI9P0/WhySe27sKHCSxigFeVhJZ+61STg57yHiukYyiVIJC4NpimdWXx9BpzQ5urhue6t3Q3xPWgrsjbbkP0/93P3PBsoIfQKRgxsjwGpNLpjgzb6B6emHzesq7BA8JMq79pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=CVKS8S9gR882jebGmFGqmn8Z8+a42VMRtmQRyCOT3ww=; b=eCvZLpHhVZiSIA8kvwD2atlklibTakvsqpWhbh40E3tYLaUNroUHL2zpZVvy3SujtPn13v6CU7HWBqN7v19GyQhcMf8DcA9cS0tg3aX6iQRgU/mY+1awGaqrxiBsKtRZpdGgMCmVArUqG/FCFW9BF1rgmUWu6XOFgbDBK08KtVDWpuDbfSv8EZFH+icCP90fvRv6MVjIR0+h5JXjj6GwUXmIiPn2RygCnHVIstmomIwuhQoJaWz/EtEdqYHP9edm4PmDcHxz+RMDDiTHh//gvBfcSFHdAO6ntsScO7fI/IJaUsi5AQReRVeS3MliwHwPPZVyj/xWZ6vgsEk1+g4StA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by SI2PR03MB6783.apcprd03.prod.outlook.com (2603:1096:4:1ef::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.23; Tue, 10 Sep 2024 03:07:56 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%4]) with mapi id 15.20.7939.022; Tue, 10 Sep 2024 03:07:56 +0000 From: Jacobe Zang Date: Tue, 10 Sep 2024 11:07:47 +0800 Subject: [PATCH v14] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Message-Id: <20240910-dts-v14-1-82b39bd91257@wesion.com> X-B4-Tracking: v=1; b=H4sIAAK432YC/22NOw7CMBAFrxJtjZF/ODYV90AU+EdcECM7CqAod 2edLhLlG+3MLlBDSaHCuVughDnVlEccTB46cMN9fASSPALglEuquSZ+qoRZpoToT04aB3j5KiG mz5a53nAPqU65fLfqzHjD+wBCQommVkWkUfXx8g7t99HlJ7TEzMQ/TaCmbIxGG+WVNDttXdcfz p6pNNEAAAA= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Hector Martin , Sven Peter , Alyssa Rosenzweig , jacobe.zang@wesion.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, nick@khadas.com, Muhammed Efe Cetin , Arend van Spriel X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1725937673; l=4483; i=jacobe.zang@wesion.com; s=20240828; h=from:subject:message-id; bh=S8CJao7eVnx5Qs7xLub3iZcMCvRQEKrMGIan7eziKDk=; b=IMOJhAYULA4nSpcX3uKpeROqiuJZkajG0XAvoAx3E3gk84j0mCuyPYiGBLlLFZ1QXzwDcrEHQ HHGWBHsuLPsArNox0t1/yBKNfwIKj3WP29CGLqOfZ2HdtyjrtU59Nzp X-Developer-Key: i=jacobe.zang@wesion.com; a=ed25519; pk=CkP5TjIqHSwHJwZXTGtadoXZucYvakXcO3HjbR6FoeU= X-ClientProxiedBy: SG2PR06CA0243.apcprd06.prod.outlook.com (2603:1096:4:ac::27) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|SI2PR03MB6783:EE_ X-MS-Office365-Filtering-Correlation-Id: e92d8f99-3cad-4829-e5f2-08dcd145c48b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Z12238o6YE1B8KaSP7JF15YUYJdNOCi?= =?utf-8?q?WIbOgQCvCoaWmrKEffDvdhmQu+VkIpHzMJatsQkbAwn6o0oZlejrbXkcuKEtckBfR?= =?utf-8?q?SZ6PHmZslysG/ZWteND0h9/AniFadiQIre00ybRS/+vSuMUPTC6kDiOJF71aTNvgW?= =?utf-8?q?XZShovzVTHBjoS8CeQr85JoIWtyYJbU+l1y7eKgqlhOifcL6a+3BSvhQpmzdEpABK?= =?utf-8?q?BW9ATjjTmIjKF8VzuSd976T1sSOkeXCOuXfWrhaL+JDr75ZsKa2orqWnW1c490m/Q?= =?utf-8?q?vaDDqrC3uTYusOHS4Yuss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k328feSnk7IbOjBvLP+k1lmG3LKMlv1KzRq8ZU8A36bylKF?= =?utf-8?q?vUnxBGgbXUdY6+zEvFITNJEHESe2kFAhBZTovKAdDuIH+Mq9qJb1tvVDfqDitFIIL?= =?utf-8?q?EmAhzbbWDXzzmemE6fTXkxhviEatXsHTxV8LBnsNMnDbP1UCjSjAapXvdkhliK0X7?= =?utf-8?q?18cbGYJ1TDTQgqI6vTp/+FP+Xx09OmowsA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fvyN6LUdBxXlYtE90AVrPpHNo9d6?= =?utf-8?q?oqGuQELDXPRRhhvXllPDWXf9gXQ96bSuS12FI29kK+mwjQSBKS6ifS0/JnZ3T1eQa?= =?utf-8?q?PsklfcjnLLcr19wIHS6qHwvkHswqDB8NDHzCg8YNd7qoBsHrDkoyLKFLWwa4/9gly?= =?utf-8?q?G+4IhVNgVR9hZekZDvjKf1392ei9/yUZiDYYLbUHhQKzD9Ecc39v3xXcqSw9IHfkE?= =?utf-8?q?Jb5eTNtOhyvB1eQTVOLc1oV2sBi5WYDpaa6IhpdlXQtUSKSB9NvITPPc2ylvvhKpC?= =?utf-8?q?StKqy0q2CFqqqcdvMk4rv8zkzDa4xN1PKcE1Kr771eOCTWHduoXKhpHCGOTtISi6i?= =?utf-8?q?qpBD0X4QAPzP+0hnUwErU4u9MKxVah08TkTTI63cQO1XLvXfGhaINY2+WzLZ7eR+I?= =?utf-8?q?lUKDMRqtlvEQCc2CpoMOcbo16c4AN95lN4iUbFlU+u7AHBW1QA5xl/Tl0Rn/hMLmU?= =?utf-8?q?cK3plvc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DggvUIzEhevyEZG7htR6KLprQixuJdsDpAnixofUqtOVC6cfAXjpWWq?= =?utf-8?q?2woAYTFy8GOlktlVd/+XCc6tOsYqkxO6mxijhCjstYz9qfppTfOZ2CtLfhpxILiUW?= =?utf-8?q?OE7pUQ36on71KKpOyzSsKwWJ2CaJLkSFKncQHcGv3NzOs1JtZU4nmQUb238S1Flki?= =?utf-8?q?gf7sWJpYNb/M?= X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: e92d8f99-3cad-4829-e5f2-08dcd145c48b X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2024 03:07:56.0951 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1Eh9uX3d6xoYIe5tzBw0yHdA0ux4jdKy4BUl6sKTZ0qTkFZThrqLl/OmfOZm8u65KYQkDAW+PiC3E/ttBCZapg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR03MB6783 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_200811_247363_5C0155B0 X-CRM114-Status: GOOD ( 14.78 ) 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 Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module. The pcie@0 node can be used as Bridge1, so the wifi@0 node is used as a device under the Bridge1. Co-developed-by: Muhammed Efe Cetin Signed-off-by: Muhammed Efe Cetin Reviewed-by: Arend van Spriel Signed-off-by: Jacobe Zang --- Add basic Wi-Fi support on Khadas Edge2. --- Changes in v14: - Removed fallback compatible - Link to bindings: https://lore.kernel.org/r/20240910-wireless-mainline-v14-0-9d80fea5326d@wesion.com - Link to v13: https://lore.kernel.org/r/20240828-dts-v13-0-6bff9896d649@wesion.com Changes in v13: - Change patch 2/2 argument from driver to bindings. - Link to v12: https://lore.kernel.org/all/20240828033953.967649-1-jacobe.zang@wesion.com/ Changes in v12: - Add fallback compatible for Apple's devices - Link to v11: https://lore.kernel.org/all/20240816015214.1271162-1-jacobe.zang@wesion.com/ Changes in v11: - Split DTS and submit separately - Link to v10: https://lore.kernel.org/all/20240813082007.2625841-1-jacobe.zang@wesion.com/ Changes in v10: - Use ret instead unused probe_attach_result in sdio.c - Link to v9: https://lore.kernel.org/all/20240810035141.439024-1-jacobe.zang@wesion.com/ Changes in v9: - Add return -ENODEV error pointer from brcmf_sdio_probe as the default for the fail path - Add if statement for brcmf_of_probe in common.c - Retain modifications to of.c other than the return values - Link to v8: https://lore.kernel.org/all/20240805073425.3492078-1-jacobe.zang@wesion.com/ Changes in v8: - Add appropriate errno's for return values that will be send to bus when error occurred. - Link to v7: https://lore.kernel.org/all/20240802025715.2360456-1-jacobe.zang@wesion.com/ Changes in v7: - Change brcmf_of_probe prototypes from void to int, add appropriate errno's for return value, move clock check to the end of brcmf_of_probe - Add "brcm,bcm4329-fmac" compatible for wifi node - Link to v6: https://lore.kernel.org/all/20240731061132.703368-1-jacobe.zang@wesion.com/ Changes in v6: - Move "brcm,bcm4329-fmac" check to the top of brcmf_of_probe in of.c - Add return if clk didn't set in DTS -Link to v5: https://lore.kernel.org/all/20240730033053.4092132-1-jacobe.zang@wesion.com/ Changes in v5: - Add more commit message to the clock in bindings - Use IS_ERR_OR_NULL as a judgment condition of clk - Link to v4: https://lore.kernel.org/all/20240729070102.3770318-1-jacobe.zang@wesion.com/ Changes in v4: - Change clock description in dt-bindings - Move enable clk from pcie.c to of.c - Add compatible for wifi node in DTS - Add random seed flag for firmware download - Link to v3: https://lore.kernel.org/all/20240630073605.2164346-1-jacobe.zang@wesion.com/ Changes in v3: - Dropped redundant parts in dt-bindings. - Change driver patch title prefix as 'wifi: brcmfmac:'. - Change DTS Wi-Fi node clock-name as 'lpo'. - Link to v2: https://lore.kernel.org/all/20240624081906.1399447-1-jacobe.zang@wesion.com/ Changes in v2: - Add SoB tags for original developer. - Add dt-bindings for pci14e4,449d and clocks. - Replace dev_info to brcmf_dbg in pcie.c - Link to v1: https://lore.kernel.org/all/20240620020015.4021696-1-jacobe.zang@wesion.com/ --- arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) --- base-commit: fe57beb026ef5f9614adfa23ee6f3c21faede2cf change-id: 20240828-dts-1b163375c49c Best regards, diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts index dbddfc3bb4641..b80a552dad883 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts @@ -283,6 +283,22 @@ &pcie2x1l2 { reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_pcie_wl>; status = "okay"; + + pcie@0,0 { + reg = <0x400000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + device_type = "pci"; + bus-range = <0x40 0x4f>; + + wifi: wifi@0,0 { + compatible = "pci14e4,449d"; + reg = <0x410000 0 0 0 0>; + clocks = <&hym8563>; + clock-names = "lpo"; + }; + }; }; &pwm11 {