From patchwork Wed May 22 23:01:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13671169 Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) (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 7727979950; Wed, 22 May 2024 23:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418900; cv=none; b=VTC91y8dH1YiDKmC9+tlWCXQvXh/2/pXobUHpLxeqKkmjFTgJaTmydYrWAwm9Y/cHGOQ2hlp5/I6WaM26pQaeeo9JxRNTSxu/VkvTYtL7GslWngJ2caV665w5at0uDRlYFtifHqNFJEdqwNh0TB7c0CCc0lvX56Hu6YkZ/Tx1HM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418900; c=relaxed/simple; bh=LbN79ILVGJmypIKRIiXwODJW0beN4emgcWPm/0DnbDE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kZCwiiMt4fkUlFOSxr72dxI82xUjFMpz3pb5Iyx0p2oJNcQMQd+Yryl7SwDOVbrPUFaClLd03ga9ObMfvANFFI+VOhOzK814LjZhEV8xSiHjvkKx5zvnSuXnRXl9nTmG+YjbqkxCMQlLIvJXbSRg13CRFwrunz9hJSVahfMjUQ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nl+MTlwd; arc=none smtp.client-ip=209.85.160.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nl+MTlwd" Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-23d477a1a4fso3664397fac.3; Wed, 22 May 2024 16:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716418898; x=1717023698; 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=bVMsWZbFnMr/zKM0R1fwfE/XyN3eszTblppaMZhLZMo=; b=nl+MTlwdX6Z9jixt1kPLDZrMP2+SAm+EfbXqRoFxl6WTehAzJd32NWTfDdIxZvOB1I OM8PmP8+dULvaJtT4xi1YMg1itg8Gj/iHU+Z6UtXE7qQQdd5LakQPb3vWtPhTxna2EcJ ezi+rJnZKAIsZ8HMmGpk93Aw86WEQ1758N64KyhHYPYN6fqOJCnUu2DUwNxXQLogjGBr dESqljyWGrYlS9LRr0NjH7IpMJL6k5zR5iNRfKk3tljdOjJamCC6EZ5H4fI9a2+o0PF6 fs58xv9aTSRRjFpqs4kNhkvxFtq8OLwLZCdxOmAQOBY6v7rmKkBAeALQg4Ld5AR0SpYk KwUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716418898; x=1717023698; 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=bVMsWZbFnMr/zKM0R1fwfE/XyN3eszTblppaMZhLZMo=; b=Z9WNR9bXcgK14XHbKHMkasOBVjiX/ZOiSG3YRBfRJZot2xYWXjbxtU2+MPttIzbncm RueHkBzpJLkrMzfeQqMP+syzVeDYTJmdulghGstxMjN862XbXMqTgm/X/BpY/tKhX2VY tU+Iqn+ZSNGLwNtq4T4NuMtfDg1ZusSx/xVhmLvO/secbDkSB2N2hCm1b0iPVDZQ9MQr mUl1quU+gV3djJSYhjkixv48XclHopN0K7NO8uReJgxBw80fjxge1BLoZ8k5voCCJbfT gqMK/aldlEzSBKIVnzw3wCS2oJoWmKVfPgU0EZ8KRCm/f6sEXcsRLuocdNKFAYsIVwQb /J0A== X-Forwarded-Encrypted: i=1; AJvYcCWWZZ6uaaTluvWj2IwuqTtk6eqGjKhe+2MxInxermGaVo5HrghHXvQW7/7Aj8veqHLzWDYsYDYzxUtK6DGXjAlKPXWZdV+0DOA= X-Gm-Message-State: AOJu0YzCCE1s0UbG5/gZO1X8T6WsOK3skuPrrmUvtOShDwcWgv6DplJI xXYqTZldth5349VEgeFXG2kvQJkEpKgNT51Rac1Sf2KhVFpb36gq X-Google-Smtp-Source: AGHT+IEvLg7qLqqYzfccRkThfADAtQ4+ws5h+ipFvfeIxvlW/iwTGPjNP3BA5CsYjGoLnrPJfjrHFw== X-Received: by 2002:a05:6870:e2cd:b0:245:3678:16d2 with SMTP id 586e51a60fabf-24c68aae036mr4869305fac.22.1716418898427; Wed, 22 May 2024 16:01:38 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f0ff995ccdsm4155936a34.34.2024.05.22.16.01.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:01:38 -0700 (PDT) From: Chris Morgan To: linux-sunxi@lists.linux.dev Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, broonie@kernel.org, lgirdwood@gmail.com, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, sre@kernel.org, Chris Morgan Subject: [PATCH 1/4] mfd: axp20x: AXP717: Correct MODULE_ENABLE_CONTROL register name Date: Wed, 22 May 2024 18:01:29 -0500 Message-Id: <20240522230132.364915-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522230132.364915-1-macroalpha82@gmail.com> References: <20240522230132.364915-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chris Morgan The datasheet lists two "MODULE_ENABLE_CONTROL" registers; the first one is at register 0x0b and the second is at 0x19. Change the name of the register at 0x19 to AXP717_MODULE_ENABLE_CONTROL_2 to reflect this. Signed-off-by: Chris Morgan --- drivers/mfd/axp20x.c | 2 +- drivers/regulator/axp20x-regulator.c | 2 +- include/linux/mfd/axp20x.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 609e7e149681..16950c3206d7 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -209,7 +209,7 @@ static const struct regmap_access_table axp313a_volatile_table = { }; static const struct regmap_range axp717_writeable_ranges[] = { - regmap_reg_range(AXP717_MODULE_EN_CONTROL, AXP717_MODULE_EN_CONTROL), + regmap_reg_range(AXP717_MODULE_EN_CONTROL_2, AXP717_MODULE_EN_CONTROL_2), regmap_reg_range(AXP717_BOOST_CONTROL, AXP717_BOOST_CONTROL), regmap_reg_range(AXP717_IRQ0_EN, AXP717_IRQ4_EN), regmap_reg_range(AXP717_IRQ0_STATE, AXP717_IRQ4_STATE), diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index 20bef3971fec..a8e91d9d028b 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -837,7 +837,7 @@ static const struct regulator_desc axp717_regulators[] = { AXP717_LDO1_OUTPUT_CONTROL, BIT(4)), AXP_DESC(AXP717, BOOST, "boost", "vin1", 4550, 5510, 64, AXP717_BOOST_CONTROL, AXP717_BOOST_V_OUT_MASK, - AXP717_MODULE_EN_CONTROL, BIT(4)), + AXP717_MODULE_EN_CONTROL_2, BIT(4)), }; /* DCDC ranges shared with AXP813 */ diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 5e86b976c4ca..e0cd66bd3b6d 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -115,7 +115,7 @@ enum axp20x_variants { #define AXP313A_IRQ_STATE 0x21 #define AXP717_ON_INDICATE 0x00 -#define AXP717_MODULE_EN_CONTROL 0x19 +#define AXP717_MODULE_EN_CONTROL_2 0x19 #define AXP717_BOOST_CONTROL 0x1e #define AXP717_IRQ0_EN 0x40 #define AXP717_IRQ1_EN 0x41 From patchwork Wed May 22 23:01:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13671170 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.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 3D55E8120D; Wed, 22 May 2024 23:01:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418901; cv=none; b=EpdvFvHKEAzo2nkNuDe2d2XtO2XeUKLGUoEWI21glt5SMHzdG5dReuNo55WdVgf3XZPGgi/ZO+VdAdaeGP4OD554wfeDbnoZwdB1Q+dOhrBa9ei7wDZ0ih2eYgfrBN6BqD/hnWjiKwztoKO4rhzTJfVJEZ7jmontCiQhWsOjXdE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418901; c=relaxed/simple; bh=pOvzFgVKP/kGa6+Oj4KEJD4+I3wsBQtRuG8wg87QWT8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OjgGv2vna6iBbl+BxoHfeGNme1rx3IhvhNuvnisNKbrZztQ3Z7DpfGYvIWpYL1UCBSgb1cDoWstyBA4dqpIn/ondMtzMsGLn7VLSdFAWiBDnu5BczwLIqsI00ayYfNbHmx+zcRZ19PtTDr9uFCmPQREo8OtwETf2Cdp6jujlZtg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gT/7ltvf; arc=none smtp.client-ip=209.85.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gT/7ltvf" Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6f0f5633a45so2675135a34.3; Wed, 22 May 2024 16:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716418899; x=1717023699; 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=+2qTU9Hshqz6t1vKHlNCBK7tNf2KsTEuBaP1htzZOzY=; b=gT/7ltvfxaUAlR1T+OJSa4oSxMwKbX02rMic2e7EnLf+U1YmW836dqP8+hduGo3Mhq KduF2Lv5ot2+SiMKc5VezIxk5mmjtFVcx4RLVYkAzC05vMUKRaNftlGW0cZRZAKlNxgG 4kIsU5pstvG3m97BJ+khWM5vB5BnaUSsBNL+gMihnwg0xeq3yVeoUnqvDiEfINEcojs1 Vjw+p4R2zcw4fwTcUyG6OF75K3oQI5WrMEZryirKKW3TwdH7cvz4P7wjZu4177qQclSy TxnYi3QLDJIWZN21ty+2jmJJ3ERYYEx6UmMU1TJYhbnblrKnPRsMoRpDLGJq1cysZ0Ng rWXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716418899; x=1717023699; 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=+2qTU9Hshqz6t1vKHlNCBK7tNf2KsTEuBaP1htzZOzY=; b=eCYhsIYLzGzTzAU1BqJSqRzxGXFUKhtbNv+58VHZy9f5yPJCNm7Rv3Dqohb/w619R9 epqreF8Al+kHu/9t+udlFO9a1mlBYmip1StLi/J87lboKLHpmD4aRryakcktKa757mmg Bdf9OMaIKSzho9mgsT0SqcmNZHv9iTWe5QOCvXVyhEVoInOkdLwORt4HauCwk9/JNG4C 8W3nu/P/pXrHiSur/Wt8oIXlKgtB/sD4OXaWWL5TnpbNR5kPUmVKwt7o60TDV5DYqUpD 3MP+27vmAtGmPVs7Rzz1TlQmknj3tzsAHlvf9j0fp34ROIvyjGO92dNFFcosb38BUd3W hCYg== X-Forwarded-Encrypted: i=1; AJvYcCUfXVgwWe4L/k2PLShn/JauaX0T6kaiCBshUwprgG8806EwEscAbU91gZYu6etTIVEcbbGkMItN/l3KyZs85GjK5WtbpM6z7AQ= X-Gm-Message-State: AOJu0YwnZ0nq0PpQxvkloCpXEf9K9o8Ad5TX6ANM756bsSFNQblt7SPc 7bHEZDB6ygdY9OT+e1zJcAHzchITWODhSpNnjc+MdgQ8tqYQY3gp X-Google-Smtp-Source: AGHT+IF9XqDhOY3NBWbwuIvbwXqM3lJZa+22zq8hRhbKDUtdlxNWoBwWN/yX6ZfmEb9tQKYSYIuYpw== X-Received: by 2002:a05:6830:22d0:b0:6f0:e79e:f1a9 with SMTP id 46e09a7af769-6f66518f653mr3454623a34.4.1716418899303; Wed, 22 May 2024 16:01:39 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f0ff995ccdsm4155936a34.34.2024.05.22.16.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:01:38 -0700 (PDT) From: Chris Morgan To: linux-sunxi@lists.linux.dev Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, broonie@kernel.org, lgirdwood@gmail.com, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, sre@kernel.org, Chris Morgan Subject: [PATCH 2/4] dt-bindings: mfd: x-powers,axp20x-usb-power-supply: add AXP717 Date: Wed, 22 May 2024 18:01:30 -0500 Message-Id: <20240522230132.364915-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522230132.364915-1-macroalpha82@gmail.com> References: <20240522230132.364915-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chris Morgan Add binding for the AXP717 USB power supply. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski --- .../bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml b/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml index 34b7959d6772..a50c3bafa707 100644 --- a/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml +++ b/Documentation/devicetree/bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml @@ -26,6 +26,7 @@ properties: - x-powers,axp202-usb-power-supply - x-powers,axp221-usb-power-supply - x-powers,axp223-usb-power-supply + - x-powers,axp717-usb-power-supply - x-powers,axp813-usb-power-supply - items: - const: x-powers,axp803-usb-power-supply From patchwork Wed May 22 23:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13671172 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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 62CB780C04; Wed, 22 May 2024 23:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418903; cv=none; b=ICYooj29TVRYnZ34kWHSxL0HToXzkzB/sbFLnMvmOIJHDmJJaSjcxSf42cDM25WRbIrocB5KkTz8kS00D+C0NEZr7PdSZMVZhf1/HapU/xSvxRVmOm2H83hDqYSLIvMbnoaRy3vCekfeBxPg8UxmnGDV9H712ZYtV4XZRh4nX0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418903; c=relaxed/simple; bh=InqBqLbH3n/AJ0tE4B/mjMRNaXb85H66Zo/dlVxzD7c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=qq/Av7Dh7GEORN54omy+ugouipUkTnwvKwjsCELc3G5kMW+aFvOg+DMId1sTOyXQl+HtzxqwYOy5zA/SMFi4jep5v9/ZDSQeKYEwGnchIKSEU29ZtGLcjjV4p7honWdYSNvJ7aYiIHQIZ4ZjMK/g9Vig4CRlH+1cjYt1hQ9GTLQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OpPXnyfY; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OpPXnyfY" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-6f0e4212d5aso3032741a34.3; Wed, 22 May 2024 16:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716418900; x=1717023700; 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=tByCviqN7zUdCC9oaXPaphubYoz1pXTVHw9kMt4I1mo=; b=OpPXnyfYfOuL16nLG14dhSO+o6OMg4BJJmjoNuOAhDG5KIJ6BgP22+GSRfwXBTlyUE RHnGZ31PVH0SGOygV+20Dz6Wh7mgS9QgCl8asmlcqjPsJHQxwxHQEgSk1gu2RQgiegBs NVAZN0OM6erjh3H9/v5qmBDbFx6T/E3wiOHMroZC0BzdxRxwgjYeDtkdmmFYlPPima78 vQ1F2VzZrJbzgae5qEf8VMDLKJP0545+V41SvG+S7sbMHyg+3P+2PL3bHGfh2HRCsUod +yLomZbWij2wHaP8atEz9umNZPyveAZZ2d00xHxMnOgxCqaw5dWSkhI+hwN8Z/Sj9GKY 5CeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716418900; x=1717023700; 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=tByCviqN7zUdCC9oaXPaphubYoz1pXTVHw9kMt4I1mo=; b=uBk6s499aJQroQGY7LVZvsQWaXWj/6AfxHxmGk33MAx431cNSl94Q/GFfqmN7aPAJc t2/ZzPbTM4wMFnOr12JqnOTEdr1qhMJEp7Rcm1p4XM70GKRayCH8uYnYL6wETJ9iaptm IaFHvyOTlW2+hvq5EtSWs+t2le16m/QiD5uw9EIytkX1DMxpeMl/2Zndm+26j4eHah+p 46Af5pgf3gNcYDUY995z2Bb6+rF+3LR7e0ymVb5vDNSvRAkGA8QdyeBjwciecNYpVOei 7QoWbh1JAQdq8Xysy/y7rvjpJ6vsgSKUF20Oko+to50EpznYADKgLYxyyYjNF4QNL9FI eH0Q== X-Forwarded-Encrypted: i=1; AJvYcCWiw2OVAKpiIDKbWmWVyUJGZRxcRIzpbk06y3Dr8zKmclxpgOIgMmoFpkc/+i2kauaXp3tZKrNIFryFEQpNs+XBGYQuVZAojgQ= X-Gm-Message-State: AOJu0YxW7KlL1h2E1jwBLLximWVsOAsxiSrrWZJiEp4Hfy3sIa0gJcXC 8ST5kG3+/IR71xWXZv6rdYoR4ZhL5Uyj/6D9DpHV2StJBip0A3sp X-Google-Smtp-Source: AGHT+IGI+mRRIbwH6sZww5+pXiaXyqblDhRhEQ+b/bLWyEavBs70WJtQt+va7gj5k4TTpKYvcRxr7A== X-Received: by 2002:a9d:6319:0:b0:6f0:e4ee:51c with SMTP id 46e09a7af769-6f666c91a89mr3551266a34.21.1716418900311; Wed, 22 May 2024 16:01:40 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f0ff995ccdsm4155936a34.34.2024.05.22.16.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:01:39 -0700 (PDT) From: Chris Morgan To: linux-sunxi@lists.linux.dev Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, broonie@kernel.org, lgirdwood@gmail.com, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, sre@kernel.org, Chris Morgan Subject: [PATCH 3/4] power: supply: axp20x_usb_power: Add support for AXP717 Date: Wed, 22 May 2024 18:01:31 -0500 Message-Id: <20240522230132.364915-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522230132.364915-1-macroalpha82@gmail.com> References: <20240522230132.364915-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chris Morgan Add support for the AXP717. It does USB BC 1.2 detection similar to the AXP813, however it is otherwise very different from previous AXP devices. Signed-off-by: Chris Morgan --- drivers/mfd/axp20x.c | 19 ++- drivers/power/supply/axp20x_usb_power.c | 216 +++++++++++++++++++++++- include/linux/mfd/axp20x.h | 18 ++ 3 files changed, 248 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 16950c3206d7..d52d0c1c3367 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -209,15 +209,20 @@ static const struct regmap_access_table axp313a_volatile_table = { }; static const struct regmap_range axp717_writeable_ranges[] = { - regmap_reg_range(AXP717_MODULE_EN_CONTROL_2, AXP717_MODULE_EN_CONTROL_2), - regmap_reg_range(AXP717_BOOST_CONTROL, AXP717_BOOST_CONTROL), + regmap_reg_range(AXP717_PMU_FAULT, AXP717_MODULE_EN_CONTROL_1), + regmap_reg_range(AXP717_MIN_SYS_V_CONTROL, AXP717_BOOST_CONTROL), regmap_reg_range(AXP717_IRQ0_EN, AXP717_IRQ4_EN), regmap_reg_range(AXP717_IRQ0_STATE, AXP717_IRQ4_STATE), regmap_reg_range(AXP717_DCDC_OUTPUT_CONTROL, AXP717_CPUSLDO_CONTROL), + regmap_reg_range(AXP717_ADC_CH_EN_CONTROL, AXP717_ADC_CH_EN_CONTROL), + regmap_reg_range(AXP717_ADC_DATA_SEL, AXP717_ADC_DATA_SEL), }; static const struct regmap_range axp717_volatile_ranges[] = { + regmap_reg_range(AXP717_ON_INDICATE, AXP717_BC_DETECT), regmap_reg_range(AXP717_IRQ0_STATE, AXP717_IRQ4_STATE), + regmap_reg_range(AXP717_ADC_VBAT_H, AXP717_ADC_ICHG_L), + regmap_reg_range(AXP717_ADC_DATA_H, AXP717_ADC_DATA_L), }; static const struct regmap_access_table axp717_writeable_table = { @@ -310,6 +315,11 @@ static const struct resource axp22x_usb_power_supply_resources[] = { DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), }; +static const struct resource axp717_usb_power_supply_resources[] = { + DEFINE_RES_IRQ_NAMED(AXP717_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"), + DEFINE_RES_IRQ_NAMED(AXP717_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), +}; + /* AXP803 and AXP813/AXP818 share the same interrupts */ static const struct resource axp803_usb_power_supply_resources[] = { DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"), @@ -424,7 +434,7 @@ static const struct regmap_config axp717_regmap_config = { .val_bits = 8, .wr_table = &axp717_writeable_table, .volatile_table = &axp717_volatile_table, - .max_register = AXP717_CPUSLDO_CONTROL, + .max_register = AXP717_ADC_DATA_L, .cache_type = REGCACHE_MAPLE, }; @@ -1026,6 +1036,9 @@ static struct mfd_cell axp313a_cells[] = { static struct mfd_cell axp717_cells[] = { MFD_CELL_NAME("axp20x-regulator"), MFD_CELL_RES("axp20x-pek", axp717_pek_resources), + MFD_CELL_OF("axp717-usb-power-supply", + axp717_usb_power_supply_resources, NULL, 0, 0, + "x-powers,axp717-usb-power-supply"), }; static const struct resource axp288_adc_resources[] = { diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index dae7e5cfc54e..3d6815bd614b 100644 --- a/drivers/power/supply/axp20x_usb_power.c +++ b/drivers/power/supply/axp20x_usb_power.c @@ -6,6 +6,7 @@ * Copyright (C) 2014 Bruno Prémont */ +#include #include #include #include @@ -30,14 +31,25 @@ #define AXP20X_PWR_STATUS_VBUS_PRESENT BIT(5) #define AXP20X_PWR_STATUS_VBUS_USED BIT(4) +#define AXP717_PWR_STATUS_VBUS_GOOD BIT(5) + #define AXP20X_USB_STATUS_VBUS_VALID BIT(2) +#define AXP717_PMU_FAULT_VBUS BIT(5) +#define AXP717_PMU_FAULT_VSYS BIT(3) + #define AXP20X_VBUS_VHOLD_uV(b) (4000000 + (((b) >> 3) & 7) * 100000) #define AXP20X_VBUS_VHOLD_MASK GENMASK(5, 3) #define AXP20X_VBUS_VHOLD_OFFSET 3 -#define AXP20X_ADC_EN1_VBUS_CURR BIT(2) +#define AXP717_INPUT_VOL_LIMIT_MASK GENMASK(3, 0) +#define AXP717_INPUT_CUR_LIMIT_MASK GENMASK(5, 0) + #define AXP20X_ADC_EN1_VBUS_VOLT BIT(3) +#define AXP20X_ADC_EN1_VBUS_CURR BIT(2) + +#define AXP717_ADC_EN_VSYS_VOLT BIT(3) +#define AXP717_ADC_EN_VBUS_VOLT BIT(2) /* * Note do not raise the debounce time, we must report Vusb high within @@ -45,6 +57,8 @@ */ #define DEBOUNCE_TIME msecs_to_jiffies(50) +struct axp20x_usb_power; + struct axp_data { const struct power_supply_desc *power_desc; const char * const *irq_names; @@ -58,6 +72,8 @@ struct axp_data { struct reg_field usb_bc_det_fld; struct reg_field vbus_disable_bit; bool vbus_needs_polling: 1; + int (*axp20x_usb_init)(struct axp20x_usb_power *power); + void (*axp20x_read_vbus)(struct work_struct *work); }; struct axp20x_usb_power { @@ -136,6 +152,24 @@ static void axp20x_usb_power_poll_vbus(struct work_struct *work) mod_delayed_work(system_power_efficient_wq, &power->vbus_detect, DEBOUNCE_TIME); } +static void axp717_usb_power_poll_vbus(struct work_struct *work) +{ + struct axp20x_usb_power *power = + container_of(work, struct axp20x_usb_power, vbus_detect.work); + unsigned int val; + int ret; + + ret = regmap_read(power->regmap, AXP717_ON_INDICATE, &val); + if (ret) + return; + + val &= AXP717_PWR_STATUS_VBUS_GOOD; + if (val != power->old_status) + power_supply_changed(power->supply); + + power->old_status = val; +} + static int axp20x_get_usb_type(struct axp20x_usb_power *power, union power_supply_propval *val) { @@ -281,6 +315,82 @@ static int axp20x_usb_power_get_property(struct power_supply *psy, return 0; } +static int axp717_usb_power_get_property(struct power_supply *psy, + enum power_supply_property psp, union power_supply_propval *val) +{ + struct axp20x_usb_power *power = power_supply_get_drvdata(psy); + unsigned int v; + u8 bulk_reg[2]; + int ret; + + switch (psp) { + case POWER_SUPPLY_PROP_HEALTH: + val->intval = POWER_SUPPLY_HEALTH_GOOD; + ret = regmap_read(power->regmap, AXP717_PMU_FAULT_VBUS, &v); + if (ret) + return ret; + + v &= (AXP717_PMU_FAULT_VBUS | AXP717_PMU_FAULT_VSYS); + if (v) { + val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE; + regmap_write(power->regmap, AXP717_PMU_FAULT_VBUS, v); + } + + break; + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: + ret = regmap_read(power->regmap, AXP717_INPUT_CUR_LIMIT_CTRL, &v); + if (ret) + return ret; + + v &= AXP717_INPUT_CUR_LIMIT_MASK; + val->intval = (v * 50000) + 100000; + break; + case POWER_SUPPLY_PROP_ONLINE: + case POWER_SUPPLY_PROP_PRESENT: + ret = regmap_read(power->regmap, AXP717_ON_INDICATE, &v); + if (ret) + return ret; + val->intval = !!(v & AXP717_PWR_STATUS_VBUS_GOOD); + break; + case POWER_SUPPLY_PROP_USB_TYPE: + return axp20x_get_usb_type(power, val); + case POWER_SUPPLY_PROP_VOLTAGE_MIN: + ret = regmap_read(power->regmap, AXP717_INPUT_VOL_LIMIT_CTRL, &v); + if (ret) + return ret; + + v &= AXP717_INPUT_VOL_LIMIT_MASK; + val->intval = (v * 80000) + 3880000; + break; + case POWER_SUPPLY_PROP_VOLTAGE_NOW: + ret = regmap_bulk_read(power->regmap, AXP717_ADC_VBUS_H, bulk_reg, 2); + if (ret) + return ret; + val->intval = get_unaligned_be16(bulk_reg) * 1000; + break; + default: + return -EINVAL; + } + + return 0; + +} + +static int axp717_usb_init(struct axp20x_usb_power *power) +{ + int ret; + + ret = regmap_update_bits(power->regmap, AXP717_ADC_CH_EN_CONTROL, + AXP717_ADC_EN_VSYS_VOLT | + AXP717_ADC_EN_VBUS_VOLT, + AXP717_ADC_EN_VSYS_VOLT | + AXP717_ADC_EN_VBUS_VOLT); + if (ret) + return ret; + + return 0; +} + static int axp20x_usb_power_set_voltage_min(struct axp20x_usb_power *power, int intval) { @@ -307,6 +417,20 @@ static int axp20x_usb_power_set_voltage_min(struct axp20x_usb_power *power, return -EINVAL; } +static int axp717_usb_power_set_voltage_min(struct axp20x_usb_power *power, + int intval) +{ + int val; + + if (intval < 3880000 || intval > 5080000) + return -EINVAL; + + val = (intval - 3880000) / 80000; + return regmap_update_bits(power->regmap, + AXP717_INPUT_VOL_LIMIT_CTRL, + AXP717_INPUT_VOL_LIMIT_MASK, val); +} + static int axp20x_usb_power_set_input_current_limit(struct axp20x_usb_power *power, int intval) { @@ -340,6 +464,20 @@ static int axp20x_usb_power_set_input_current_limit(struct axp20x_usb_power *pow return regmap_field_write(power->curr_lim_fld, reg); } +static int axp717_usb_power_set_input_current_limit(struct axp20x_usb_power *power, + int intval) +{ + int val; + + if (intval < 100000 || intval > 3250000) + return -EINVAL; + + val = (intval - 100000) / 50000; + return regmap_update_bits(power->regmap, + AXP717_INPUT_CUR_LIMIT_CTRL, + AXP717_INPUT_CUR_LIMIT_MASK, val); +} + static int axp20x_usb_power_set_property(struct power_supply *psy, enum power_supply_property psp, const union power_supply_propval *val) @@ -366,6 +504,26 @@ static int axp20x_usb_power_set_property(struct power_supply *psy, return -EINVAL; } +static int axp717_usb_power_set_property(struct power_supply *psy, + enum power_supply_property psp, + const union power_supply_propval *val) +{ + struct axp20x_usb_power *power = power_supply_get_drvdata(psy); + + switch (psp) { + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: + return axp717_usb_power_set_input_current_limit(power, val->intval); + + case POWER_SUPPLY_PROP_VOLTAGE_MIN: + return axp717_usb_power_set_voltage_min(power, val->intval); + + default: + return -EINVAL; + } + + return -EINVAL; +} + static int axp20x_usb_power_prop_writeable(struct power_supply *psy, enum power_supply_property psp) { @@ -385,6 +543,13 @@ static int axp20x_usb_power_prop_writeable(struct power_supply *psy, psp == POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT; } +static int axp717_usb_power_prop_writeable(struct power_supply *psy, + enum power_supply_property psp) +{ + return psp == POWER_SUPPLY_PROP_VOLTAGE_MIN || + psp == POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT; +} + static enum power_supply_property axp20x_usb_power_properties[] = { POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_PRESENT, @@ -403,6 +568,16 @@ static enum power_supply_property axp22x_usb_power_properties[] = { POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, }; +static enum power_supply_property axp717_usb_power_properties[] = { + POWER_SUPPLY_PROP_HEALTH, + POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, + POWER_SUPPLY_PROP_ONLINE, + POWER_SUPPLY_PROP_PRESENT, + POWER_SUPPLY_PROP_USB_TYPE, + POWER_SUPPLY_PROP_VOLTAGE_MIN, + POWER_SUPPLY_PROP_VOLTAGE_NOW, +}; + static enum power_supply_property axp813_usb_power_properties[] = { POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_PRESENT, @@ -439,6 +614,18 @@ static const struct power_supply_desc axp22x_usb_power_desc = { .set_property = axp20x_usb_power_set_property, }; +static const struct power_supply_desc axp717_usb_power_desc = { + .name = "axp20x-usb", + .type = POWER_SUPPLY_TYPE_USB, + .properties = axp717_usb_power_properties, + .num_properties = ARRAY_SIZE(axp717_usb_power_properties), + .property_is_writeable = axp717_usb_power_prop_writeable, + .get_property = axp717_usb_power_get_property, + .set_property = axp717_usb_power_set_property, + .usb_types = axp813_usb_types, + .num_usb_types = ARRAY_SIZE(axp813_usb_types), +}; + static const struct power_supply_desc axp813_usb_power_desc = { .name = "axp20x-usb", .type = POWER_SUPPLY_TYPE_USB, @@ -505,6 +692,7 @@ static const struct axp_data axp192_data = { .curr_lim_fld = REG_FIELD(AXP20X_VBUS_IPSOUT_MGMT, 0, 1), .vbus_valid_bit = REG_FIELD(AXP192_USB_OTG_STATUS, 2, 2), .vbus_mon_bit = REG_FIELD(AXP20X_VBUS_MON, 3, 3), + .axp20x_read_vbus = &axp20x_usb_power_poll_vbus, }; static const struct axp_data axp202_data = { @@ -516,6 +704,7 @@ static const struct axp_data axp202_data = { .curr_lim_fld = REG_FIELD(AXP20X_VBUS_IPSOUT_MGMT, 0, 1), .vbus_valid_bit = REG_FIELD(AXP20X_USB_OTG_STATUS, 2, 2), .vbus_mon_bit = REG_FIELD(AXP20X_VBUS_MON, 3, 3), + .axp20x_read_vbus = &axp20x_usb_power_poll_vbus, }; static const struct axp_data axp221_data = { @@ -526,6 +715,7 @@ static const struct axp_data axp221_data = { .curr_lim_table_size = ARRAY_SIZE(axp221_usb_curr_lim_table), .curr_lim_fld = REG_FIELD(AXP20X_VBUS_IPSOUT_MGMT, 0, 1), .vbus_needs_polling = true, + .axp20x_read_vbus = &axp20x_usb_power_poll_vbus, }; static const struct axp_data axp223_data = { @@ -536,6 +726,18 @@ static const struct axp_data axp223_data = { .curr_lim_table_size = ARRAY_SIZE(axp20x_usb_curr_lim_table), .curr_lim_fld = REG_FIELD(AXP20X_VBUS_IPSOUT_MGMT, 0, 1), .vbus_needs_polling = true, + .axp20x_read_vbus = &axp20x_usb_power_poll_vbus, +}; + +static const struct axp_data axp717_data = { + .power_desc = &axp717_usb_power_desc, + .irq_names = axp22x_irq_names, + .num_irq_names = ARRAY_SIZE(axp22x_irq_names), + .curr_lim_fld = REG_FIELD(AXP717_INPUT_CUR_LIMIT_CTRL, 0, 5), + .usb_bc_en_bit = REG_FIELD(AXP717_MODULE_EN_CONTROL_1, 4, 4), + .usb_bc_det_fld = REG_FIELD(AXP717_BC_DETECT, 5, 7), + .axp20x_usb_init = &axp717_usb_init, + .axp20x_read_vbus = &axp717_usb_power_poll_vbus, }; static const struct axp_data axp813_data = { @@ -549,6 +751,7 @@ static const struct axp_data axp813_data = { .usb_bc_det_fld = REG_FIELD(AXP288_BC_DET_STAT, 5, 7), .vbus_disable_bit = REG_FIELD(AXP20X_VBUS_IPSOUT_MGMT, 7, 7), .vbus_needs_polling = true, + .axp20x_read_vbus = &axp20x_usb_power_poll_vbus, }; #ifdef CONFIG_PM_SLEEP @@ -707,7 +910,7 @@ static int axp20x_usb_power_probe(struct platform_device *pdev) return ret; ret = devm_delayed_work_autocancel(&pdev->dev, &power->vbus_detect, - axp20x_usb_power_poll_vbus); + axp_data->axp20x_read_vbus); if (ret) return ret; @@ -733,6 +936,12 @@ static int axp20x_usb_power_probe(struct platform_device *pdev) return ret; } + if (power->axp_data->axp20x_usb_init) { + ret = axp_data->axp20x_usb_init(power); + if (ret) + return ret; + } + psy_cfg.of_node = pdev->dev.of_node; psy_cfg.drv_data = power; @@ -778,6 +987,9 @@ static const struct of_device_id axp20x_usb_power_match[] = { }, { .compatible = "x-powers,axp223-usb-power-supply", .data = &axp223_data, + }, { + .compatible = "x-powers,axp717-usb-power-supply", + .data = &axp717_data, }, { .compatible = "x-powers,axp813-usb-power-supply", .data = &axp813_data, diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index e0cd66bd3b6d..107808df33e9 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -115,6 +115,12 @@ enum axp20x_variants { #define AXP313A_IRQ_STATE 0x21 #define AXP717_ON_INDICATE 0x00 +#define AXP717_BC_DETECT 0x05 +#define AXP717_PMU_FAULT 0x08 +#define AXP717_MODULE_EN_CONTROL_1 0x0b +#define AXP717_MIN_SYS_V_CONTROL 0x15 +#define AXP717_INPUT_VOL_LIMIT_CTRL 0x16 +#define AXP717_INPUT_CUR_LIMIT_CTRL 0x17 #define AXP717_MODULE_EN_CONTROL_2 0x19 #define AXP717_BOOST_CONTROL 0x1e #define AXP717_IRQ0_EN 0x40 @@ -147,6 +153,18 @@ enum axp20x_variants { #define AXP717_CLDO3_CONTROL 0x9d #define AXP717_CLDO4_CONTROL 0x9e #define AXP717_CPUSLDO_CONTROL 0x9f +#define AXP717_ADC_CH_EN_CONTROL 0xc0 +#define AXP717_ADC_VBAT_H 0xc4 +#define AXP717_ADC_VBAT_L 0xc5 +#define AXP717_ADC_VBUS_H 0xc6 +#define AXP717_ADC_VBUS_L 0xc7 +#define AXP717_ADC_VSYS_H 0xc8 +#define AXP717_ADC_VSYS_L 0xc9 +#define AXP717_ADC_ICHG_H 0xca +#define AXP717_ADC_ICHG_L 0xcb +#define AXP717_ADC_DATA_SEL 0xcd +#define AXP717_ADC_DATA_H 0xce +#define AXP717_ADC_DATA_L 0xcf #define AXP806_STARTUP_SRC 0x00 #define AXP806_CHIP_ID 0x03 From patchwork Wed May 22 23:01:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13671173 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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 61AB6149C6B; Wed, 22 May 2024 23:01:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418903; cv=none; b=QYxDX5KLy4j4kk6xpoRmk0H/VkF3yWp8wFGoyJ3IhkpN8k+2CNWY87kxqx2F/4W85qaD+Q31rUu5YB1QOn7CQyhOQ2j7ahFPOShHQz4iTi4zi56ZmnFZDzwJQoFWz4aW5BHTpFIMMsKkVw0gbs/Y/qwkNwJgzUencrYnL34pnjQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716418903; c=relaxed/simple; bh=2S4UwANZHDCvcGjJ6kOp8Lq7CBUh0RxJBiNqIllq/lA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jH6sMfpgrF7nSs+XPsIoAO4amyParkt/MTVV+e9gzBqU18v44Wbtl8A+BCjT6M0KDnMvfxhXRzcyb6UtPzL5Gs/kCYSslB8RVXOAdmcAeHJnkqYUBpfuZJyECXSuWoPxHJvXfTlOcak/Gcdxk0BEXCBOEWZjHKXS27lkQ0I6n1U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NPQPtkH/; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NPQPtkH/" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-6f264d5dadaso2321453a34.0; Wed, 22 May 2024 16:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716418901; x=1717023701; 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=NuOISrKNUc5YSpf1n3iTvx1BpiFjgcJLUsrC21l2FZg=; b=NPQPtkH/F3ZJ4/bbE7dwthXhoMhHa34rU/52s+tOyyvrCxCttaRGxENBZLQ56W3Iwk mSbhL4ss16zQQEdGuSwujE0oY5zaIbUysYQZjFbvW2YYubjG+lUyswzkLDlpoqlrxutU Jp2wL1GoC0HZmX1KrXVXOL5kiZd2yh2omGvtB1J3vZiWYapYX4w3DNctimM6MunOWM1N ywWF4QdfEWeYzOGiPxOj8kFJMIp7qA/50NDCXGRhd6Bc30yYUZmV9FUyYjIHwc19ogg7 +2lLZIb4IuyggTZ7o/dP1jmPk3vDNdRBxuRQZFknG4AkT27K2riXSi7cQHiMgVgHdr81 MlQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716418901; x=1717023701; 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=NuOISrKNUc5YSpf1n3iTvx1BpiFjgcJLUsrC21l2FZg=; b=qdbMNbA/5h5q+AVjG6RGoCIPpds9F4p2b3gcDZw9b24T2IqiUdSICRahr+u+dU/jEE x5YrCRnHvBEFhkcFco3JXEsqjy3LbRO59IT6AotlJpII2bXtf1lPiqQjBySUp7VQyBuA 5+WhP7yOb6hfWtNjXqP91I7tpqvgtpg/stQwDuKs5YPeXvXVHbRHj6vXSc8I/jdfm6ic TSZEchA9HDmHKNjykvwnsrXO83pdpaCeI4DGEPCwsPA6xUtCyWqQ7NRy5twOkH6v7zpc n3U8sOJv/ko8XTtCrPhlMiUv8oEysIOLARSoVQsJznm61aywzIe4gv/9qAAYSBxkdEjZ l3NQ== X-Forwarded-Encrypted: i=1; AJvYcCUHKN+wl7IfuHLx7/n/BSiADAFQJ1dUsStyhzDCqr2PrJvSFQH0an2K7kYDdJNWYY0mVZooia9Xq00rAIelol8vsXXXP2E76bM= X-Gm-Message-State: AOJu0YxJWtHO4WGnTkRig/ytj3zw24/KmSvt6zwGg7SDFdie1ST8tD0u +811hvmAM5i6ay/N28xI9uWMExXLA3BsMXL70Vf2WgglTbeUWFMc X-Google-Smtp-Source: AGHT+IHKH8RUcmcUS/pRwyHnuEDoFRBxr2XM//8lFtCVqbLCFRgxWFFFRteUww5UtB6vYheybsTg2g== X-Received: by 2002:a9d:7a42:0:b0:6ee:3b91:5e3b with SMTP id 46e09a7af769-6f669819b4amr3614442a34.27.1716418900945; Wed, 22 May 2024 16:01:40 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f0ff995ccdsm4155936a34.34.2024.05.22.16.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:01:40 -0700 (PDT) From: Chris Morgan To: linux-sunxi@lists.linux.dev Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, broonie@kernel.org, lgirdwood@gmail.com, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, sre@kernel.org, Chris Morgan Subject: [PATCH 4/4] arm64: dts: allwinner: Anbernic RG35XX: add AXP717 USB power Date: Wed, 22 May 2024 18:01:32 -0500 Message-Id: <20240522230132.364915-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522230132.364915-1-macroalpha82@gmail.com> References: <20240522230132.364915-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chris Morgan Add the necessary node for the USB power driver and bind it to the OTG port. Signed-off-by: Chris Morgan --- .../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts index ee30584b6ad7..96a43d55baab 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts @@ -307,6 +307,10 @@ reg_cpusldo: cpusldo { /* unused */ }; }; + + usb_power: usb-power { + compatible = "x-powers,axp717-usb-power-supply"; + }; }; }; @@ -323,5 +327,6 @@ &usbotg { }; &usbphy { + usb0_vbus_power-supply = <&usb_power>; status = "okay"; };