Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3058384lqt; Tue, 23 Apr 2024 09:13:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQNVbDQVwRhIU92+g5lypfrkYzbo4l+JS8WwhC01xEuOXatEYWh9P5qlBt7fmZt9Za4AWUlc6X49EYceWJwD09gAmlOfHM8JV6S/D40w== X-Google-Smtp-Source: AGHT+IEm0OTb0Ey6TPv4dXLH5xwS5OM588sa/Hhc6L26npVCkujJIt2Km6xf0s2cLXWtqvlHuMU7 X-Received: by 2002:a05:6a00:10d5:b0:6ec:ea3b:4529 with SMTP id d21-20020a056a0010d500b006ecea3b4529mr24666pfu.11.1713888828804; Tue, 23 Apr 2024 09:13:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713888828; cv=pass; d=google.com; s=arc-20160816; b=cgbKnaOcB516vl+AJaInHl1Qdrlzm4H7EfAzSlZJqEDj6Wq5HzBU2CsSi5r0RRycyC Y5+jI/BdatR4WOK/KgeXvGDVs46UYuQWVtm8+CfCSLiNWR698u3R0/JQqzRnsd83xKXK uHcxtXgnm3L2TBcprIDUvQ8FpX2VwvzSobnusyGoQLOfRMYHeVYOMLf1C00yoSddg6fN qvNv2g6yjFmNO9gj0vOz4CnGEr7FHbyYv6YXLkhUidZ/0IxA1i9tRyJPJbG1WxEghUAC xg9/wSs66S5AcPk5E3Ux6J3BMTgfs/WV5jB/HXkGog2+oUJRsYq/hXv2SD+sSLfFyE6i /8HQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=dsi17VqWU0DeMUqis1oZr0f4adDGLGKd1AbqyPsRJcY=; fh=AdgInlcHhONf+VmDLza5Hci+xJ7FbXyEc1iFmNnU+fM=; b=jPjo3r24SSehWg/Dxh30MuKK55E1F1tjZBXgUHrO13T4Nnx04ZwIKlAl9OYll6Z6H+ CzE5TzuSo/R75yKFSMiV6Eu5NymVRILMuVMmWwIl4TAKl5ZzGUNEnUqnwqDoySkCC7D4 K/IDrfXkaFpj/M7IxeuxwJzqFMbLTB98D7rdFa/AF9E3jP2EPenfy0Ve2izsJqfjm59h 4ZNt7kEKGC9VG0JsBI8N5OTyyTvVHtVWEPVjMVIEHx/X54OSt0jzK+g/TdBeDX/n/fK6 ujwsuvjKWIQLq2ufSF/GdZX+o+R6IaNXNxKGoilvm3vtI0qJXk1k0yKFA4I8QbgeDTn6 aUPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=R9A6em4C; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-155531-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155531-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x64-20020a638643000000b005f7fd30b1dcsi7852142pgd.106.2024.04.23.09.13.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 09:13:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155531-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=R9A6em4C; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-155531-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155531-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4142B287847 for ; Tue, 23 Apr 2024 16:13:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FDF013CF90; Tue, 23 Apr 2024 16:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="R9A6em4C" Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) (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 5369F13BC29; Tue, 23 Apr 2024 16:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.89.224.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713888821; cv=none; b=Fqd//ac9P4EX1+IVpGKt4xGLvKq8XNsGiBYcfNSwtEsD/OWOpyWqG68AKNhEJspMV2KF6D3uoo6zvnRYlB6oCTjVVZplSjV4NoNBJdhJSSjEN2kuO4vEecHy1tPTY9Xxv6lJLnWLx40nOse8fXvq5VCPpUtvpeCDTOUCkhqRgzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713888821; c=relaxed/simple; bh=uw0Xw1IiymChWKb9m7J4X2HNifAHcd8oXLCkobYQanc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=objXC33aD8wFBElVOmiDjoqheePQBIokGieiebVA9ZQ+zfTkCIl91yzbnfo2t3LZx04Lz+4Z2GeJ0NpGdsIIvYCP8K310EQS3phCTb0iESImZkeMfOhzEl+OoH88mhATgfr5d+mnV2iyhRbTf7kd9tM4qVExdiNMn9hTk3JKWME= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=R9A6em4C; arc=none smtp.client-ip=45.89.224.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 1FF3D12000D; Tue, 23 Apr 2024 19:13:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 1FF3D12000D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1713888816; bh=dsi17VqWU0DeMUqis1oZr0f4adDGLGKd1AbqyPsRJcY=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=R9A6em4CGhqPraDGpm0nzOBfUexBQ3LC1cn4OCKDtmf+wTU5tS4xlE9n1vWC8ERtE BNekyOWHj2CpPZUr3E0aiaDDz7fHcfi3d8cTXKXjnQg5Jvdhv5PjZ3bDfkibPVpu/Z 0yOLasOkdDxR/Nh+9nlDG+WPBFWI4XjdcrUToT/pnihw0nt6mpHKoEpg4pgj7Zgxcg JyFCJOu33qQfEaGYpTzI3MwbJB6DPis4uSVztJQmNaDMU5lzxEu+nWsiM4Z/snIkWi 7M8HpiSjsmve1/aE3qORMRwUN2ik8RX5TFdB04zAnWykrqbV/WnAfg2RkklJjEv0OK /FnEKkR68wwng== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 23 Apr 2024 19:13:35 +0300 (MSK) Received: from work.sberdevices.ru (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 23 Apr 2024 19:13:35 +0300 From: George Stark To: , , , , , , , CC: , , , , , George Stark , Dmitry Rokosov Subject: [PATCH 1/1] arm64: dts: meson: a1: add definitions for meson pwm Date: Tue, 23 Apr 2024 19:13:27 +0300 Message-ID: <20240423161327.2522556-1-gnstark@salutedevices.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 184882 [Apr 23 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: gnstark@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 18 0.3.18 b9d6ada76958f07c6a68617a7ac8df800bc4166c, {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;100.64.160.123:7.1.2;smtp.sberdevices.ru:7.1.1,5.0.1;127.0.0.199:7.1.2;lore.kernel.org:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2024/04/23 15:16:00 X-KSMG-LinksScanning: Clean, bases: 2024/04/23 15:16:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/04/23 04:11:00 #24934400 X-KSMG-AntiVirus-Status: Clean, skipped From: George Stark The chip has 3 dual channel PWM modules AB, CD, EF those can be connected to various digital I/O pins. Each of 6 PWM is driven by individually selected clock parent and 8-bit divider. The PWM signal is generated using two 16-bit counters. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov --- This patch depends on [1]. Links: [1] https://lore.kernel.org/linux-pwm/20240423161006.2522351-1-gnstark@salutedevices.com/T/#t arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 212 ++++++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index 6caeb97d6d3e..641180514bce 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -307,6 +307,188 @@ mux { }; }; + pwm_a_pins1: pwm-a-pins1 { + mux { + groups = "pwm_a_x6"; + function = "pwm_a"; + }; + }; + + pwm_a_pins2: pwm-a-pins2 { + mux { + groups = "pwm_a_x7"; + function = "pwm_a"; + }; + }; + + pwm_a_pins3: pwm-a-pins3 { + mux { + groups = "pwm_a_f10"; + function = "pwm_a"; + }; + }; + + pwm_a_pins4: pwm-a-pins4 { + mux { + groups = "pwm_a_f6"; + function = "pwm_a"; + }; + }; + + pwm_a_pins5: pwm-a-pins5 { + mux { + groups = "pwm_a_a"; + function = "pwm_a"; + }; + }; + + pwm_b_pins1: pwm-b-pins1 { + mux { + groups = "pwm_b_x"; + function = "pwm_b"; + }; + }; + + pwm_b_pins2: pwm-b-pins2 { + mux { + groups = "pwm_b_f"; + function = "pwm_b"; + }; + }; + + pwm_b_pins3: pwm-b-pins3 { + mux { + groups = "pwm_b_a"; + function = "pwm_b"; + }; + }; + + pwm_c_pins1: pwm-c-pins1 { + mux { + groups = "pwm_c_x"; + function = "pwm_c"; + }; + }; + + pwm_c_pins2: pwm-c-pins2 { + mux { + groups = "pwm_c_f3"; + function = "pwm_c"; + }; + }; + + pwm_c_pins3: pwm-c-pins3 { + mux { + groups = "pwm_c_f8"; + function = "pwm_c"; + }; + }; + + pwm_c_pins4: pwm-c-pins4 { + mux { + groups = "pwm_c_a"; + function = "pwm_c"; + }; + }; + + pwm_d_pins1: pwm-d-pins1 { + mux { + groups = "pwm_d_x15"; + function = "pwm_d"; + }; + }; + + pwm_d_pins2: pwm-d-pins2 { + mux { + groups = "pwm_d_x13"; + function = "pwm_d"; + }; + }; + + pwm_d_pins3: pwm-d-pins3 { + mux { + groups = "pwm_d_x10"; + function = "pwm_d"; + }; + }; + + pwm_d_pins4: pwm-d-pins4 { + mux { + groups = "pwm_d_f"; + function = "pwm_d"; + }; + }; + + pwm_e_pins1: pwm-e-pins1 { + mux { + groups = "pwm_e_p"; + function = "pwm_e"; + }; + }; + + pwm_e_pins2: pwm-e-pins2 { + mux { + groups = "pwm_e_x16"; + function = "pwm_e"; + }; + }; + + pwm_e_pins3: pwm-e-pins3 { + mux { + groups = "pwm_e_x14"; + function = "pwm_e"; + }; + }; + + pwm_e_pins4: pwm-e-pins4 { + mux { + groups = "pwm_e_x2"; + function = "pwm_e"; + }; + }; + + pwm_e_pins5: pwm-e-pins5 { + mux { + groups = "pwm_e_f"; + function = "pwm_e"; + }; + }; + + pwm_e_pins6: pwm-e-pins6 { + mux { + groups = "pwm_e_a"; + function = "pwm_e"; + }; + }; + + pwm_f_pins1: pwm-f-pins1 { + mux { + groups = "pwm_f_b"; + function = "pwm_f"; + }; + }; + + pwm_f_pins2: pwm-f-pins2 { + mux { + groups = "pwm_f_x"; + function = "pwm_f"; + }; + }; + + pwm_f_pins3: pwm-f-pins3 { + mux { + groups = "pwm_f_f4"; + function = "pwm_f"; + }; + }; + + pwm_f_pins4: pwm-f-pins4 { + mux { + groups = "pwm_f_f12"; + function = "pwm_f"; + }; + }; + sdio_pins: sdio { mux0 { groups = "sdcard_d0_x", @@ -648,6 +830,26 @@ uart_AO_B: serial@2000 { status = "disabled"; }; + pwm_ab: pwm@2400 { + compatible = "amlogic,meson-a1-pwm"; + reg = <0x0 0x2400 0x0 0x20>; + #pwm-cells = <3>; + clocks = <&clkc_periphs CLKID_PWM_A>, + <&clkc_periphs CLKID_PWM_B>; + power-domains = <&pwrc PWRC_I2C_ID>; + status = "disabled"; + }; + + pwm_cd: pwm@2800 { + compatible = "amlogic,meson-a1-pwm"; + reg = <0x0 0x2800 0x0 0x20>; + #pwm-cells = <3>; + clocks = <&clkc_periphs CLKID_PWM_C>, + <&clkc_periphs CLKID_PWM_D>; + power-domains = <&pwrc PWRC_I2C_ID>; + status = "disabled"; + }; + saradc: adc@2c00 { compatible = "amlogic,meson-g12a-saradc", "amlogic,meson-saradc"; @@ -732,6 +934,16 @@ sec_AO: ao-secure@5a20 { amlogic,has-chip-id; }; + pwm_ef: pwm@5400 { + compatible = "amlogic,meson-a1-pwm"; + reg = <0x0 0x5400 0x0 0x20>; + #pwm-cells = <3>; + clocks = <&clkc_periphs CLKID_PWM_E>, + <&clkc_periphs CLKID_PWM_F>; + power-domains = <&pwrc PWRC_I2C_ID>; + status = "disabled"; + }; + clkc_pll: pll-clock-controller@7c80 { compatible = "amlogic,a1-pll-clkc"; reg = <0 0x7c80 0 0x18c>; -- 2.25.1