From patchwork Mon Aug 5 07:34:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13753187 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2122.outbound.protection.outlook.com [40.107.215.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 8ADFF149C77; Mon, 5 Aug 2024 07:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.122 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843287; cv=fail; b=cfI5gcpGEGUkvFlrt+IoEjXjO4jH7vd0WkyjyDpeJ6g3bKmu6BbCfYSO+7dgmP1WV9x8vCInFW0b2KiRtK8IiZfRtf295Ss2eeKM6HfkcLMj0jWDmqpf5Net+kqELE8jmBk3Pm0tLQXK7QkRVLEAcJoy6iIeGlIs2WgkBrxVnk0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843287; c=relaxed/simple; bh=2VnM3Xke/V+FBPoCBZ6dXFpkeLfGCL5kEesF20cliAc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=UcVkogYO4r13BRXhFndFMjV1Ob8LKzxTZXC8Z+xjBknIZESnsm9PPC0ntzrK/MU5/8t8+VrdDhJlq5aTGaO3bySSabYLqVpltxkrD2StK5wuvP+Aniqf2B9qu0FHfX5lmLuR9ZINh+qSVgKWkDgB2EfwuwCSv6Afp2J2XjVLn/w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.215.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cN3ZFHzdsgx9HFW3bGBecRW+0866MfYfhcPLSV//96lArVxCJnHm2+HyVk8gu8byQUyIXy3v4rgPXPa/jt6dBFxnTGyvLU8B2yTiMg7L7fMNmadnA/QQ3P3cBmROb7UJ70uVm1B9JJAy0mK+mc8VcR+rS9c2lg14icA3AETycl8iF7jQZJ46UzRricV2z4gZkr9EY7MSrNT0U8CXwPMKeH4krGEh0ZOLvT7OeWABV3aSfiSF0Ef16UFfDAoJ+ka1NxrHkRGZF2m6OavE/wVdWFyRjxSuxPJCY+AkJxz9jf97KQMrYtFPEFxhu4nao8B5A4q0qqnQ1xwhM6mSiA2IIA== 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=n3ZCKui3FOaZbR8MmUilWzOmfwqy4Ji7tdvVIJh0aaI=; b=okC1YdrKWHLwxl/sPQjCrGjFqYrAccZvBaLWWB0ZISaRnK2hUq/h+Ei5obOPaXG9ANqmcMa8y0DWxGzYRyhse4VTMHWFfu1d8ROk5Jt2hTwWvw8eEMnR0dXzPJFjkyCCpTCwumNB2pkeo5a3BYA9/PDNnHyXZFJvl6lmdLIh77bz8mhKwb7RAWZmTbEvgaCVFOFvlHiOMpfbz6O57ovf1JfVCgeUcelrgiQua0Q2u7AXtHobVVEXBojwrgcK8SJ/LJNA1zgRDQVdEfeBgjWh9A8H3hQ0c/M3DCUtgn8Aw2qmXrTBoDsdZtDJJJbo3csrcD+T5k5uAmLlkzKluvGpww== 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 JH0PR03MB8052.apcprd03.prod.outlook.com (2603:1096:990:37::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 07:34:42 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7828.024; Mon, 5 Aug 2024 07:34:42 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, arend.vanspriel@broadcom.com Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Krzysztof Kozlowski Subject: [PATCH v8 1/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d Date: Mon, 5 Aug 2024 15:34:21 +0800 Message-Id: <20240805073425.3492078-2-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240805073425.3492078-1-jacobe.zang@wesion.com> References: <20240805073425.3492078-1-jacobe.zang@wesion.com> X-ClientProxiedBy: SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|JH0PR03MB8052:EE_ X-MS-Office365-Filtering-Correlation-Id: f8935d96-f9ce-4187-9e2b-08dcb5211205 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: 5N2S968RvyMnOH4+9cubPipH9jis1X6pCrb7wT0ZTUVYKner/DzQ4pZv/Jig5sMhwERbQzZFrIRWAsk5LheiSg9ny3Dpz5/Qj6nUjPz2hy+34OStYGRVEurvjlWAk9COsQAKd6sQhbyHjLXSDTMwO2IE//yIzNrPgMSbXT0yL07VV5aYk1aVaTMdcFnio0GSxDrout3k6NJ8ZelecF/f9lK3J+JMC2sul/9+98UuCtgbfFlXhIhc/hQCkIMZQ5XXpKIRsGv5NMM+LY4APvVNV3BxudteTFEaHpByekSgKTbZB8WVTZmLuRvmaWToLTXymOnz/5K6/yOa/L4JaUOR6AgNnW2JFjtaj1Xt3SoSxM9sC0/UQ+g5p78jLi3zfjQfhJiHE/wpbzZ+WJJ6hfaVjPTpmeetICOuukF0fL++NVjsIM3c40FHRL5njZOXLNt6wUZ/BPiN17arZxFw6ObNJxAT2EorSq84PrPc2D7xu7a1F2W67Sr53i/rPHti98i6ozvKNMCasfP8zZ/y5BVbz8o75Za+ZVbYdAxwzr6PIxyLVEi46aF+SQMdYfIzCkIGxkrXBiaL2gi6GVkA/G0lhPEpog4a6SCpmJ73eAtVo863eNQjZy0xCglLerApTq5WQmVEaaxJE1AMIZyXeIbu6YHq58VYp1Lip0Q6d+99O6Ryeo1YfyNnJog82HheCT/UQ9a0BZPe5ZHJMOR0Dbb2AIDHMXrqUWPeAWGu5EEbDYkLMvmHm+ZfyqM2u76UY9v1rYWl75FBPLC9LmwmFmc2o24KWBaI8nLxWeyz9AJc6+ALBKzEROke2DySPsrQzH8nCOK0Ve7kpdWiwHeYWV+0uvoSgv6LQ6RWb5ci5cSM/2RV1tqMercZWx9tIhnu49Bxb0ymvu0NtoJaDUTxNU+hoI31J4cNoPsXLrQmcpPWgYSJTbxImVxBcXtrnQPuWHGfPq20+yZh0doajM72XMq7gTkniJ7BXvBKep96tdVdOfvCSUD54hVSglPZjzGZY5OmfNjSsSQwGiVJUc1ZHL609rJ6hJ2vFBHj6SgnKDh38yOX1xacaq5nMFAuIcZZ1G0C6kn7ZAXtoROACJzMnTHp7UH2YERH6ogUIZN2/3HDU/v8PkOa6l5gRQdUkZee3IB1jQC2yJ7Co8z/ZftXD4NEC+kbOQAico2+dhuV5dCdp0WUcit4MugPwhgKUQWY/PZJAbq0B1Vc2+mv70bIqehcPcZzaPunHdzxrzD8DneOTsKzc8WkO3NizGimj6XKbqCfi7OE+vmV5CHNrLaEEJySl0lnCDGYrhqCSXxTDdlCNzyQA7c9OQpNA7iDXQmmxXHrZ2CqLYRPm16PGj+Em2kfEzvWFUrFJ12mVtySV1U8+5ccNWagiIrdqqYetrJWl+NW6WssxLyezZfucC/dIxVnQqTHhfWgz3co2wltiAku1a4= 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)(52116014)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oh80dL0QzFEX089mx0/znWXGXPdIyCkTXxhy4/vT64x2pzGcnM4+He5Rxzy+mcU4K9dcO0CJQ2KVMBXAw1FZKVfL+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1nLjiL3es1gSDgw/q/xGEnA2hLlbV6If1Qhkf/z/xEj8Ya8Z7BV8UA/EjDLG7/Ili96RUfedf9mS2csXVKZ8jEtrXoPHghde/pOZLXejqS8yBCgMWxPO66UsS7CJjLMYunYETiro4o8pOCH9saguamB6umZRogH2W3IxkrYj8Jbu4JYP51Y54kf2G0uEKXjTE+A8TMZvECMpZolahnvak1rUAzNdiNR70SArwcR8AOYvdm5P95lztjtGBhFFKjWRZl1tNHFOD63Op756ErH/+pXHkGCSxjtZ2YI2mXG8vexoxdyy51fCFzReQ6g2K/S+0WhSXd3Gx4gw95OJaNDWfCpdcrc4doUPOWGu2PTtfKG6DpTms0U26xGRRSlZtdnUATwprpk7bVAnBj9rmcO5EBqVQSkQUp5cR2gJjv X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8935d96-f9ce-4187-9e2b-08dcb5211205 X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 07:34:42.2819 (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: rm60PySdrLAXG+eNHsyzEtL2Txk/bI2vKRszfK9fmcjtofDhext7P/FYpcCfOnI2yH+U61IGtFaq/IPzLy8Wpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB8052 It's the device id used by AP6275P which is the Wi-Fi module used by Rockchip's RK3588 evaluation board and also used in some other RK3588 boards. Acked-by: Arend van Spriel Acked-by: Krzysztof Kozlowski Signed-off-by: Jacobe Zang --- .../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml index e564f20d8f415..2c2093c77ec9a 100644 --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml @@ -53,6 +53,7 @@ properties: - pci14e4,4488 # BCM4377 - pci14e4,4425 # BCM4378 - pci14e4,4433 # BCM4387 + - pci14e4,449d # BCM43752 reg: description: SDIO function number for the device (for most cases From patchwork Mon Aug 5 07:34:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13753188 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2105.outbound.protection.outlook.com [40.107.215.105]) (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 C59AD14B947; Mon, 5 Aug 2024 07:34:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.105 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843291; cv=fail; b=HlUJbYzGF5NRdTch+jdSvbAeefbMVfY3Z5SYkA0mKQ04wZMjzcI5ETPHWyOxvxjn5gITnmQliHFxxL+woDCeXTnXuMpDZipZyw9+HRQu3oRSuhX+OkKcE5/Jma4nY7AGjyh/J72jaoTk0frNCxNndZlkSQikb4wu/0kBCLOR6AY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843291; c=relaxed/simple; bh=uyVPq0vuS+FMU0odfnlfw0F2eZnLPgwjnpAdPSqAp68=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=og+Eajl9HZd4DkurUtwHcE1W84YjHOE6y/vnV6Unz5SYEeMDXHS0e4kKT9Mbr1hiReKlvJOgJGk3MlsWgTpbfycXbbwcfwvLwDazWDUDHzNgL1VeU5hLCiJ77fN2lkDXPdj/ALMy1RhsSBHsQ5PTSANbADqyfmYBPdddHpIjk7s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.215.105 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=we+/E4/xyM1cI9EFHrEAuoxhfyaHsAruLlPwPHzF3IDAklvHQ7B1RYISYKQhNP1c5iy/o4xHBELeWUocIzXofkxplbEkjdbTIKjDlmFxCPYHQhoa/sp5AIYDZMzHSySlGk033M0vhPr3QgPzHRiwQ4RwzX/PpsTWacllBbokYMJbqnBpVOJXea5YzQ8OrEvfp4z3DXZHrcE/ZEorHarCyXr4SAp/6lSa2YzX471uFJhprhMQfunMYg6a5OjDc/kRrmYItS0SQKtrz42sG1PekMS9afZ1J7qUoGyFWaCC94pq3WXHewgYin57OdCh3UTk90ltLTyDly955SaKwzyaOw== 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=1iPX8WFIoQ4QXgUD/qR3fD/Finzms7t/FKq4XAi292c=; b=tSJeB23WSOZIA3+wxoXQdSg9HM668gBZohqNMkKxKUXsOVAJABob/bCCEz3jXIa0tccP+35oDy3QidBePkLwypfcw4Vwsi3uSE0H3WSCaFLibg2FSTJ7ESnphbv/JqEFOmLp/7oWOaWn1Q3LXL2DpxZcWf9ApYIJssHkFhnxuLWGlkgyxoN6WXwU6aSeLDYkdunLUzjTfWyJ3mtvl1IkKwljvqPhGtuQt9OmEni4qvo6WBA4lEUw3n81DqQw3XZh+9cfaSVtDentV+Ua0qRh1KEDtMwZ3Th4Kbl2reUdVJ9ryxRbCNIPnd+V5v4bWh3WgxwMiu+21vL2MywGA2Jchw== 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 JH0PR03MB8052.apcprd03.prod.outlook.com (2603:1096:990:37::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 07:34:46 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7828.024; Mon, 5 Aug 2024 07:34:46 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, arend.vanspriel@broadcom.com Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Krzysztof Kozlowski Subject: [PATCH v8 2/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description for AP6275P Date: Mon, 5 Aug 2024 15:34:22 +0800 Message-Id: <20240805073425.3492078-3-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240805073425.3492078-1-jacobe.zang@wesion.com> References: <20240805073425.3492078-1-jacobe.zang@wesion.com> X-ClientProxiedBy: SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|JH0PR03MB8052:EE_ X-MS-Office365-Filtering-Correlation-Id: d9ab381a-b1fb-4c52-7aec-08dcb52114bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: nk3Ycj3HZF+DV7q4iasYLVF8fbCn3UijapLLOAz4W+hPdlyvHh42O47hiWrTwWE/ISo3RqXQk3RNgRfdsoWSpEH6Ond4UYfpy9p71GXBblwdO02jvxMvkq4/rIYC6hqqjJDklkyPKGZ2mhr41+Ezyo6Ga09TLwh9r04QJqWNrXixg15IeI+cf6YVyA0XOCKLI7MkhP1KPf7vx6L4Yj57yYtu7k8nPs0l2KKbK4TTtw+rbbzT72Za9Fzh8kiSxpgIcq0n3VtX6ieaB7Je4kmLiv+aofaeqfq7CVlOHo9iWeMcp7y/BnBoXyDUHJ7WEge87utkLq1d0gGZa8eqd5kt6l/Df3jqIP2+RvT0xKGAotXqcKy2xMVUNfm54jw8Upxze/Rr6iCAVMLhvwKjQlPKChwdCZbpTeun0dp7nY8vol4TGim4sg0/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PM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +iI7VxpbrM7UcPp2in4uew5NS2r2Ez36zpPZZNuSMWyY4wcRNSZ7pYuUjG28/Gniv5IiZUSjVf8ZPki/7dtY794Tl6WGym+yE178dg5sIcDumxTtZSXM8oL2gNX2NrRQlPcmFPYK1mrO4NFLqKGb5eaU9+BFnZW49K9mAJoIkvRC18aKyADwpif+H4wI5bixOG8wXm+u9RlPi2VnjzWi+Rvide7LecMtjZKeuyp9vsr1ODirLFPriR2AfPWgoMRDoO6U5jfx4xGCngqcBwdbHbnxJdgG460Fy8e4idpSCoAADB1Q2+BtkxYAftHMwAV3U0ks/m08Pnj+7qRo0CV3a801mXoX6xH49/pWkk+frQjj4ROeuF0rduWB0KtGejUf2LIV1tvt2M/1yIbJS1Prpp/Eh4iE6Wt7mND94zdyJ9W2DydTNSbTx5/bqZi4BhWLHWLDovjt+SsZKULtxnGe8dqLzb+FEdtPR3NhUPEE8roDX0C3KrNbE7l8TTX34bxZNQmZhiqiPaSq/DwApqV4qdLlL1TdtgqK8W5zNqgKsvwFD0+ouDbViH/6RJtHCsSfNvezl4Kxfm9wGkVvIgzE8UDouLjs6jzEgOtbK4oI8Lxair76x9Os3SphuOvvVncP+tQC8SI+WFXDBqWzuNBKMH5DpyliwvtENHk2HHMtZ64utk+ZPkI0Z0CvZsWGyvEt/EQZP/3mZM4UR80eCj8uSC3YehALIFsL2JJX10UMksG/Gl2GagHR7GaugEWfEtxHekYDY/AO5FaXK9CUARddCOo7sb0TBa6xxDgcP7Me5UIE2JePc45bRbM6C4HpHdpHSVsYyNHCLJFEsowZ3/T05A6IgT5diyULuV3yRjTbBc/QWxOVbXiC8XR/NM5z/gZgwy2E7r4R7nuG7gaa8RQPJbXKhd4dBmcWmcEJA+Kc74hlRAPhhK4x1hye37iZ/n/K4eFFl+0sGbGZeHgevXsIxQ3BkFUjceCnG33DL1l3eBa54Wq8XRYVK3ontSePIbJXdOjRdUpReVGwtIf0ch1RPnLCZfhV6m3uGAaj2OFauPCoTgvBKE45sgTLFlAsgCS+QOb7dgn7ARuwHEcqvZ8oM9LRI5V7VKU6cO0zPakgx34pz7uoTL7W5hrGF8K7V41sPJPr6tdHXVFFK7g22ANgHdPk2FS0eNe0GxfRNjlTJkxdmr2XTrvOXA/kMKXX75iePJIkpBA0T/f8pdUVnatXRVzaB8iZzC5Ijz+Ag7CsqRQ2QgtZuQ679yvCf+ELnIWE4NcdjOj64R+kMPTGJjbmEkApfTGC1fFH9byvpo/wh9/in8RxFqJYboqgPcTicKivmhjzSdz64mt4KfXUbHFaCxR72tHSN90QneaLBc+rVfZbhqsLsYvPVV1BPGbFNTMJE02dvNcTmA+VKJMzOQkz6Nnjf3mTqiGkMCDEfYRR6Nv7rREE9HA4RJC9iD/uI5BHECUYg/kaduUtfP3J81C0esU7KnVTFz66I7xGVy34aFQv0ZvXKc+jTSo+nW/INpESqOVhwGn9uhPJc7z+WNmj2JFckRfLF+G3ZMs9+DsfTqo2uIqkMe8VWm3dZ6eRNK3z X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9ab381a-b1fb-4c52-7aec-08dcb52114bc X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 07:34:46.8480 (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: lNeuXvtPGjjOA/hUdV9xez7Oid8GSPuO66NYLc47qb/GXb/Fko3W9r7DHxc0d6/9XMtmBHDOLmtQmREfht8lIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB8052 Not only AP6275P Wi-Fi device but also all Broadcom wireless devices allow external low power clock input. In DTS the clock as an optional choice in the absence of an internal clock. Reviewed-by: Arend van Spriel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jacobe Zang --- .../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml index 2c2093c77ec9a..a3607d55ef367 100644 --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml @@ -122,6 +122,14 @@ properties: NVRAM. This would normally be filled in by the bootloader from platform configuration data. + clocks: + items: + - description: External Low Power Clock input (32.768KHz) + + clock-names: + items: + - const: lpo + required: - compatible - reg From patchwork Mon Aug 5 07:34:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13753189 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2121.outbound.protection.outlook.com [40.107.215.121]) (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 0006D14D702; Mon, 5 Aug 2024 07:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.121 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843295; cv=fail; b=tUtO6z8Uj1MAzGLKnQkpwMOEfFOK7eERPo4y7xg+LpcusoGLTA+yVfvnkiYeqZFvksBpSogWNfsu3raA0+NKJHRDXSDqjEB5hA92liN4DZHYlla1ui0Hf0LScEJ/sL8D/GSlwhVVc2pVtgNYn6ZFdyinGA1HnrXHInFvAUU5kuw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843295; c=relaxed/simple; bh=VtUjgXgzjbwrBGBYr3U8w53x1JyNHtGQ/ZayBQWhyCw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=sMif/KJ8DbtKp1rrSmuKEFK4QeOGp76977qeMp7CUGM9iR2BL/icCFbDc4UQ57FbQ40v1BjRaExKe1F3brpr1NhXLOVbmmRGvS6rV2GmME/WzEysYSZ2p/qmAqT1BgAD/jIAZfUjK8U8AEgtnto9G/y+EwwqDLN+tvQY9MHisb4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.215.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Dj5m9WQNJh+oEi06ynnjppnfzSwRtvO6EJVjheyrvoVPYyclDCR/qWgdx79562Q5w3RaV/pkvOce0sWvGMRC112dvNW2GSKUMCdeTlCalXHUcJrpGxhKsB+X1BtiPmUIC6soho0k7L4I3NgetHNouIT6fmz1GS8uWwc9hScG0bapEKt8cYtE+aC23QHp00Wb/p42EpVcdUOOEOpQsqQcjYebN1O82iScXL+2LJfErw19x2zLctwdqlnsRfwm6JYXNoG6Qk3Ny6vX2TXCYGVZD7jMWd+HxP1QbuM91tykKywDAAbtkxlLm7zqncvryFR8u3PWVk5V9lbtCU+yMtl+TA== 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=l+rKongEnwgLB9KlWQH3kBPLRrRypq3E65So/m6Tpoo=; b=ed51JNJLDINCWRmeQNONoY/q5Ju0zWXNkACc6/+WwN/cRus27Cbe7B/RpnpujRBJNXR2j25x9nMfVly0AKbQttLafwn9pRqM86TosQNFS89YGCbiGDz/DbfCN4b/jvcI+5eSYX4oTRsP4gTgLHw0bwsCnyFOyxmVpY8yrd+fVWW3x+qM//BJlHXJNppMWEYYL7uhsX6QfXndAO7S3NEFK4pxMhUftCo77+cWK5VRITDoOG/+AwfBhHXnep8wSUDSMVd0lUq5AQPAHOopCsEBEKazgaJ5XgPwXBg4SHvFPiKXbfluo1lPIpMDXgbClsrFFadRDJ9zBuJ0gvucFhvamw== 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 JH0PR03MB8052.apcprd03.prod.outlook.com (2603:1096:990:37::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 07:34:51 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7828.024; Mon, 5 Aug 2024 07:34:51 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, arend.vanspriel@broadcom.com Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang Subject: [PATCH v8 3/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Date: Mon, 5 Aug 2024 15:34:23 +0800 Message-Id: <20240805073425.3492078-4-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240805073425.3492078-1-jacobe.zang@wesion.com> References: <20240805073425.3492078-1-jacobe.zang@wesion.com> X-ClientProxiedBy: SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|JH0PR03MB8052:EE_ X-MS-Office365-Filtering-Correlation-Id: 8196263a-e8c6-4ccd-d143-08dcb5211739 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: Y7RaXSoWhHTxqUpP1jBcrNIpsAUxlyerBMgG1nZ+RVfzNxB6fboRK5oI2Zlc3U6qwB+gD1dqj4a2OumNgd1cFQ4+/CZ8Oc+INMuyrtYtErLTMYwQaS/ReRPU4fM/iilI2N1n0++aJseg272YwhUWrXEJGko8fFfmQDXeGVMG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V5ehbH0x6AhSrecFnhMisrWUCMrDhNDR3avTb/keupEJYn9Xlc597bAl0KkbJLm1fmMaLjsEfPLeQFfxnXJaDxXT5DOb6fOHWD/WwVqKwDKmy7bIj6w/Ji8+/E1Kk5Ar5EmXIqyZd8aTCKFL0vvlhoIzPsBTdlGXJ27jypgS5fPX23k7Xf4rUuhFuxBR2alvbdiRN/DRme0TDxi/kPPzQbY= 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)(52116014)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1wjF5keYCrixnTih2cIQ+bAsv1MyiN8OdSbmB3qtUJqWTJXTUvupQYWeVBnzNxB4sQ3++Q1LItM7arRR8OspSC5aRAZ4FBcugl1M/cEmPWXt4gQHFdxRcAAwReZUyOoNFO/mzQ17bu0ZBWZ9SpAqkoi/7hSwQPDGSh//Tnxm1ayrGqRpEgjDRjhysS7z3/jOI6n6W2i1Ynf969v4DOeevgdj16ezDjnazSxKfhtxwCE+FjXQLqL6o37TCAwL5QNuJpU+sB120GEcc8T7CA79aaGRteWd7Tf7bBA9L94IidkP5akj+mlCQxuGRc4f32cIrn5CuetJb3GRrDcxnfKZE/fGFk0680nDPJ3sLusyUatdt6YwC8r5/4HBc17nPfd9yJIUNCe82Y2DmHlDjNmjh0MQ9g6gXtgoSKDMqHyvBDAeiGCA98E1Gksng+dsiXs3e3xrigPhoiqZWJnTedN45G8jaRChmuNZ3nRGpK7AqSpA4RjhcpM1ZFHHsaY817mnBE1BDkfYrmNiQF0scjzLpPMlkijXlt1nSA2s3N08tPUrSI5gnH5zPiGJj3EZBKSMLHL5796E8SZ6Ap87Dgz41J3QUF4IXBORxafSOynh59FFZD67pvM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Source: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 07:34:50.9911 (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: BfxlGwoNGyjRmzWkmJEr+tI1F+mgE+t5HFYniGl06qgfDflg/pPYVqbrtF4FEAlFqylgpRAZXs9xSIb2VJCCXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB8052 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 Signed-off-by: Jacobe Zang Reviewed-by: Arend van Spriel --- .../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts index dbddfc3bb4641..a3361ca25867d 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 = "brcm,bcm4329-fmac", "pci14e4,449d"; + reg = <0x410000 0 0 0 0>; + clocks = <&hym8563>; + clock-names = "lpo"; + }; + }; }; &pwm11 { From patchwork Mon Aug 5 07:34:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13753190 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2103.outbound.protection.outlook.com [40.107.215.103]) (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 1D53814F9E6; Mon, 5 Aug 2024 07:34:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.103 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843300; cv=fail; b=eSPjTkArRQSNkGW2RJPy1bGuTLKqneY/pXxocvSOGUpA5NJsM4aQ8GAjKjj+twCaBKqy4r4HVSurQ9olzTIlQ7djVldrt+gGs+uqNTOENMTe4bqUyUNpWmQBJWfqy6artby9YWoJPhl1vjCod6DSl27QWKF6PXYUhYlsZ68ZEXw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843300; c=relaxed/simple; bh=mR5ASTteSedxZYVvoFpPHRrXeiLivjQPNPfhqqaTliU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ifU1QEbLXfLScqEKqNDBkMStPzUQQY8GPjgFicL+iDLhQ69PTzEK22KUSsv0rsT1uvozQpKJKNTF2Qx6/Cd5fvv7HyXCtLYzUUR9nWpcnLC4AdwnXZnKHDiri7M7j7+wNneWLR4ms/PeA+ZWXjxarYeQrYOGlH62H1fuDXOKkM0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.215.103 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cSlPd/BwpkOvHpAM0kLbAAhOTlmF8kGrSFW3+44RyXosLksazJ0sS9ILbISfVTRluCqiD3ENZir4Ho9mOyyC8Xj2DVbXIsUaWJ2+Czni3ku5dtVn/kc0BKcJneoogGKnEU+kEFla6oUUFIlqQ3+BUwF8mScrPYduP28iTfpPvdB/L27cgGfnAki9jYw4rVKq08BHZ/j5UKrsXKX9Z3GykQbrAUXCQMH/e0lQ+Wa7YY3WG4Tlh4oNX87YEFI2F1Jex27wZ0IIMJfmgCy7CPEd8TIt/353CkqTjAHXEh+fXGCJIbSB6KN5LsHlONPyhQNxl+tgbaHIlGilLcupXaFiww== 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=NtKNOAdCR0o6r0PtMudKDdC8rQXrTjHn5IR45Tic5BE=; b=cO6PCC3uMyd6jZ2JAmxN8sz3V55VCP9xv5A7YxHuZF6v2Minj/l45sHuFdlZQaCvEmkEcwiGf95QFM4Q5RcMWz+8Gwv0bk6fWUcwSdqqToZZ7ReR7c9GBamxUGom3IK2XQ8+Ovtuc2LWCI79vf2QdpZ9UCmP3sCqGeiCljxnRMYi8zN79C01nOiM70A3RaQwgReY1bu5k/DBGCGTVRPuYsTOiXJNQ83Av+3ewWCD+oRETqjD1tc2aoWjPjTa2OUXgdbMl2VZOXFt0oBOw+q0WIl2IvaJUdVveQ1aFijc3/A+98x+ekia04i4QGmCo9vIU5laCMZ9edrDSorKjpMFfQ== 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 JH0PR03MB8052.apcprd03.prod.outlook.com (2603:1096:990:37::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 07:34:55 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7828.024; Mon, 5 Aug 2024 07:34:55 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, arend.vanspriel@broadcom.com Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang Subject: [PATCH v8 4/5] wifi: brcmfmac: Add optional lpo clock enable support Date: Mon, 5 Aug 2024 15:34:24 +0800 Message-Id: <20240805073425.3492078-5-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240805073425.3492078-1-jacobe.zang@wesion.com> References: <20240805073425.3492078-1-jacobe.zang@wesion.com> X-ClientProxiedBy: SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|JH0PR03MB8052:EE_ X-MS-Office365-Filtering-Correlation-Id: 55bd7744-8b7c-4290-d2f3-08dcb52119ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: qWTY8P+ttPHeEnTsUhC/kQGdTpuT6U98oa8yOZ0na2dt9opM9kLbJ62HOQrROG5a5qLaVsTLoPehIpFIuyxWo/00Ek+yFB9xyegPXSiEH9Jns4BtzwH3dsaHwpPu1iIEEhXD5Vsr1PfHD8NbrBpG5Zm4W3uIqfU8nADh8+LtetKu+BYz3tSa1nbGrA3ZG9FZoY4TR6wZxAQicEfqvZtLM6Qxion9ZhfDX5nAdijTg1XYdo36H7nKGQ3koV/PK54TfTNS9gbUG2h9d6nCZqwYjmKxA7wC/vNEGLhJZM/UxQxtVDaqV1IA3alxL6QJe7pMUxDhT8fIRy5ioLf5vfJR+E2LbfNpmkS9UFS9JYfvS+RwURE/I5nXIqiIn6oGswIRUZaEHTg3O5u8mfEPC2bPS1tkJqR5i3XGJu2hC+dE++itf/79ohheSPKoLc26GKz6lUt27uvX9sXP36RDAD1iOvwqxNs3rTsdkI4PZJ3vdp+ycYbKPPDsW+OVm2ZDGVoWYpbi71vbbAZvk4mM6O94pmVBUl2cBrWYovXDHNkagkjvSTDgrmCH8+eEmgbGGgG1wielfLCoCD+WlrlSUTlu2eqlzKWjDLRADKv+wMuoHExanuC3AiYCTIgLScCphILhN4x2ntBTHnBYFw0gb/vbb2Ln9XZ18EIGK5ShHaqgpCirsMy6sh8jsAKESV2gE/z7YXd9f2XSy5HHpk3IZ4v9lw6u6lF6srZG4jMJxi8sUpAPphwddgi5iM+VRluev/jY0hI/53fKdzM0yydgeN7B1c6E/VuwdeEoOqeQCo1Nx3+czrpAXs/z5sk+KRwQIvfRAi4lutUFEIXo6aX/FxpJzOKr3MowmJ9BVyeo2jR0neKMcrjIW0JQLuA628GoXwR3Q5XVT2Y1HSKlgU4YTIsODqENz69SEWF3fPXETRfkSRws/BICb8MIENxQdt1UeGoJ1CQko9voVVsWj9yFgTnDIIvI5Nv8mSzIxWCERuDOKRyrwEZOwosvUVVMtIsTKhsPO3XjHkN9LeUNc8nWtvN3tRt/yhSmRKazSkX6tjxpwIiVQ+qHzYSqCxP9t68T6eATNltsWdk3l0On4A1y9vplmlDiR66jflWWBTdYrVnJy7n4t5KWRmU0Wqb0O0WYltUL6gVHrGOH5mjkS3/poOATq2EzycFXq5AhaxeUzJe+ue29HsIiufLtw+H05rtYHTDjD4CSM6T6zYDpR4UxB5sLncs6o4ZaDWXDsSV3SUlep5PJu/yrJV/fEeU59FD1OPiZNECBhGBc93F0rHfVqZ3twEGvOoIK8kfZ8CBI2EsTGPNmPYolCwCdxCfnttvFdF1RqFB3DuUZFWE/QjuVrT+hCh7mZxqUqwkTnVlR/Ng6iFdgTH8kXsXhTX3ewaV/meNekMz3Sgxd2yJzY4ZR7KlAzve2AlangMIE8A0h9UBYyNE= 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)(52116014)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: v82F1kl0Vu52tLec+sk/ZankSfjCPrgnotSxRPzmgxJTs98lxOtP7SlePmyCWr+rJPj7Bfof/PUc7zbdzaLCH4c4LquxQ2CU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EIrxdzYiH/O4XrOT2GRFimEMAbaH9xAXyGTeMXIhjpGzE0kDApO842iG/SYwlxLypG7fhRfKynhGCr7wGP6YrkcO1OUA+moiUisX72AHgQFZtmWPFdG7/hBhAFkP3deUO5r6mF7ENVkrnKnWbRuGqvexbMrJfoq3WQA6HcUp/3BlNRW5Yz5YVRQVV/1YSDGHH0wi/2PJaHH8a8ApF5piv/Q47W3npD768vIu+IMAplxVXgjvtz6eX1r940yPHbz3L7nbV9fT/0CZ2EkhvcA1vbKwbQlRXnt2XSIwkAGnsx3QiA6JjnYZqgPHPxkR3cWRZxV3C3s/IMThy9TaDEG81OWvlY7SfwW+g8zSFmYTk3lCFBZXoOTlbaIrVYCaScLDXSCpmW1Kju2EcxWF8+L50jBS662VFuYWbw96Fz4B6Dv X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55bd7744-8b7c-4290-d2f3-08dcb52119ae X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 07:34:55.1137 (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: 9WMnInpc1akEKpQ/2VMO7QNG+vIMUK95niz4QmVglXLJ8zd10Ic5FzjbEgebvdKrT+65niVIx/nVKXBfMbkBiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB8052 WiFi modules often require 32kHz clock to function. Add support to enable the clock to PCIe driver and move "brcm,bcm4329-fmac" check to the top of brcmf_of_probe. Change function prototypes from void to int and add appropriate errno's for return values that will be send to bus when error occurred. Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Co-developed-by: Arend van Spriel Signed-off-by: Arend van Spriel Signed-off-by: Jacobe Zang --- .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +++ .../broadcom/brcm80211/brcmfmac/common.c | 6 +++- .../wireless/broadcom/brcm80211/brcmfmac/of.c | 28 +++++++++++++------ .../wireless/broadcom/brcm80211/brcmfmac/of.h | 9 +++--- .../broadcom/brcm80211/brcmfmac/pcie.c | 3 ++ .../broadcom/brcm80211/brcmfmac/sdio.c | 18 ++++++++---- .../broadcom/brcm80211/brcmfmac/usb.c | 3 ++ 7 files changed, 52 insertions(+), 19 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 13391c2d82aae..ee3ca85c4a47b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -951,6 +951,10 @@ int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) ret = -ENODEV; goto out; } + if (IS_ERR(sdiodev->bus)) { + ret = PTR_ERR(sdiodev->bus); + goto out; + } brcmf_sdiod_host_fixup(sdiodev->func2->card->host); out: if (ret) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index b24faae35873d..6c5d26f9b7661 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -561,8 +561,12 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, if (!found) { /* No platform data for this device, try OF and DMI data */ brcmf_dmi_probe(settings, chip, chiprev); - brcmf_of_probe(dev, bus_type, settings); brcmf_acpi_probe(dev, bus_type, settings); + i = brcmf_of_probe(dev, bus_type, settings); + if (i < 0) { + kfree(settings); + settings = ERR_PTR(i); + } } return settings; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c index e406e11481a62..5f61363fb5d0e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "debug.h" @@ -65,17 +66,21 @@ static int brcmf_of_get_country_codes(struct device *dev, return 0; } -void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings) +int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) { struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio; struct device_node *root, *np = dev->of_node; + struct clk *clk; const char *prop; int irq; int err; u32 irqf; u32 val; + if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac")) + return 0; + /* Apple ARM64 platforms have their own idea of board type, passed in * via the device tree. They also have an antenna SKU parameter */ @@ -105,7 +110,7 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, board_type = devm_kstrdup(dev, tmp, GFP_KERNEL); if (!board_type) { of_node_put(root); - return; + return 0; } strreplace(board_type, '/', '-'); settings->board_type = board_type; @@ -113,8 +118,13 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, of_node_put(root); } - if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac")) - return; + clk = devm_clk_get_optional_enabled(dev, "lpo"); + if (!IS_ERR_OR_NULL(clk)) { + brcmf_dbg(INFO, "enabling 32kHz clock\n"); + clk_set_rate(clk, 32768); + } else if (PTR_ERR_OR_ZERO(clk) == -EPROBE_DEFER) { + return -EPROBE_DEFER; + } err = brcmf_of_get_country_codes(dev, settings); if (err) @@ -123,23 +133,25 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, of_get_mac_address(np, settings->mac); if (bus_type != BRCMF_BUSTYPE_SDIO) - return; + return 0; if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) sdio->drive_strength = val; /* make sure there are interrupts defined in the node */ if (!of_property_present(np, "interrupts")) - return; + return 0; irq = irq_of_parse_and_map(np, 0); if (!irq) { brcmf_err("interrupt could not be mapped\n"); - return; + return 0; } irqf = irqd_get_trigger_type(irq_get_irq_data(irq)); sdio->oob_irq_supported = true; sdio->oob_irq_nr = irq; sdio->oob_irq_flags = irqf; + + return 0; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h index 10bf52253337e..ae124c73fc3b7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h @@ -3,11 +3,12 @@ * Copyright (c) 2014 Broadcom Corporation */ #ifdef CONFIG_OF -void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings); +int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings); #else -static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings) +static int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) { + return 0; } #endif /* CONFIG_OF */ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 06698a714b523..c34405a6d38b8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -2457,6 +2457,9 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) ret = -ENOMEM; goto fail; } + ret = PTR_ERR_OR_ZERO(devinfo->settings); + if (ret < 0) + goto fail; bus = kzalloc(sizeof(*bus), GFP_KERNEL); if (!bus) { diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 6b38d9de71af6..7d79e2db201b5 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3943,7 +3943,7 @@ static const struct brcmf_buscore_ops brcmf_sdio_buscore_ops = { .write32 = brcmf_sdio_buscore_write32, }; -static bool +static int brcmf_sdio_probe_attach(struct brcmf_sdio *bus) { struct brcmf_sdio_dev *sdiodev; @@ -3953,6 +3953,7 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) u32 reg_val; u32 drivestrength; u32 enum_base; + int ret = -EBADE; sdiodev = bus->sdiodev; sdio_claim_host(sdiodev->func1); @@ -4001,8 +4002,9 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) BRCMF_BUSTYPE_SDIO, bus->ci->chip, bus->ci->chiprev); - if (!sdiodev->settings) { + if (IS_ERR_OR_NULL(sdiodev->settings)) { brcmf_err("Failed to get device parameters\n"); + ret = PTR_ERR_OR_ZERO(sdiodev->settings); goto fail; } /* platform specific configuration: @@ -4071,7 +4073,7 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) /* allocate header buffer */ bus->hdrbuf = kzalloc(MAX_HDR_READ + bus->head_align, GFP_KERNEL); if (!bus->hdrbuf) - return false; + return -ENOMEM; /* Locate an appropriately-aligned portion of hdrbuf */ bus->rxhdr = (u8 *) roundup((unsigned long)&bus->hdrbuf[0], bus->head_align); @@ -4082,11 +4084,11 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) if (bus->poll) bus->pollrate = 1; - return true; + return 0; fail: sdio_release_host(sdiodev->func1); - return false; + return ret; } static int @@ -4446,6 +4448,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) struct brcmf_sdio *bus; struct workqueue_struct *wq; struct brcmf_fw_request *fwreq; + int probe_attach_result; brcmf_dbg(TRACE, "Enter\n"); @@ -4474,7 +4477,8 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) bus->brcmf_wq = wq; /* attempt to attach to the dongle */ - if (!(brcmf_sdio_probe_attach(bus))) { + probe_attach_result = brcmf_sdio_probe_attach(bus); + if (probe_attach_result < 0) { brcmf_err("brcmf_sdio_probe_attach failed\n"); goto fail; } @@ -4546,6 +4550,8 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) fail: brcmf_sdio_remove(bus); + if (probe_attach_result < 0) + return ERR_PTR(probe_attach_result); return NULL; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c index 9a105e6debe1f..f7db46ae44906 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c @@ -1272,6 +1272,9 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo, ret = -ENOMEM; goto fail; } + ret = PTR_ERR_OR_ZERO(devinfo->settings); + if (ret < 0) + goto fail; if (!brcmf_usb_dlneeded(devinfo)) { ret = brcmf_alloc(devinfo->dev, devinfo->settings); From patchwork Mon Aug 5 07:34:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13753191 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2105.outbound.protection.outlook.com [40.107.215.105]) (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 A715015383D; Mon, 5 Aug 2024 07:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.105 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843304; cv=fail; b=WYUSijFlvE2rDoyyM1PoOd02y/OEntdMMqbLOweu9C2pENTVWofKBfSP8efegjO5+QJcrydsbuB7FvgMUOftavHHW7mip4+wPryFp9GRYN1m1UX7hs9nr0SK2Q5TZloNF/8vyjJC1yUpYczSMPE6IAZPgiL+63SrFZFDVQpvk00= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722843304; c=relaxed/simple; bh=z/JMI1ioorJsC5rpgzgpHUYttwWsJh+gThzg/mM6S6Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=d7tj6cvwI2zkmLcGfYo3qmlZjpASELebJUe8BPWars6V4Xu0dje/y/tNK0yHOqp6aHpdwDAoRhL93A/o9jKaQf+B1FyTCcevZB6dXmkotWStgQ7ph/bWdT1VOHGwTMHJXZsTYC4d7gdGkcgMxbBdUGVnK1tUWpdlMPj84jStJ2I= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.215.105 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EsOi/Dd7SUc4tCyf+0rRJhpuvr+i6WWoLa4lF9XD8/EWLJsvJndbVHpJJM9UhTL/HxFDHJdkZS4JCAmEyqEHsc3/w06jh2M85ci6U8ii7JTAQsJ8qm37u2sLiEu+CA8LxKliH8FQ9xzORThaz5enR8/zkYOqDPArsLxHj2drbBvHD6PPIak4M8g+lJbWkf4lQZKYWqCqF1+lAjQdRNI4dS15ul6mDENo4r85jLDcdXqOjC7hO7hU0RJD5UtpeekZMlbPIAUxE9EqoHp5+nchA9COegilqNzcoiyw8GCIeUXOilnNIs087kKBcq6dAVYbO8cWJtgV4jnZkHoRN7f4dw== 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=ZWqN2d2WV5H3rjNNY/SuBA/Is/G4XlfllfCP+MEOJRA=; b=XFzC0gNcMCnjGypfjcecaBtnTLldAKrBEdVYSeUNB0bPOdGZuc2NUu8rP81JelDyiWH+FZhBvROY+9PtVpUeTYFEWTU4skL4vzFrxDtQ+B9vw4GbAbcDZWh9hKrZ7Bj3v+F29CsC6+l8QY0l+Uq/62hAEAcblMbVUCsUZwba33Tj97dqISdBtc+YVGtv2ruOGrgRcNTWdwSNVJ1Rcgvavv6fLZD81mf8U1mNUinjM6K+Ekcl8TRSbZup0SaHIA/Js3Gzglrkul2smZA+hIBIRdYuj8+Wf7yags9ZPByXWOLlPVhSl9t7rzkDox1mAMr0iZw3oOanxMmgDoImTemnsA== 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 JH0PR03MB8052.apcprd03.prod.outlook.com (2603:1096:990:37::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 07:34:59 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7828.024; Mon, 5 Aug 2024 07:34:59 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, arend.vanspriel@broadcom.com Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang Subject: [PATCH v8 5/5] wifi: brcmfmac: add flag for random seed during firmware download Date: Mon, 5 Aug 2024 15:34:25 +0800 Message-Id: <20240805073425.3492078-6-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240805073425.3492078-1-jacobe.zang@wesion.com> References: <20240805073425.3492078-1-jacobe.zang@wesion.com> X-ClientProxiedBy: SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|JH0PR03MB8052:EE_ X-MS-Office365-Filtering-Correlation-Id: d3a8ced0-665e-415f-a0fb-08dcb5211c39 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: EXdolgxyHNPHKSU2Cy7zag3D3+4AVKB2GDJx7UUHW6noZ5EjUSnfMIkSHsWP+9cfEUc9HlLmPMLXRrC48zwZ0spt/j1zZ3ZYBpFyY0uJOH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CQp6G5qDxD59PAsUN/pxx5Ur+1+oYvat3Nw0WgFYIs9FieXtCxGgEIOlXO6km9+xEjBBY24U9BFiXvW3dJDv9sqiTKCdG0VAhY65y6FK2NyNNoZSd9LQzrVveshYg6Go1WDc3Zod+wfB6VoPMYoNNo9nDK/Kko9aRHWXoS3cOwj7sFGE6tnqVqZnW1I6uNg4tVHpvxn0NQARM0HAXM5n80D8Xt+JvLpSLWtCIzqlHi8MqbJ7kgIZb0/L73cCiRTAbfQHHVBReI= 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)(52116014)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Eb7JHmxOY1/Zho0yKofC4KoNfiTrSgvItQnCEPxCWl+maoDC+CJJBbiOPi2kM+IoT0wCj5UK3UnMYfX4+vHrWEMPDjZW7dPuJSHtXVBuRWkthW2sVQQ2a4/I+ZMgeA5cPDfdP3+3q3gxQFUjLoqDgLHcPWYpr18HYaNBK3DSuRoiLzGL3cGwn/yLO79pggH4eplG+mMqhXrAOs16xIVL/nuzwPTALI8DgDRsAGGaUPkrjHbvxbC0MB+lbsHMcG/07hReUpT2MPkVD9oRzEB+5hd41bGxfCPwYdA9TaTT0MQ2aO/nD5kgWVS0MMTYqbD06Sv9nDjIgFH2f47Fk1xvQ6WB1NyDwVF9WICQxhOZ576eI4EgHEJ2d1FI5GNmgpzc6HKonaZ6KSplcYnq2MyVZNu6tKvJeI0s9F9whubkN0kU+6nDZiqCmV8AFV5nUHtlcrHYsTMPRjP6Pg8PA+RydvBrEItjDeKcJRypnHWKbtPlveL41aGDF+a3AZ4b7L99DfvcICJcHIs59uMPdndC+96ewp5mvQzniNn0Dl7+8vao/8QuPQ/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415f-a0fb-08dcb5211c39 X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 07:34:59.3135 (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: +Rm1Wj/piI2O+G59wwlpRSaZi36kImTbscFsG72Fpz9Y5PXfF99sB37jiLnWVpsrK9tlS7qzPVubEMeWZ87L0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB8052 Providing the random seed to firmware was tied to the fact that the device has a valid OTP, which worked for some Apple chips. However, it turns out the BCM43752 device also needs the random seed in order to get firmware running. Suspect it is simply tied to the firmware branch used for the device. Introducing a mechanism to allow setting it for a device through the device table. Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Co-developed-by: Arend van Spriel Signed-off-by: Arend van Spriel Signed-off-by: Jacobe Zang --- .../broadcom/brcm80211/brcmfmac/pcie.c | 52 ++++++++++++++++--- .../broadcom/brcm80211/include/brcm_hw_ids.h | 2 + 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index c34405a6d38b8..e88fa4cd62a1d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -66,6 +66,7 @@ BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); +BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-pcie"); BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie"); BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); BRCMF_FW_CLM_DEF(4378B3, "brcmfmac4378b3-pcie"); @@ -104,6 +105,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), + BRCMF_FW_ENTRY(BRCM_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752), BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* revision ID 4 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0x0000000F, 4378B1), /* revision ID 3 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFE0, 4378B3), /* revision ID 5 */ @@ -358,6 +360,7 @@ struct brcmf_pciedev_info { u16 value); struct brcmf_mp_device *settings; struct brcmf_otp_params otp; + bool fwseed; #ifdef DEBUG u32 console_interval; bool console_active; @@ -1720,14 +1723,14 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, memcpy_toio(devinfo->tcm + address, nvram, nvram_len); brcmf_fw_nvram_free(nvram); - if (devinfo->otp.valid) { + if (devinfo->fwseed) { size_t rand_len = BRCMF_RANDOM_SEED_LENGTH; struct brcmf_random_seed_footer footer = { .length = cpu_to_le32(rand_len), .magic = cpu_to_le32(BRCMF_RANDOM_SEED_MAGIC), }; - /* Some Apple chips/firmwares expect a buffer of random + /* Some chips/firmwares expect a buffer of random * data to be present before NVRAM */ brcmf_dbg(PCIE, "Download random seed\n"); @@ -2399,6 +2402,37 @@ static void brcmf_pcie_debugfs_create(struct device *dev) } #endif +struct brcmf_pcie_drvdata { + enum brcmf_fwvendor vendor; + bool fw_seed; +}; + +enum { + BRCMF_DRVDATA_CYW, + BRCMF_DRVDATA_BCA, + BRCMF_DRVDATA_WCC, + BRCMF_DRVDATA_WCC_SEED, +}; + +static const struct brcmf_pcie_drvdata drvdata[] = { + [BRCMF_DRVDATA_CYW] = { + .vendor = BRCMF_FWVENDOR_CYW, + .fw_seed = false, + }, + [BRCMF_DRVDATA_BCA] = { + .vendor = BRCMF_FWVENDOR_BCA, + .fw_seed = false, + }, + [BRCMF_DRVDATA_WCC] = { + .vendor = BRCMF_FWVENDOR_WCC, + .fw_seed = false, + }, + [BRCMF_DRVDATA_WCC_SEED] = { + .vendor = BRCMF_FWVENDOR_WCC, + .fw_seed = true, + }, +}; + /* Forward declaration for pci_match_id() call */ static const struct pci_device_id brcmf_pcie_devid_table[]; @@ -2480,9 +2514,10 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) bus->bus_priv.pcie = pcie_bus_dev; bus->ops = &brcmf_pcie_bus_ops; bus->proto_type = BRCMF_PROTO_MSGBUF; - bus->fwvid = id->driver_data; bus->chip = devinfo->coreid; bus->wowl_supported = pci_pme_capable(pdev, PCI_D3hot); + bus->fwvid = drvdata[id->driver_data].vendor; + devinfo->fwseed = drvdata[id->driver_data].fw_seed; dev_set_drvdata(&pdev->dev, bus); ret = brcmf_alloc(&devinfo->pdev->dev, devinfo->settings); @@ -2668,14 +2703,14 @@ static const struct dev_pm_ops brcmf_pciedrvr_pm = { BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ PCI_ANY_ID, PCI_ANY_ID, \ PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \ - BRCMF_FWVENDOR_ ## fw_vend \ + BRCMF_DRVDATA_ ## fw_vend \ } #define BRCMF_PCIE_DEVICE_SUB(dev_id, subvend, subdev, fw_vend) \ { \ BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ (subvend), (subdev), \ PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \ - BRCMF_FWVENDOR_ ## fw_vend \ + BRCMF_DRVDATA_ ## fw_vend \ } static const struct pci_device_id brcmf_pcie_devid_table[] = { @@ -2703,9 +2738,10 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID, BCA), BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_43596_DEVICE_ID, CYW), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC_SEED), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC_SEED), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC_SEED), + BRCMF_PCIE_DEVICE(BRCM_PCIE_43752_DEVICE_ID, WCC_SEED), { /* end: all zeroes */ } }; diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index 44684bf1b9acc..c1e22c589d85e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -52,6 +52,7 @@ #define BRCM_CC_43664_CHIP_ID 43664 #define BRCM_CC_43666_CHIP_ID 43666 #define BRCM_CC_4371_CHIP_ID 0x4371 +#define BRCM_CC_43752_CHIP_ID 43752 #define BRCM_CC_4377_CHIP_ID 0x4377 #define BRCM_CC_4378_CHIP_ID 0x4378 #define BRCM_CC_4387_CHIP_ID 0x4387 @@ -94,6 +95,7 @@ #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 #define BRCM_PCIE_4371_DEVICE_ID 0x440d #define BRCM_PCIE_43596_DEVICE_ID 0x4415 +#define BRCM_PCIE_43752_DEVICE_ID 0x449d #define BRCM_PCIE_4377_DEVICE_ID 0x4488 #define BRCM_PCIE_4378_DEVICE_ID 0x4425 #define BRCM_PCIE_4387_DEVICE_ID 0x4433