From patchwork Thu May 23 07:53:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671352 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBEEA13CAA2 for ; Thu, 23 May 2024 07:54:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450868; cv=none; b=K7Ct2yWit1QTsSaeCj+eGFW+5jM/CapVKYoiqbpzYGNtRkinTs34jlFjetWKv3w/Ot1jbQUs5zvNVjVTZbLUNUm7qdWGD7CowJv2RcJUIRypmWzZ6cWQcEVpVIsOMBo5lzhPq7kqViR6AC7nyNj9+lptZ9gXlbFP1G54JH9Occg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450868; c=relaxed/simple; bh=kJoDq+1PGhj178GDLSihIlH/mdh71gAOr67LZsxDh7E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SbgLpr20uMDS9s+LQFeP6XyU50YRfl87z0kBXvmcOx8SoySsH630JhBXjYTIrn2iSr+SS+Ks0YgZc8YCPWV4luML+NxJtQtqZ1lRY094rq/KINjTBy/8ZaT1zqapzl4ngaYUcw6NpU93tfzZJAdCiOx/Vkr1nDH/q582OppYFy8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=mrZu8ncX; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="mrZu8ncX" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-354f8a0cd08so699426f8f.2 for ; Thu, 23 May 2024 00:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450864; x=1717055664; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yFKoRI+8ogEC3xai0mED7XOpWxyQTS94NP18L7SjeH4=; b=mrZu8ncXZLIrEKHKsaYPk3Fw7xH9BJGqpvBc36rTv7vy/ZA8iVXSmkNiPLrdQCwDv+ kUGVQ4lOj6FUtFEzlDy1jFFtC6Uf+WgZDFXYCvmvksGt6Oxp6Lmsyo/7KqU3KTv8Bp5A +n+62gOS9L/D6F+F+ocGYeEwlCSN0+9v30+jbTJuI38hiSAYtRnBjnchgvA0wbANgq1t 4sPltO1VCowNbwJYw/qdyzEsDdZ1ku0JYQCq7clKDtC+tuipJ88KqnMO9/DKGIllHwJC jrGNUeam4hvCIMEriDOsSZUGHfoZ1FlkdS2dxKlcU4GKoEUMLRIT7XBokDDnZ+mEcWI1 1GlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450864; x=1717055664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yFKoRI+8ogEC3xai0mED7XOpWxyQTS94NP18L7SjeH4=; b=QBxLm9/Jwo600opvf5uAmzNGI+eLmmFY7b19rW7qSHq7HC6eLsLZXMpSjqJNOESBFR IXtSr58ATwRbw/O8rKCz5OJlieULDLCURDoOEH0rJ906K9qrrSLBaIbQytwGiH2CGoSk y5lXQcuOrXymdOXn/13sNzEmGiqo0LydmTDQtEcbbeJMF6g6mydQVr0ABf8Da8mMSGme gYYBgPp4DTWFkXksjVNxLUlcBzDl8fGJXZaVaJ5W5JMrWmVtahsxca3rg10PINiH5hmW gE6TaK9hC5ffLdekyBejEZXV2KqfzKXljTefrGVDXbLh+OkMia0Fofy2GXLyH34qDLRt aHBA== X-Forwarded-Encrypted: i=1; AJvYcCXjTTGcVtp2bPxyM/arf1qaXmsVzK/VY4gFteyDz5cU3cfwqldiy9oxJZ27Wp08PBFJO9y63S8W9QozuRJlWP9qja6VcyRk X-Gm-Message-State: AOJu0YyiRhw1yW7E9dAj/mH9qktWPzge4Jju4NzJhkntnmZ8wXUHVCJ+ ZcqbtqZVTLnRYPjetrufULHVbHkR49W53Itv1j20KWQf9mOMeP1BU+Sx6YUzAwU= X-Google-Smtp-Source: AGHT+IGDzErplwCICU1ko5jWwuhNNvWBqpXdU1AVQfAdkYAqsILeEMKquVqY/w/WRkxQ5BGXYhUTkQ== X-Received: by 2002:a05:6000:795:b0:354:db63:9de5 with SMTP id ffacd0b85a97d-354db639e56mr4759952f8f.39.1716450864009; Thu, 23 May 2024 00:54:24 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:23 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 1/7] dt-bindings: can: m_can: Add wakeup-source property Date: Thu, 23 May 2024 09:53:41 +0200 Message-ID: <20240523075347.1282395-2-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org m_can can be a wakeup source on some devices. Especially on some of the am62* SoCs pins, connected to m_can in the mcu, can be used to wakeup the SoC. This property defines on which devices m_can can be used for wakeup. Signed-off-by: Markus Schneider-Pargmann --- Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index f9ffb963d6b1..33f1688ca208 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -118,6 +118,10 @@ properties: phys: maxItems: 1 + wakeup-source: + $ref: /schemas/types.yaml#/definitions/flag + description: This device is capable to wakeup the SoC. + required: - compatible - reg From patchwork Thu May 23 07:53:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671353 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3401E13BAC6 for ; Thu, 23 May 2024 07:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450868; cv=none; b=kyOmSjSo9DSQfbKG2gqpqo7F3bw4prqBlERPA/52RDUy8R/jovr9r6qnLWM69Jxg/vsmNdhg73OgRphIzOYWs2+vqaZJQFN4mKx6uj+NvYeGdu9m+wQMkA/CnLvSWK6ZKKOuGnUYOOfPH64DxxyPj+33gXAS+PkPeiq+4qRQG/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450868; c=relaxed/simple; bh=IXICyk/2YP4eDexMcGBpEOku8KMw3RDWVpsaEO4xej4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VdAQenjDGt5mHlL5ObvvRcn0lfz4Iv6bd6Ad8vJO8iPLs9nNpu8zm8Lj9/RgDm0fs7aoSMEuZlrhNOKoDRo/P97HMqXG7PaYyJ12OQxirGyWuAZl4jcfk9PclspxR1Xw3xo1IVVTiS1fj131dGhxrI0DO2mw9ZDPS9qFim2KAjc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=nfl6VszG; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="nfl6VszG" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-354f8a0cd08so699453f8f.2 for ; Thu, 23 May 2024 00:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450865; x=1717055665; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dfktdx7avVVxO+VgbPGQcts/32B65YHqwd/3ELI4ILs=; b=nfl6VszGSwZVqB6kGkSVxFW4b4wZmTNTR5Phncuf7zqUOkk0rUWADvxYoV/UjnODvj iW7AC7sMt64uIApFG11rLRiY1JLJIksqSxtKSRyhkEJNSW3qm+s7QawoRO9HIdO5kPGi CJ/5/Rct1Lw4XpREAA3nQ8py/CWEP8e+Y0gwiTaMJ33XQpp684eTpU7wFEt4QjUtpgp+ Wj/Saabi8dmTd6Y/8e1nVPdJm6+kkkob3FURI5+aGRRmejk0Vef2MC9jbDeViyUKdK1l 1b6GENCnfl/FR7Z2Gyb70/Qd3vVAqUmBlsybiS6xTcgsovkUD96987bC/iizE1RLXxUX snIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450865; x=1717055665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dfktdx7avVVxO+VgbPGQcts/32B65YHqwd/3ELI4ILs=; b=cw5An+++XuGdCJMvAHtKYhLbT49JX2eE9S/EegqdJvbMK9H1RRkI3E7jU8OyZVeEHr ZigfGSbWzUhx4wG9ZAcQ5qoEh8Pebh3lrTL53WqgcZteMcdiZgqhwwU7fFJSuMlhZbqo BZuUuF4+IfFlHjlqzo+D/RXjyPb8+AdLGLddyrJTeXXVdDOqt413blRd3G3F51m1AxpE ozPAW6Vx94QrcLLScTADK+2qN9Y371jdP7UJ/57SeBPktHPPi3EwxSlr9Nxku0eu/LmM e5wy+0RMZ7aDKNcr3D3PBxfmifvFI69fFrzrKVdkBFjlGefvQv6/Yr+ISdDKjl4oab7R nzkw== X-Forwarded-Encrypted: i=1; AJvYcCV6P4fsKHGZSQCnI1FZdQa3MKaczLSQ8w9C+qEFQp8QTJZxKT0bR9qxKQl5avrO4+p3tgyHNMv3lXiqbXw9H7WePBIQDHJY X-Gm-Message-State: AOJu0YxLcAw/RWqHTUkHHSoTeN2fJWIdTIUAMcPpGq9LKCai7zpCVkWQ DQutsRzKGeTTLquvo+DdBCvBOHhya3U7k5O7OE2ARovUk56g70qPxQ72lo3FrLM= X-Google-Smtp-Source: AGHT+IF/pK55XVk6BU5rXK9slQYy/4lO8VwqixmRJMIscsNGljlUqfko0F+oxxn3ecB3ekIdd2xgtA== X-Received: by 2002:a5d:564b:0:b0:354:fd72:8791 with SMTP id ffacd0b85a97d-354fd7288b8mr235826f8f.43.1716450865365; Thu, 23 May 2024 00:54:25 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:24 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 2/7] dt-bindings: can: m_can: Add wakeup pinctrl state Date: Thu, 23 May 2024 09:53:42 +0200 Message-ID: <20240523075347.1282395-3-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Pins associated with m_can can be the source of a wakeup in deep sleep states. To be able to wakeup these pins have to be configured in a special way. To support this configuration add the default and wakeup pinctrl states. Signed-off-by: Markus Schneider-Pargmann --- .../devicetree/bindings/net/can/bosch,m_can.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index 33f1688ca208..7c6fa7367c37 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -106,6 +106,22 @@ properties: maximum: 32 minItems: 1 + pinctrl-0: + description: Default pinctrl state + + pinctrl-1: + description: Wakeup pinctrl state + + pinctrl-names: + description: + When present should contain at least "default" describing the default pin + states. The second state called "wakeup" describes the pins in their + wakeup configuration required to exit sleep states. + minItems: 1 + items: + - const: default + - const: wakeup + power-domains: description: Power domain provider node and an args specifier containing From patchwork Thu May 23 07:53:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671354 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9822013CFAB for ; Thu, 23 May 2024 07:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450870; cv=none; b=eE+R3UqjqMW5y7gih9FOwMnMwVNd6CHL5CXl3JGgObyTNQGQZoD/GSfLgOwEYYjcuyTbwwdaz2f3lI+hDeu/+KVsP25x5HBqfTVtIm6E9aguyCl037YoWuTgRdyulMIi72VTgvHwVzgdxE24kAnogSQPo0G0Fo3ZVur2dqxnDFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450870; c=relaxed/simple; bh=BPcdpNgRauvstbwBV7cyTFTtfwTX1AJQa1VOyBH+Orc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rGs16sQxuVEEdBFzwm6y9a8TkhLeav0SGuc6npKaetIH3Ljj5N7czFWc/1XSQ7Jb/adQEcbxmNjWbAxtSpKE2DcnpCWEnQImD4rYbecW46TO7ix233OfmdICNRX187kdH9mJs8rn0A+SVUS34Xv1lN33CWv3DsDW9D5NOTcDRjw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=kg8Zfb/G; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="kg8Zfb/G" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-354faf5f1b4so265348f8f.1 for ; Thu, 23 May 2024 00:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450867; x=1717055667; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hrFQSVhPJTExMHxUs9x2644C6X3jCTcC0vL8A1PKT6s=; b=kg8Zfb/GLOwSbemxCeWvdCe/ZqX+cEzQssOdpaqq4Yk/MH6BVrNZfbSPPDkyXwjsZe ARYgUbAxaqrilEzuM/moTqhvlRmYatcfb86ercfb4QY1gm/NJuwX3n4lFpYnU3IyTVA8 mvBj28/TrQJ7umaAL6Z0gESqUN6OLAg7jCm5LI2BEcaIn0dL5bB8GpcCFGSaCxO5xQ5b xdu0R5lcCZz4VnwHbs9uEF/h+fRFtPcy43M+zwDIbqPPFASS1gy4BDTo6XN6hgyEPmR3 cjaYSV074df5g+IQQnLzVzQXPGWWSK316Xd4y+Azam3bjW0mmCuFui4b8ZqTUo0+rvCm 12yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450867; x=1717055667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hrFQSVhPJTExMHxUs9x2644C6X3jCTcC0vL8A1PKT6s=; b=oHmghJBHwMJAB+SBrgCmit2Sslde7pTIw0Zt/MvHPtQig/W192hIrUsL7+xVnFoGIU Fp8/tYRCEiQWpfUtkIlYPaNNqFBP5+ThhGQoqofO/Mm0Ea7HC1TR4CXMN/fi1yjsfQrQ rrYmrQUPemxNlK24MIGXGTSIYhrj4wk+Rgsi1ybOzGPXaAgZg9Ip+fHJaBCDxsILpacy 5MaDZzS23O9pb1xviF42t0Z0Kw+qIVuPmkSUudvt0c3FlFohjm+QkNdn+ZPcBbKOh/uq 55aI8kWRKy7uFF7g5w1qhqph2QFqarKuMsXcsM8hI+w1SZDw307/LFaKP1yUzNl19ToV XYWA== X-Forwarded-Encrypted: i=1; AJvYcCW5ZVVysoS5+84wfDyRZUNmI+iijFIsf61n7/SPgHFZA1zPImNDmajsqFA+Jb7+wB2UqmgDkXf/BYwuhGUIk2TvdthsOQWd X-Gm-Message-State: AOJu0YyEHmc2pU79czSyPotfzCAdBiiP5W3O1q763dLZac5HnxzfBaVb Mf1A/n6//6aIwXjUI7V74rMUoPxUAqZEU9+3zr8gE3cp+QNaKTug7xTTRsYz8j4= X-Google-Smtp-Source: AGHT+IHpdHwgvkOic2e5snbrW03BmHrtQiZTJlEnXodGIaGdt59+8iaoH1lfBH+5/wLQqizWIx78pA== X-Received: by 2002:a05:6000:1fa5:b0:355:15a:f0b5 with SMTP id ffacd0b85a97d-355015af206mr229576f8f.32.1716450866839; Thu, 23 May 2024 00:54:26 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:26 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 3/7] can: m_can: Map WoL to device_set_wakeup_enable Date: Thu, 23 May 2024 09:53:43 +0200 Message-ID: <20240523075347.1282395-4-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org In some devices the pins of the m_can module can act as a wakeup source. This patch helps do that by connecting the PHY_WAKE WoL option to device_set_wakeup_enable. By marking this device as being wakeup enabled, this setting can be used by platform code to decide which sleep or poweroff mode to use. Also this prepares the driver for the next patch in which the pinctrl settings are changed depending on the desired wakeup source. Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 14b231c4d7ec..80964e403a5e 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2129,6 +2129,26 @@ static int m_can_set_coalesce(struct net_device *dev, return 0; } +static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) +{ + struct m_can_classdev *cdev = netdev_priv(dev); + + wol->supported = device_can_wakeup(cdev->dev) ? WAKE_PHY : 0; + wol->wolopts = device_may_wakeup(cdev->dev) ? WAKE_PHY : 0; +} + +static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) +{ + struct m_can_classdev *cdev = netdev_priv(dev); + + if ((wol->wolopts & WAKE_PHY) != wol->wolopts) + return -EINVAL; + + device_set_wakeup_enable(cdev->dev, !!wol->wolopts & WAKE_PHY); + + return 0; +} + static const struct ethtool_ops m_can_ethtool_ops = { .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS_IRQ | ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ | @@ -2142,6 +2162,8 @@ static const struct ethtool_ops m_can_ethtool_ops = { static const struct ethtool_ops m_can_ethtool_ops_polling = { .get_ts_info = ethtool_op_get_ts_info, + .get_wol = m_can_get_wol, + .set_wol = m_can_set_wol, }; static int register_m_can_dev(struct net_device *dev) @@ -2266,6 +2288,9 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, goto out; } + if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) + device_set_wakeup_capable(dev, true); + /* Get TX FIFO size * Defines the total amount of echo buffers for loopback */ From patchwork Thu May 23 07:53:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671355 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06D9C13CFB0 for ; Thu, 23 May 2024 07:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450871; cv=none; b=JBr+UzPQRT6t50h6MtfpTupoP21f6xUniv8PHVnaildt5WwNbSWnyL/W7OqS5ci3EgbKVvakk1CLKkVEeRqFjzq4jBHcgyZiXyXR8J/fL+lEfmr6TbHMfi1yEi0IWh4t7DzP3WIBeVwe0ljsi8/LJlU/EU+tvyn+J8SVsMyIegI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450871; c=relaxed/simple; bh=psaW3D5sy9xXOmkzELpixxLbVsz3tVfuUMx9AZiaJks=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e77MSeXWVCHC+lO1/48ZyCHcxj3dQlS1KXzQaq+qJhgmp4GYBfixQH2IJs0ddUSaa68LdBVKjGEovTsM7VChY8ATPDjRvEUgvgn6IEGC/YyPbPRxyAtrOe9+UTOCxbmgN6CjXF5E5pkPg9JfgBVC88myBdJzTfWvgnKgh/ydArY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=APU8nV6P; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="APU8nV6P" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-34d9c9f2cf0so1965693f8f.3 for ; Thu, 23 May 2024 00:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450868; x=1717055668; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P4T6sy6AEq30+xE+MXFJmyPKxLYvjiOTPFV8oNWYyfY=; b=APU8nV6PUH3bX5GA0rppxHpHVJP88901zi2kPOwVbk8S/fLlm0LEfDTd2/UoFpsnN8 uUGVrfwZbyaU/PRR2GD8mV6ABnpPy7crQr9hwnJsar+cZFbijE900/ekMESI4RXIcBt+ 20L/J7dW3MwWyaLZwKGX6/8F0ypFjDgxlCad35TtCbt/iYr4+s5Zfkcm4KPY/Mhrnk0p Kqq/u7+ukUxcnSeyYjJjyI+cbWmSh/BUYR0lHER9KU9DOSlTK/6hOq7iUwvVb0fjJy4u LnqnDR2VsZ8NxZSlO0p4yxwAGK3KyAJSWDNSgZL4JKjjK7UeyD7vCQJAIagAwjeJnUc1 KSfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450868; x=1717055668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P4T6sy6AEq30+xE+MXFJmyPKxLYvjiOTPFV8oNWYyfY=; b=d4miIcJFeD1/4wgP/5up69wz8Z1jzpCr7rurbrO2/QCndb2gOjtg2zHpVD5q2OLtRl jN6pFFxhJ8jOlCy25IxTDKOOPtiEvcWh//2U9GnSobCsDKKhFMiMQ58LcwVj0mEU7ecb ReS0NpKjMd3G5iz+Yk/PEeDf9oYzTtKz/MHAYc1E72VJitMAedFQbRXjAkhGlS4qkk2G 9T6PZqgBJ2iLsDf75/a/hn+sj0YB4UdvG1kF3N7jo6CVh7fyaZ+qrhpK9JO7kY/UY8rn 3jLzRlW4eRBq8Uyy4EXRtq0kPydRSEuWj1RtMpUb6H2wVhas62V20bUpeyK44IGjj7UC QNPg== X-Forwarded-Encrypted: i=1; AJvYcCWuB+/3aY1+b9sk3idyeAQQ1Ki7BE9WH87DRO/+dYpPYbdGG8qIMf0IueFv3HLmV/s2Zfc8Lij9AhRPYDFmSJuYby1Di9st X-Gm-Message-State: AOJu0YzEQjQTrEKzTTA6tqWl38LQeVH8P9ZZFrtmWK2mTJDuIsXOVs+y puAZ3dz4FIkGILl3drw9Y6vuLduxDvIJLQikAFwBsRGkQFI+1qdG+NiUkhCYjgM= X-Google-Smtp-Source: AGHT+IFtIc5i+hivOWt1FZJ1gwG5chb73rVNDKqh9Iu9jNZxfSYT+HyovD+5k8o5exozIdt5jmzJ4A== X-Received: by 2002:adf:e6cb:0:b0:354:f2b0:ebda with SMTP id ffacd0b85a97d-354f2b0ec82mr3067448f8f.10.1716450868279; Thu, 23 May 2024 00:54:28 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:27 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 4/7] can: m_can: Support pinctrl wakeup state Date: Thu, 23 May 2024 09:53:44 +0200 Message-ID: <20240523075347.1282395-5-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org am62 requires a wakeup flag being set in pinctrl when mcan pins acts as a wakeup source. Add support to select the wakeup state if WOL is enabled. Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 20 +++++++++++++++++++- drivers/net/can/m_can/m_can.h | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 80964e403a5e..c5585dc68f2f 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2140,11 +2140,21 @@ static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct m_can_classdev *cdev = netdev_priv(dev); + struct pinctrl_state *new_pinctrl_state = NULL; + bool wol_enable = !!wol->wolopts & WAKE_PHY; if ((wol->wolopts & WAKE_PHY) != wol->wolopts) return -EINVAL; - device_set_wakeup_enable(cdev->dev, !!wol->wolopts & WAKE_PHY); + if (wol_enable) + new_pinctrl_state = cdev->pinctrl_state_wakeup; + else + new_pinctrl_state = cdev->pinctrl_state_default; + + if (!IS_ERR_OR_NULL(new_pinctrl_state)) + pinctrl_select_state(cdev->pinctrl, new_pinctrl_state); + + device_set_wakeup_enable(cdev->dev, wol_enable); return 0; } @@ -2309,6 +2319,14 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, SET_NETDEV_DEV(net_dev, dev); m_can_of_parse_mram(class_dev, mram_config_vals); + + class_dev->pinctrl = devm_pinctrl_get(dev); + if (!IS_ERR_OR_NULL(class_dev->pinctrl)) { + class_dev->pinctrl_state_default = + pinctrl_lookup_state(class_dev->pinctrl, "default"); + class_dev->pinctrl_state_wakeup = + pinctrl_lookup_state(class_dev->pinctrl, "wakeup"); + } out: return class_dev; } diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index 3a9edc292593..bdfbba67b336 100644 --- a/drivers/net/can/m_can/m_can.h +++ b/drivers/net/can/m_can/m_can.h @@ -126,6 +126,10 @@ struct m_can_classdev { struct mram_cfg mcfg[MRAM_CFG_NUM]; struct hrtimer hrtimer; + + struct pinctrl *pinctrl; + struct pinctrl_state *pinctrl_state_default; + struct pinctrl_state *pinctrl_state_wakeup; }; struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, int sizeof_priv); From patchwork Thu May 23 07:53:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671356 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62F6513D292 for ; Thu, 23 May 2024 07:54:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450872; cv=none; b=akF5esT4F7QWfK0K9vAPehMpzY3bOryfytOzuRCM61tgRTjkZf7N+D4k7XA0MnmYOj+U9LSu1DYJBWSn8r2Qs5khnyCTpbpDRR2GX4udsek2w2qvIcWXt8KUxh/Yf5lBLb0Cun8Jdwa+IqBb0rkzFnJuwybE+qhuW7NjL3i3hVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450872; c=relaxed/simple; bh=DngWa9LT+PzowW87sl0GHtPfWYWe/9KucU6S0ZmKJWk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YxJsbaed8hfEaKTn9d0r6BVwzexz+8VWzdhqR9Kl6i++yS9Q78vAEs9LtMLTUrUDdAj+6mZGYOhR7pFYjqsyHakgH8EEltJo78OIpLuS/Pt3I5Tp8gho+tyBy2W2UQHIBLAaj1SZRiIM01VQ9NGiOAvs/ENuVoVyv2ViaZNsAD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=a7U+SFq8; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="a7U+SFq8" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-41fc5645bb1so47417035e9.1 for ; Thu, 23 May 2024 00:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450870; x=1717055670; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8qHm5wPDHErIfonoFh9yf6yEDNagx5CpABpNxxmsHN0=; b=a7U+SFq8keObSAYi5uFnacKH9CbbtzuJbmVurqBclXdMdOhsG4kkZ5fMtaoZE/7kLF x4G7nYvQlnd0tnzg6L4bhzS8PiWb6QXpwWPcENhD4xLZcVr5+F03xT5Fv8Hhn7/x/Jds MY+cJcvsgHBZpwcK+CY6TlWM8dQKWU3Dya5MdHGLGts6I9abltphXZLWjXkcHQP3Rs/F Yi7nyrxgJOX893cRmJm2HWC9GV686/EUlSKKuM++J9KXZBytfCkLcoEBDk6uKy9BnVr0 mpnCB67zhK7u+1jC/5sxG2YnlRAfIXWjJBVraeg2aRuzvBCVlkJFwIytE1w2BCF3epjc JCqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450870; x=1717055670; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8qHm5wPDHErIfonoFh9yf6yEDNagx5CpABpNxxmsHN0=; b=vI/uH1hM3YEVaM15HP6z1RnfmFWQV26T5wB/HPvybNdMOr/zRpShxZWP2ewdGpCije xBBblmE2Mh6BCsImtlwVg8b4oG0ZS37Uv5rTIHAEjhSVeQHkjsB6LP2PGeDAjH5fjc1C z6RCcGJvbV6+/fvOMoZwVdk3gLE0EBAgBq20B9ZtC1sAyeEEGpd+clmqSgnN5LnqsAiu JV9ReG97xCWwmOAWwge6gKoKYRfOvfqMkSGx9+iavg55wzXFfh74AuPg1DmGoozL6STJ l7i8b74LaYp1JCcG1DkEG3HxWtCE/kTFpABPfLY2Sv/vkZm0YpA46t5pCibSEUua9Knu 8Usw== X-Forwarded-Encrypted: i=1; AJvYcCWR9dlHVTWxb+ziwAMsVm24O7SbyqkP3j6+1E+kZogISvL/sJ5XjF/Jvb6RojgIlOfP7XnAPNLGMDjGIPJGssfl3nm9QPLA X-Gm-Message-State: AOJu0YzBfDoDEVOHvDsg2T5mzXAJKCxSnuo5CPHXkpNwrRzHMSU6A/BI JQe6AZIa8IUmAevru41FwkP294aXmgP/6+NY9V4EZkc0XwwffXBGS7GKYYlE0aM= X-Google-Smtp-Source: AGHT+IF3OTnggc31210qX3nKdWOjfDLXrGQ5B7znh/oclKD116v3X2b9ljcQKfSkLFzr8iQgUqYRQg== X-Received: by 2002:a05:600c:54e6:b0:41f:fca0:8c09 with SMTP id 5b1f17b1804b1-420fd385d61mr24859455e9.40.1716450869666; Thu, 23 May 2024 00:54:29 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:29 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 5/7] arm64: dts: ti: k3-am62: Mark mcu_mcan0/1 as wakeup-source Date: Thu, 23 May 2024 09:53:45 +0200 Message-ID: <20240523075347.1282395-6-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi index e66d486ef1f2..56a40b641667 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi @@ -159,6 +159,7 @@ mcu_mcan0: can@4e08000 { clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; @@ -171,6 +172,7 @@ mcu_mcan1: can@4e18000 { clocks = <&k3_clks 189 6>, <&k3_clks 189 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; }; From patchwork Thu May 23 07:53:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671357 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA3DD13D501 for ; Thu, 23 May 2024 07:54:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450875; cv=none; b=Nly5uCY3aVes4tYGSvFv6kOL+Jb54rXQI5d9tg059IjT91iyMneH/mkHwul8ADBATdeEGxgvDaSTcFR5FdNy6zwvEI9s5SKzdQcLgedmPf/aO1CKc+Vv9pYQcNF4y2Xr7QeP02blZEo6TV8YMd49inVatUFGVju7SRfECT+/vww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450875; c=relaxed/simple; bh=EBn95oZYJBuKE7wbNSUlYqgJ3DNNnfrc/sMkkpKiyYA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hPFCvl3waOvCdwFQzv2951IgDycxIRiQrUISBQXXYr4456gahYJfXYF4GsFrSKFYbCx6e2h1Tc3B9ciw9WfcnNft3DgJf8EluSKmS/OclEYfFxO4K64zipSFB4wodx1p43kw80puJQw3Fgyx9b/soLKEZGIj8M3My6KXQNSBq1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=FAWxKYbB; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="FAWxKYbB" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-354cd8da8b9so1792069f8f.0 for ; Thu, 23 May 2024 00:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450871; x=1717055671; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cs95lBC/TcgC4HuVf1dVMWZC1dwKXurnxylDtWkEO30=; b=FAWxKYbBBHrb10okho6w4NrO9ZfsKTcmSIIt3LccRcld6AzKL4IdRgouRjRi+sZUow Q6beG7T2FpGdFHBp1cXYIMdFr5SeXdk1nSMlnWSc5xYI+/5Jbyc5dUW7mKuuvDHFUCDR SzhAUv1TgeQY0iAgLG2AaNMH9+a6k6g7ShKTbeKIp9yoN5Gl5fVvUP1HN1ilS5slce2G czxcJgMdjBkdSUVvJ7QlBEzDATVr9Zxa+VgeFLPxPcAnx0ti9ZSfPm/8r+nV81pI1l0R 1oCm7HZqSPMAevGIFsXLBOlCBAQrqc4Wfjeb8QYve3cMMMgDs1anMyGzykXMZ1Vp47nc YUoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450871; x=1717055671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cs95lBC/TcgC4HuVf1dVMWZC1dwKXurnxylDtWkEO30=; b=QhcW3FozV6G0nQsYvG/lfXErQyWMFWuvXuaIx9ISJeMzAopwrOdYtuxAPqu56kVUAT ix5ShJiv/UEiFzCO7NTOvXI9BSKZ3aTFeBGSlZjUsuurBibmtEvLQKHKH+d83dW7sUyg FvtTCWVyiXcGobOhXAmEDsDvwX/mnxAKN7cD9FZpofeYATEtdLLWVlcy/V4Dhh13pNy1 ikxFJSu3mU2gjmQk5LRdNSGBnseIF4c3+t4zv7QyUjQ7wZNVVwX3CEKcxuv6fAnhP3CH Em6lDJWIF72gYlJ+HZaeLb8MR4XfTeaXQioCCUuq2wCa5jLSQIfyXvZddvEDu+n1pkos Bzag== X-Forwarded-Encrypted: i=1; AJvYcCVMgThLELfD13MqC+BYKmDTMJJV6SCpL3VgMw+xWF2niPaK/epVoV8hCuHRycXlyC20pgDOWzdlWRGBtZq3CIxveXt8IqDN X-Gm-Message-State: AOJu0YxXx2vZYC+OJ5+MettZpyz+vTG3mvY9C3i+0EPwjyAmjZynHOPO oXXa4WlhwtHdeyqgH5Th4SC0ssy6qMqkcewiRQ/22SE14Z4sDd+auKVBhDQ+5jI= X-Google-Smtp-Source: AGHT+IG7YTkLUSffWTrDruzFzrKP7L50CGiVA7fCsGK/KJwutYO0L6Mt4f2SRF1jo89ocb1d3uWezw== X-Received: by 2002:a5d:6e09:0:b0:349:d810:9974 with SMTP id ffacd0b85a97d-354d8cf9050mr2859963f8f.17.1716450871014; Thu, 23 May 2024 00:54:31 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:30 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 6/7] arm64: dts: ti: k3-am62a-mcu: Mark mcu_mcan0/1 as wakeup-source Date: Thu, 23 May 2024 09:53:46 +0200 Message-ID: <20240523075347.1282395-7-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi index 8c36e56f4138..f0f6b7650233 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi @@ -153,6 +153,7 @@ mcu_mcan0: can@4e08000 { clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; @@ -165,6 +166,7 @@ mcu_mcan1: can@4e18000 { clocks = <&k3_clks 189 6>, <&k3_clks 189 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; }; From patchwork Thu May 23 07:53:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671358 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D4C413D622 for ; Thu, 23 May 2024 07:54:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450875; cv=none; b=s75kZfWSmpZTInaHSV/owrXEucqWlzHhNeCgQdYrXB8OI/xq3cigIiy1hJCddbCSZNEkyQEugZLimevY8phF9ur0TvNbAgLnSWFPgcNzDNpVsGgpmby5IaKc2uEHDIXiuKs+EXR4LLcHAiBYAxvx9iVE5obcy8/vH7SEMgCquDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716450875; c=relaxed/simple; bh=gzJFhUg0cO/7XPm7qt/P1liTC0JjrYR2UXojMcIxR7g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TGfPc6COcurOzILiz+RqJ6EB7wNpm1zggMlFCQQrQBCjPzkhrpO4tRsThCyvVzfz2KXYReIdiT0b61BIiPpXCVl6ecQlJ38H3MFPaHTmqpyw6PSumqJZCWeFgKtzHlf82kcvtbW7oF5katThTi4k0o2FI6DhgMJbLP0T+JanSls= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=JtIopPW8; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="JtIopPW8" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4200ee47de7so51059775e9.2 for ; Thu, 23 May 2024 00:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450872; x=1717055672; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xT7+JtKss4DjYZVOz3FuZCZuNxMX3BDv4ta8RztPqv0=; b=JtIopPW8Iy/s2TFGTEd0kOj3c6KRjSV9pN7Vw7cuTi4s5XzG+z7r/+RMBN/waQAv/4 Jpx8J5o/6n29GYe/PAVW4PiLhcSpRFO9ACJXOmyVIcKEczmXYOlUW6Q+q922QnDrQJIl Ufl1rRrw9aF84vS5GE/gOTWz0qZgpNB8OBGBoJIhpILxANcJ735kx70cw5Hhr6YdgDQp Fl0mTLDZ5iEZ5pwlEp+hsyuOF1ryojLH+iOBKJPsktrNbXWEbE6qYzLEOCVoVRHQCmuM LQta7ht/O+oe5WkzyqdZEe/JzqdQshZj9jWBHoJArhfkeL4QpN3kzHEKq321jhOxWVWk XdvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450872; x=1717055672; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xT7+JtKss4DjYZVOz3FuZCZuNxMX3BDv4ta8RztPqv0=; b=jDtNCH9Zk9bzqcCajWZFReT0lrQQlumbh8EIWI/2t5CsSTRiP3Mij31I3XRS/oLUR9 V1+jCkXdeKki+KRKSWfy8a0OzCEFEW60hhnIU3cGtWnruCXt1pD4+tdTAcxrksCcQsjA bq7zZhFndpblW2tS9cFbXQjARqlKJKEFpI100qxvDdIdQSuuNfoIy/1MWCXygbXJDJvF rfzd4oxZPCdB0/XFGC/tsiGxOeE3kKPPtQJp/A8kHlNHN7zqSvSfbm/cu06wtqkViaMy GLWJ8rxPs79d1+fbYtj42CWsIWvphJkdktnp66JXVyKgtP3VRRdzxasulGbUs/vs26FO xhSw== X-Forwarded-Encrypted: i=1; AJvYcCVIeGiakw2ZKntzxPIIrsqKmLz8HX6+mNLSL56Ud4uSPBnYEQ5s+SeY7McfZOHfh3Fa8DXd7aq+kbbos1elt8iRhrxyNt9S X-Gm-Message-State: AOJu0YwS1Cdm4qF61UjHhycvBkwlTgx8D81YjgEUvn9NAs0xP2cKZW9Q 9u0cp36R1WGcJU5hX6ph1VFyQQQbM3eKf2hnlwIJ4wGWsSDKfaFHlaOHHBWoh84= X-Google-Smtp-Source: AGHT+IEUHrJ0KdpXh+C+VgytBP/PyrYIZr7cy2feoJNZUjfuK0W25diSS+LmHL7ZAdPTYxlWEqO+sA== X-Received: by 2002:a05:6000:196a:b0:34d:b42d:b666 with SMTP id ffacd0b85a97d-354d8d98cfamr3368702f8f.56.1716450872391; Thu, 23 May 2024 00:54:32 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:31 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 7/7] arm64: dts: ti: k3-am62p-mcu: Mark mcu_mcan0/1 as wakeup-source Date: Thu, 23 May 2024 09:53:47 +0200 Message-ID: <20240523075347.1282395-8-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Vibhore Vardhan mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Based on the patch for AM62a. Signed-off-by: Vibhore Vardhan Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi index b973b550eb9d..e434b258e90c 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi @@ -162,6 +162,7 @@ mcu_mcan0: can@4e08000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; }; @@ -177,6 +178,7 @@ mcu_mcan1: can@4e18000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; };