From patchwork Mon Dec 13 09:40:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12695857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A53D3C433F5 for ; Mon, 13 Dec 2021 09:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lsHeSEbW6FHb6zI60glFEL5qU1BIOIktVwImxFdPqLA=; b=lR1hNF1FJVW7Kb mWoCdCqS3C2Ks0fMKcb5iXVO5mmx4fL5IJyyV2rVRrC9meKURC3AWztVjZjyQhL6Y19k0LmnjIReA JIzGMR92jTi0GMiRuPJfWttZyzakW8NmlpaP7hQbxhzm+tbDmDqkSpi/jYfJGUpoe4RvV4ogXFNjW iPE4qdYyA/DTo+jlPPMUht1IGHa5pEdGFqTwNAHtDvJNXWijGYf5O9nbMkQm1psXluHSqLP9ZWG/t tS5cRP5bW7YrwaCXBNnQFJNjyUckgjryRALs6H8aJclrxc9xe0jZM047UCdZoPW3kfL1HFi0CVwG4 vhYd4FIxHsF3iNubncoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhuT-008jRk-8k; Mon, 13 Dec 2021 09:46:18 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhpF-008hSh-7f for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 09:40:54 +0000 Received: by mail-pg1-x536.google.com with SMTP id a23so9471205pgm.4 for ; Mon, 13 Dec 2021 01:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uZDeQb0Ps3ShCtM92tys7SAGXkYQwfQLQeqO425ONg4=; b=WsDhAlcwPpF6QMfxvJ2P67WsPkBZ2RwqiGsys5KG4ocv1l6Vw+/xOscJIzSU7zt4Uh 6TSc+/nrXr896LrOqoB9dVKioMfNxqgQOf2Tfn74zA7f6bK3GbW5XDHYsZNSe3YyWXfg 5HzPAycOG4R/UDENjRSZmYQU/AEROJ7Jd19qs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uZDeQb0Ps3ShCtM92tys7SAGXkYQwfQLQeqO425ONg4=; b=TsotFWVX4/AKJBZz8aLxhT63N/A2Y0xdBXTGQ5Vxil08SfZy6kMtjqh+N8CfE05ybA 1BRqAXiC7vTtfhFqALlMKR5KuBkYmpjG1VRIir6otAEQo+/7eKeG8wN0PsQJDMSv3skT 75vjMs9y93u4S4cAl3ttRUgkNuRXmD8cKiC0d433PLiKDb36p0PiM1PwixoJefeP+0/L 8puiRbMREinV1LIVH879bWwZuTHGKZD55/gOa1iqmJKWG1a/kxxxprgVkyEFKcm7aGJ4 qWwSFbH+Sctx3KtzcAWFeTz/TYSukEoCgndV/qQRapmtDTfaeOCWoUZ59taG2P/qNq+s OtQQ== X-Gm-Message-State: AOAM530cfrii+2aBY9MeRQYPJzsNDQ3eMIf2WL+AE8Z5EAxwhKOF6Zj8 nlwh66MGjB/hbCTSPA2mpjZXuoUWALFzlg== X-Google-Smtp-Source: ABdhPJzl9btVCCXeNVhmFmt7knCVA9TwgiOdvW4x8BLB7eiAe9MFR+j20F51njzr0AhPUe8MZDaPqg== X-Received: by 2002:a65:6a0a:: with SMTP id m10mr51429721pgu.82.1639388452047; Mon, 13 Dec 2021 01:40:52 -0800 (PST) Received: from shiro.work (p864106-ipngn200510sizuokaden.shizuoka.ocn.ne.jp. [180.9.58.106]) by smtp.googlemail.com with ESMTPSA id d195sm10237609pga.41.2021.12.13.01.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 01:40:51 -0800 (PST) From: Daniel Palmer To: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Palmer , Rob Herring Subject: [PATCH v3 1/5] dt-bindings: gpio: msc313: Add compatible for ssd20xd Date: Mon, 13 Dec 2021 18:40:32 +0900 Message-Id: <20211213094036.1787950-2-daniel@0x0f.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213094036.1787950-1-daniel@0x0f.com> References: <20211213094036.1787950-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_014053_318597_410E548A X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a compatible string for "ssd20xd" for the SigmaStar SSD201 and SSD202D chips. These chips are the same die with different memory bonded so they don't need their own strings. Signed-off-by: Daniel Palmer Acked-by: Rob Herring Reviewed-by: Linus Walleij --- Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml b/Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml index fe1e1c63ffe3..18fe90387b87 100644 --- a/Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml @@ -14,7 +14,9 @@ properties: pattern: "^gpio@[0-9a-f]+$" compatible: - const: mstar,msc313-gpio + enum: + - mstar,msc313-gpio + - sstar,ssd20xd-gpio reg: maxItems: 1 From patchwork Mon Dec 13 09:40:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12695859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59590C433EF for ; Mon, 13 Dec 2021 09:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SJf80DjyeTaeYsLrEj3JWUniC2zQM2cW7DTrWrJV3Oc=; b=pspPI2TLYcHjV0 8iPqQM4NcJSrB2YdN9GcOo+Hf1tor3NWPmzrbcmukrbbq7ni4ZhLl+/whK+IZ/hQ2cQaAm6nO1w2w uVkDNOIIXJStEB+Bafr5debjwCT0F0YlcM4JrNEU9+jKZxiTMG1N026FLOn0uAM45XNWvFDaFzEB+ Q847hFF2ZdkHMszeyDGAVgE8tC4PC9pBrzL7cu1CXgk9tvJUPq/gvKYoVKj8D3j/KfnjLZKs9Pd+9 VT0gbPdh70g2JQowxwnZOKHfQTrudXq62QySy0075NMGow6QcBor55F8KoeK40+v3cl49fks9oobb 6EYmiQR5x2zEQjFR5JAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhwK-008k4i-KS; Mon, 13 Dec 2021 09:48:13 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhpJ-008hTt-7K for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 09:40:59 +0000 Received: by mail-pf1-x430.google.com with SMTP id p13so14449878pfw.2 for ; Mon, 13 Dec 2021 01:40:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9o8HQVfoP3+l27I9am8Hc3DOZB6yzyhxwyrzK9BV+hI=; b=hLmJX+Xuln4uIw6oqcC9O2KHKM1XAUOokD7HV+AGTM6aOhAH9caynLY0XCt0xavjJ0 dSYl3SbnE59EoMSnyFHjc+hW80uJxP1xOr3rSKbnniThU4gVCqgqX2h34YVFpvnsZv6a jENd29U/aPeboNsTDOhGiYWzp0OOACn3WvsjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9o8HQVfoP3+l27I9am8Hc3DOZB6yzyhxwyrzK9BV+hI=; b=pSP+Wl5XqNKntdMLSs8zu2wZYW/EeWyoEu9t3snIVcDYgvnjix9cUzDhLZ7OPFKVgO XrTgMSbIOZ/WAZh2/yng04Emcy47L2uXhGYi0U9YUVfPD+WvMgtQ4rdaKAF011/xxjKP SrsPjcGUOc+XBShnk1lrxgGPu/Cu3qSjIomo1QC6cxTOI1O0jUZBe/KzlQuqZl+gE0rz ndWD9Ii1YbnJaE9b0yNqolic1KJwVWDNni8w7Jh8VAi6unuApLUv0OL1lHK4q6/IGhri /UgKf7U9FxbrqW3HoKfrYbHsWHLMYt9KoxnIVOkCwHfBVsaHEU7gOzpdKAIGNOguj3Af gu5Q== X-Gm-Message-State: AOAM532l3DXK4SYO5q3n2y4V27ciBQeKO8rUkeSprT4sR6KdEnb0fu+7 MvLPaWE0M2gdRrKTCoYamvm06g== X-Google-Smtp-Source: ABdhPJyJZhXGzj9JC3iUFG82e6bBL4FoRDCpn3aiN+wyDwhyEadohyBQT8JSeFy9ZJt3oEHcwXjXnQ== X-Received: by 2002:a63:b06:: with SMTP id 6mr538027pgl.502.1639388454288; Mon, 13 Dec 2021 01:40:54 -0800 (PST) Received: from shiro.work (p864106-ipngn200510sizuokaden.shizuoka.ocn.ne.jp. [180.9.58.106]) by smtp.googlemail.com with ESMTPSA id d195sm10237609pga.41.2021.12.13.01.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 01:40:54 -0800 (PST) From: Daniel Palmer To: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Palmer , Rob Herring Subject: [PATCH v3 2/5] dt-bindings: gpio: msc313: Add offsets for ssd20xd Date: Mon, 13 Dec 2021 18:40:33 +0900 Message-Id: <20211213094036.1787950-3-daniel@0x0f.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213094036.1787950-1-daniel@0x0f.com> References: <20211213094036.1787950-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_014057_307471_78DB2ED3 X-CRM114-Status: GOOD ( 10.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the gpio offsets for the SSD201 and SSD202D chips. Signed-off-by: Daniel Palmer Acked-by: Rob Herring Reviewed-by: Linus Walleij --- include/dt-bindings/gpio/msc313-gpio.h | 71 ++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/include/dt-bindings/gpio/msc313-gpio.h b/include/dt-bindings/gpio/msc313-gpio.h index 2dd56683d3c1..5458c6580a02 100644 --- a/include/dt-bindings/gpio/msc313-gpio.h +++ b/include/dt-bindings/gpio/msc313-gpio.h @@ -50,4 +50,75 @@ #define MSC313_GPIO_SPI0_DI (MSC313_GPIO_SPI0 + 2) #define MSC313_GPIO_SPI0_DO (MSC313_GPIO_SPI0 + 3) +/* SSD20x */ +#define SSD20XD_GPIO_FUART 0 +#define SSD20XD_GPIO_FUART_RX (SSD20XD_GPIO_FUART + 0) +#define SSD20XD_GPIO_FUART_TX (SSD20XD_GPIO_FUART + 1) +#define SSD20XD_GPIO_FUART_CTS (SSD20XD_GPIO_FUART + 2) +#define SSD20XD_GPIO_FUART_RTS (SSD20XD_GPIO_FUART + 3) + +#define SSD20XD_GPIO_SD (SSD20XD_GPIO_FUART_RTS + 1) +#define SSD20XD_GPIO_SD_CLK (SSD20XD_GPIO_SD + 0) +#define SSD20XD_GPIO_SD_CMD (SSD20XD_GPIO_SD + 1) +#define SSD20XD_GPIO_SD_D0 (SSD20XD_GPIO_SD + 2) +#define SSD20XD_GPIO_SD_D1 (SSD20XD_GPIO_SD + 3) +#define SSD20XD_GPIO_SD_D2 (SSD20XD_GPIO_SD + 4) +#define SSD20XD_GPIO_SD_D3 (SSD20XD_GPIO_SD + 5) + +#define SSD20XD_GPIO_UART0 (SSD20XD_GPIO_SD_D3 + 1) +#define SSD20XD_GPIO_UART0_RX (SSD20XD_GPIO_UART0 + 0) +#define SSD20XD_GPIO_UART0_TX (SSD20XD_GPIO_UART0 + 1) + +#define SSD20XD_GPIO_UART1 (SSD20XD_GPIO_UART0_TX + 1) +#define SSD20XD_GPIO_UART1_RX (SSD20XD_GPIO_UART1 + 0) +#define SSD20XD_GPIO_UART1_TX (SSD20XD_GPIO_UART1 + 1) + +#define SSD20XD_GPIO_TTL (SSD20XD_GPIO_UART1_TX + 1) +#define SSD20XD_GPIO_TTL0 (SSD20XD_GPIO_TTL + 0) +#define SSD20XD_GPIO_TTL1 (SSD20XD_GPIO_TTL + 1) +#define SSD20XD_GPIO_TTL2 (SSD20XD_GPIO_TTL + 2) +#define SSD20XD_GPIO_TTL3 (SSD20XD_GPIO_TTL + 3) +#define SSD20XD_GPIO_TTL4 (SSD20XD_GPIO_TTL + 4) +#define SSD20XD_GPIO_TTL5 (SSD20XD_GPIO_TTL + 5) +#define SSD20XD_GPIO_TTL6 (SSD20XD_GPIO_TTL + 6) +#define SSD20XD_GPIO_TTL7 (SSD20XD_GPIO_TTL + 7) +#define SSD20XD_GPIO_TTL8 (SSD20XD_GPIO_TTL + 8) +#define SSD20XD_GPIO_TTL9 (SSD20XD_GPIO_TTL + 9) +#define SSD20XD_GPIO_TTL10 (SSD20XD_GPIO_TTL + 10) +#define SSD20XD_GPIO_TTL11 (SSD20XD_GPIO_TTL + 11) +#define SSD20XD_GPIO_TTL12 (SSD20XD_GPIO_TTL + 12) +#define SSD20XD_GPIO_TTL13 (SSD20XD_GPIO_TTL + 13) +#define SSD20XD_GPIO_TTL14 (SSD20XD_GPIO_TTL + 14) +#define SSD20XD_GPIO_TTL15 (SSD20XD_GPIO_TTL + 15) +#define SSD20XD_GPIO_TTL16 (SSD20XD_GPIO_TTL + 16) +#define SSD20XD_GPIO_TTL17 (SSD20XD_GPIO_TTL + 17) +#define SSD20XD_GPIO_TTL18 (SSD20XD_GPIO_TTL + 18) +#define SSD20XD_GPIO_TTL19 (SSD20XD_GPIO_TTL + 19) +#define SSD20XD_GPIO_TTL20 (SSD20XD_GPIO_TTL + 20) +#define SSD20XD_GPIO_TTL21 (SSD20XD_GPIO_TTL + 21) +#define SSD20XD_GPIO_TTL22 (SSD20XD_GPIO_TTL + 22) +#define SSD20XD_GPIO_TTL23 (SSD20XD_GPIO_TTL + 23) +#define SSD20XD_GPIO_TTL24 (SSD20XD_GPIO_TTL + 24) +#define SSD20XD_GPIO_TTL25 (SSD20XD_GPIO_TTL + 25) +#define SSD20XD_GPIO_TTL26 (SSD20XD_GPIO_TTL + 26) +#define SSD20XD_GPIO_TTL27 (SSD20XD_GPIO_TTL + 27) + +#define SSD20XD_GPIO_GPIO (SSD20XD_GPIO_TTL27 + 1) +#define SSD20XD_GPIO_GPIO0 (SSD20XD_GPIO_GPIO + 0) +#define SSD20XD_GPIO_GPIO1 (SSD20XD_GPIO_GPIO + 1) +#define SSD20XD_GPIO_GPIO2 (SSD20XD_GPIO_GPIO + 2) +#define SSD20XD_GPIO_GPIO3 (SSD20XD_GPIO_GPIO + 3) +#define SSD20XD_GPIO_GPIO4 (SSD20XD_GPIO_GPIO + 4) +#define SSD20XD_GPIO_GPIO5 (SSD20XD_GPIO_GPIO + 5) +#define SSD20XD_GPIO_GPIO6 (SSD20XD_GPIO_GPIO + 6) +#define SSD20XD_GPIO_GPIO7 (SSD20XD_GPIO_GPIO + 7) +#define SSD20XD_GPIO_GPIO10 (SSD20XD_GPIO_GPIO + 8) +#define SSD20XD_GPIO_GPIO11 (SSD20XD_GPIO_GPIO + 9) +#define SSD20XD_GPIO_GPIO12 (SSD20XD_GPIO_GPIO + 10) +#define SSD20XD_GPIO_GPIO13 (SSD20XD_GPIO_GPIO + 11) +#define SSD20XD_GPIO_GPIO14 (SSD20XD_GPIO_GPIO + 12) +#define SSD20XD_GPIO_GPIO85 (SSD20XD_GPIO_GPIO + 13) +#define SSD20XD_GPIO_GPIO86 (SSD20XD_GPIO_GPIO + 14) +#define SSD20XD_GPIO_GPIO90 (SSD20XD_GPIO_GPIO + 15) + #endif /* _DT_BINDINGS_MSC313_GPIO_H */ From patchwork Mon Dec 13 09:40:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12695858 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48419C43217 for ; Mon, 13 Dec 2021 09:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SRvU8Owh+UsCb8q55GvrJKmKC6tzWALQKLz/mHcqRMo=; b=K232aXwgSua9eg wbnQKzSG5DmO6CMopEMBjYMwBri+sMli1SbC1+lqq66zhZcF5rEMDNg+Jc5zs6uf5lzc8/36AIFry o2GJij+vityM1AcwS3sLX+CGCHUMrqv3XQ103QgnapGSMksm9fzHnEREZHGeGPUc7qoOOnKcAVfF4 p8dIJzjBQ7RHgKWUDR6zlPfTV2HUub/XgaGkOr4wEd8f043E7SGdK2A3lC8ZwWvT7HGpykcYrvVGg syobXUzLR26/akstptSs7X0FD+FkwKvLht9+Iv8e5q9nQS64nWTPx18TG5mn3LbYEi10SuaiJkvIO 4twEMNGo0W14Nd6FSmpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhvP-008jn7-DC; Mon, 13 Dec 2021 09:47:17 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhpJ-008hUV-Il for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 09:40:59 +0000 Received: by mail-pg1-x532.google.com with SMTP id 200so5244957pgg.3 for ; Mon, 13 Dec 2021 01:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+PLgOGUr24N3pCfDF0pm4vBw2jPEHVpOf1ojIAGQtAc=; b=TCXK6mvqNJC7RUZVwMT8njl9FfId+1tDmDUOhMpo9QmLfg9Idm63tAxC/8kUYCtSpa 6w0N7qb/e01yjEnKfRFzcAS4fvSEIn8npxTL++nHc2ThpwxVe4DDU2IdLkRZMi5yYWdX 7As7ZhM0Bd4P1WpM/rYtYMumJSeCAvzJnIsIY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+PLgOGUr24N3pCfDF0pm4vBw2jPEHVpOf1ojIAGQtAc=; b=rfs4rFr89qQxPQ6LdHt0bxB30LaO8KkEnT0HSVYWJhigp1caslk6gtJGoC44tY7iEO dafsRyEYFns2Vrt4eiss9rkgM/Gk8v9AzUpjZ0hbdbT3hb2JQbTZK5Z5QHjUPnoJGR+x 7xBWar84SwV01C9HQ45agP6YwCeOmauEFRSn9jbXps+lwCRc0FdGjss07qb2/NoK1XqI N6I5NVyU43jDETHJOmEI5lifnAWunPfK6lSEkNxKCubaItMRYOxLnjSulAZpLJGrKOK8 nhhwNQWqqs46PRONz2wF6jPWlWZOJ3yKfyW6HJ9OaIr3p/+G37glfjop0XWtCIHcvMY/ Px/w== X-Gm-Message-State: AOAM531AWrqLGJeHJN+ju0Y4AzsTlj7B/UjCr4pao+j+t736UhdRWcq8 iAekkvAMj63lnykCrulPD4DetA== X-Google-Smtp-Source: ABdhPJwnIC/1GG8HGXvC3beYsltFQ8bMno1f7ktTReaDdiWgvDzepwh8gUYFEaTxeqRdekJDmu2ciQ== X-Received: by 2002:a62:7803:0:b0:494:64ef:7bd7 with SMTP id t3-20020a627803000000b0049464ef7bd7mr32508766pfc.85.1639388456397; Mon, 13 Dec 2021 01:40:56 -0800 (PST) Received: from shiro.work (p864106-ipngn200510sizuokaden.shizuoka.ocn.ne.jp. [180.9.58.106]) by smtp.googlemail.com with ESMTPSA id d195sm10237609pga.41.2021.12.13.01.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 01:40:55 -0800 (PST) From: Daniel Palmer To: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Palmer Subject: [PATCH v3 3/5] gpio: msc313: Code clean ups Date: Mon, 13 Dec 2021 18:40:34 +0900 Message-Id: <20211213094036.1787950-4-daniel@0x0f.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213094036.1787950-1-daniel@0x0f.com> References: <20211213094036.1787950-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_014057_661950_22DE58F7 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org - Remove the unneeded assignment of ret before returning it. - Remove an unneeded blank line Signed-off-by: Daniel Palmer Reviewed-by: Linus Walleij --- drivers/gpio/gpio-msc313.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c index da31a5ff7a2b..a894bafbd4c3 100644 --- a/drivers/gpio/gpio-msc313.c +++ b/drivers/gpio/gpio-msc313.c @@ -344,7 +344,6 @@ static int msc313_gpio_probe(struct platform_device *pdev) struct irq_domain *parent_domain; struct device_node *parent_node; struct device *dev = &pdev->dev; - int ret; match_data = of_device_get_match_data(dev); if (!match_data) @@ -399,8 +398,7 @@ static int msc313_gpio_probe(struct platform_device *pdev) gpioirqchip->handler = handle_bad_irq; gpioirqchip->default_type = IRQ_TYPE_NONE; - ret = devm_gpiochip_add_data(dev, gpiochip, gpio); - return ret; + return devm_gpiochip_add_data(dev, gpiochip, gpio); } static int msc313_gpio_remove(struct platform_device *pdev) @@ -456,5 +454,4 @@ static struct platform_driver msc313_gpio_driver = { .probe = msc313_gpio_probe, .remove = msc313_gpio_remove, }; - builtin_platform_driver(msc313_gpio_driver); From patchwork Mon Dec 13 09:40:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12695860 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42F30C433F5 for ; Mon, 13 Dec 2021 09:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1nZb/fSP22Q+KUSZLSmoVwGFAnDyJ2YypThSIWNObDU=; b=lM4xAa3IqixKcM SdcV+tS+5DkkwOKs6+idn4QusCSKLnJGDJPwb261O9P8HoFItu6trLeE+gHoiWoaMTs2V04NrhOt4 oSFfO+HUCS3ituEo1oG4cma2adNtMOIluLQliSb3CQpOgy56T/2Cxjox890DgD1qUZuL804Op/zHE DzvBG32T5O0MIPQWD9rVKhO+kHojNc3EowGNUih43iJKKc76lq7jnVi03f5A+U4+j0m7Qz+QSC5cz VbAChc2oOPR8I9O4Ayw0yg8SwbLuGzK0fkMip8wvQtbMLWdw+lZVQVSKurqWi2JsDKatpnqPPgSaS 20uZdcTvjeF0xRNfGX0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhxz-008kjI-GS; Mon, 13 Dec 2021 09:49:57 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhpM-008hVV-35 for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 09:41:02 +0000 Received: by mail-pg1-x52c.google.com with SMTP id r138so14039730pgr.13 for ; Mon, 13 Dec 2021 01:40:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FGGrd+sQWogr+s0RnXQ1NKuB1EhCPzQoRxC06aRdn1o=; b=LovcL8e6QW8MfLCzvHL0IxVDTARNT+pKOlty2CdVyr95+QPxLKyRpDJ2WFUAVcJD2f 63a2HM6Kk8w+u7ZNSpMJGdqYJDrvRdXIU3J2T3IMSQ81GdtEPV1r7jO7E6LPIn/C/YNx mjw/EwBIILqw9AoWLGcMGEKw3vF3hufaiFEWA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FGGrd+sQWogr+s0RnXQ1NKuB1EhCPzQoRxC06aRdn1o=; b=ZcetWPDBheW/VGuAW5Dnxpwaiq6+7Lnpr7dqMdW+/sM6w4tMEnknLkhG3ll5wpPdpH 0mxa7d6RE4AK2KglC+SMedZ08ZEwA16MAFjhetiAm/XgsqlYNtTyxY4gL9WRcu3PWwR4 xIKIXo72kQ7CZfl+bRY0w+WT5u5LoJS44KzXhAKP4FqkfrfIPCjdHrcqnDHEJ1VxjYNt Z5nxfBl8Aq/UZD8PFID1EugON04+u8+1JDk326xcehLwiKQc/oRN+0LvCPIs3DyShBrb LaeJ9P4a/Ioor+vWCz4CJJ9SMwKRHxdT6gw6F4mVi6bLnLZZfnkDa6EAbmXRbRUH8578 vq0w== X-Gm-Message-State: AOAM532yd1sfjsNs9M7lO6Jo06aT/f0Mv+7aFMU0ab9XJHYhcWt6GkX2 JZtbiQ2Mmuj9+tgB8qQyXV9VKg== X-Google-Smtp-Source: ABdhPJwV70/KPMEFPfxqDaG78GYpI38uVZbeqA7EsHc7m7Jt4TNbgjVg3OgkZKKCSf3csAwDXOeTNA== X-Received: by 2002:a63:8bca:: with SMTP id j193mr14213083pge.458.1639388458459; Mon, 13 Dec 2021 01:40:58 -0800 (PST) Received: from shiro.work (p864106-ipngn200510sizuokaden.shizuoka.ocn.ne.jp. [180.9.58.106]) by smtp.googlemail.com with ESMTPSA id d195sm10237609pga.41.2021.12.13.01.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 01:40:58 -0800 (PST) From: Daniel Palmer To: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Palmer Subject: [PATCH v3 4/5] gpio: msc313: Add support for SSD201 and SSD202D Date: Mon, 13 Dec 2021 18:40:35 +0900 Message-Id: <20211213094036.1787950-5-daniel@0x0f.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213094036.1787950-1-daniel@0x0f.com> References: <20211213094036.1787950-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_014100_172369_E1013EB6 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds GPIO support for the SSD201 and SSD202D chips. Signed-off-by: Daniel Palmer Reviewed-by: Linus Walleij --- drivers/gpio/gpio-msc313.c | 261 +++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c index a894bafbd4c3..b2c90bdd39d0 100644 --- a/drivers/gpio/gpio-msc313.c +++ b/drivers/gpio/gpio-msc313.c @@ -221,6 +221,263 @@ static const unsigned int msc313_offsets[] = { }; MSC313_GPIO_CHIPDATA(msc313); + +/* + * Unlike the msc313(e) the ssd20xd have a bunch of pins + * that are actually called gpio probably because they + * have no dedicated function. + */ +#define SSD20XD_PINNAME_GPIO0 "gpio0" +#define SSD20XD_PINNAME_GPIO1 "gpio1" +#define SSD20XD_PINNAME_GPIO2 "gpio2" +#define SSD20XD_PINNAME_GPIO3 "gpio3" +#define SSD20XD_PINNAME_GPIO4 "gpio4" +#define SSD20XD_PINNAME_GPIO5 "gpio5" +#define SSD20XD_PINNAME_GPIO6 "gpio6" +#define SSD20XD_PINNAME_GPIO7 "gpio7" +#define SSD20XD_PINNAME_GPIO10 "gpio10" +#define SSD20XD_PINNAME_GPIO11 "gpio11" +#define SSD20XD_PINNAME_GPIO12 "gpio12" +#define SSD20XD_PINNAME_GPIO13 "gpio13" +#define SSD20XD_PINNAME_GPIO14 "gpio14" +#define SSD20XD_PINNAME_GPIO85 "gpio85" +#define SSD20XD_PINNAME_GPIO86 "gpio86" +#define SSD20XD_PINNAME_GPIO90 "gpio90" + +#define SSD20XD_GPIO_NAMES SSD20XD_PINNAME_GPIO0, \ + SSD20XD_PINNAME_GPIO1, \ + SSD20XD_PINNAME_GPIO2, \ + SSD20XD_PINNAME_GPIO3, \ + SSD20XD_PINNAME_GPIO4, \ + SSD20XD_PINNAME_GPIO5, \ + SSD20XD_PINNAME_GPIO6, \ + SSD20XD_PINNAME_GPIO7, \ + SSD20XD_PINNAME_GPIO10, \ + SSD20XD_PINNAME_GPIO11, \ + SSD20XD_PINNAME_GPIO12, \ + SSD20XD_PINNAME_GPIO13, \ + SSD20XD_PINNAME_GPIO14, \ + SSD20XD_PINNAME_GPIO85, \ + SSD20XD_PINNAME_GPIO86, \ + SSD20XD_PINNAME_GPIO90 + +#define SSD20XD_GPIO_OFF_GPIO0 0x0 +#define SSD20XD_GPIO_OFF_GPIO1 0x4 +#define SSD20XD_GPIO_OFF_GPIO2 0x8 +#define SSD20XD_GPIO_OFF_GPIO3 0xc +#define SSD20XD_GPIO_OFF_GPIO4 0x10 +#define SSD20XD_GPIO_OFF_GPIO5 0x14 +#define SSD20XD_GPIO_OFF_GPIO6 0x18 +#define SSD20XD_GPIO_OFF_GPIO7 0x1c +#define SSD20XD_GPIO_OFF_GPIO10 0x28 +#define SSD20XD_GPIO_OFF_GPIO11 0x2c +#define SSD20XD_GPIO_OFF_GPIO12 0x30 +#define SSD20XD_GPIO_OFF_GPIO13 0x34 +#define SSD20XD_GPIO_OFF_GPIO14 0x38 +#define SSD20XD_GPIO_OFF_GPIO85 0x100 +#define SSD20XD_GPIO_OFF_GPIO86 0x104 +#define SSD20XD_GPIO_OFF_GPIO90 0x114 + +#define SSD20XD_GPIO_OFFSETS SSD20XD_GPIO_OFF_GPIO0, \ + SSD20XD_GPIO_OFF_GPIO1, \ + SSD20XD_GPIO_OFF_GPIO2, \ + SSD20XD_GPIO_OFF_GPIO3, \ + SSD20XD_GPIO_OFF_GPIO4, \ + SSD20XD_GPIO_OFF_GPIO5, \ + SSD20XD_GPIO_OFF_GPIO6, \ + SSD20XD_GPIO_OFF_GPIO7, \ + SSD20XD_GPIO_OFF_GPIO10, \ + SSD20XD_GPIO_OFF_GPIO11, \ + SSD20XD_GPIO_OFF_GPIO12, \ + SSD20XD_GPIO_OFF_GPIO13, \ + SSD20XD_GPIO_OFF_GPIO14, \ + SSD20XD_GPIO_OFF_GPIO85, \ + SSD20XD_GPIO_OFF_GPIO86, \ + SSD20XD_GPIO_OFF_GPIO90 + +/* "ttl" pins lcd interface pins */ +#define SSD20XD_PINNAME_TTL0 "ttl0" +#define SSD20XD_PINNAME_TTL1 "ttl1" +#define SSD20XD_PINNAME_TTL2 "ttl2" +#define SSD20XD_PINNAME_TTL3 "ttl3" +#define SSD20XD_PINNAME_TTL4 "ttl4" +#define SSD20XD_PINNAME_TTL5 "ttl5" +#define SSD20XD_PINNAME_TTL6 "ttl6" +#define SSD20XD_PINNAME_TTL7 "ttl7" +#define SSD20XD_PINNAME_TTL8 "ttl8" +#define SSD20XD_PINNAME_TTL9 "ttl9" +#define SSD20XD_PINNAME_TTL10 "ttl10" +#define SSD20XD_PINNAME_TTL11 "ttl11" +#define SSD20XD_PINNAME_TTL12 "ttl12" +#define SSD20XD_PINNAME_TTL13 "ttl13" +#define SSD20XD_PINNAME_TTL14 "ttl14" +#define SSD20XD_PINNAME_TTL15 "ttl15" +#define SSD20XD_PINNAME_TTL16 "ttl16" +#define SSD20XD_PINNAME_TTL17 "ttl17" +#define SSD20XD_PINNAME_TTL18 "ttl18" +#define SSD20XD_PINNAME_TTL19 "ttl19" +#define SSD20XD_PINNAME_TTL20 "ttl20" +#define SSD20XD_PINNAME_TTL21 "ttl21" +#define SSD20XD_PINNAME_TTL22 "ttl22" +#define SSD20XD_PINNAME_TTL23 "ttl23" +#define SSD20XD_PINNAME_TTL24 "ttl24" +#define SSD20XD_PINNAME_TTL25 "ttl25" +#define SSD20XD_PINNAME_TTL26 "ttl26" +#define SSD20XD_PINNAME_TTL27 "ttl27" + +#define SSD20XD_TTL_PINNAMES SSD20XD_PINNAME_TTL0, \ + SSD20XD_PINNAME_TTL1, \ + SSD20XD_PINNAME_TTL2, \ + SSD20XD_PINNAME_TTL3, \ + SSD20XD_PINNAME_TTL4, \ + SSD20XD_PINNAME_TTL5, \ + SSD20XD_PINNAME_TTL6, \ + SSD20XD_PINNAME_TTL7, \ + SSD20XD_PINNAME_TTL8, \ + SSD20XD_PINNAME_TTL9, \ + SSD20XD_PINNAME_TTL10, \ + SSD20XD_PINNAME_TTL11, \ + SSD20XD_PINNAME_TTL12, \ + SSD20XD_PINNAME_TTL13, \ + SSD20XD_PINNAME_TTL14, \ + SSD20XD_PINNAME_TTL15, \ + SSD20XD_PINNAME_TTL16, \ + SSD20XD_PINNAME_TTL17, \ + SSD20XD_PINNAME_TTL18, \ + SSD20XD_PINNAME_TTL19, \ + SSD20XD_PINNAME_TTL20, \ + SSD20XD_PINNAME_TTL21, \ + SSD20XD_PINNAME_TTL22, \ + SSD20XD_PINNAME_TTL23, \ + SSD20XD_PINNAME_TTL24, \ + SSD20XD_PINNAME_TTL25, \ + SSD20XD_PINNAME_TTL26, \ + SSD20XD_PINNAME_TTL27 + +#define SSD20XD_TTL_OFFSET_TTL0 0x80 +#define SSD20XD_TTL_OFFSET_TTL1 0x84 +#define SSD20XD_TTL_OFFSET_TTL2 0x88 +#define SSD20XD_TTL_OFFSET_TTL3 0x8c +#define SSD20XD_TTL_OFFSET_TTL4 0x90 +#define SSD20XD_TTL_OFFSET_TTL5 0x94 +#define SSD20XD_TTL_OFFSET_TTL6 0x98 +#define SSD20XD_TTL_OFFSET_TTL7 0x9c +#define SSD20XD_TTL_OFFSET_TTL8 0xa0 +#define SSD20XD_TTL_OFFSET_TTL9 0xa4 +#define SSD20XD_TTL_OFFSET_TTL10 0xa8 +#define SSD20XD_TTL_OFFSET_TTL11 0xac +#define SSD20XD_TTL_OFFSET_TTL12 0xb0 +#define SSD20XD_TTL_OFFSET_TTL13 0xb4 +#define SSD20XD_TTL_OFFSET_TTL14 0xb8 +#define SSD20XD_TTL_OFFSET_TTL15 0xbc +#define SSD20XD_TTL_OFFSET_TTL16 0xc0 +#define SSD20XD_TTL_OFFSET_TTL17 0xc4 +#define SSD20XD_TTL_OFFSET_TTL18 0xc8 +#define SSD20XD_TTL_OFFSET_TTL19 0xcc +#define SSD20XD_TTL_OFFSET_TTL20 0xd0 +#define SSD20XD_TTL_OFFSET_TTL21 0xd4 +#define SSD20XD_TTL_OFFSET_TTL22 0xd8 +#define SSD20XD_TTL_OFFSET_TTL23 0xdc +#define SSD20XD_TTL_OFFSET_TTL24 0xe0 +#define SSD20XD_TTL_OFFSET_TTL25 0xe4 +#define SSD20XD_TTL_OFFSET_TTL26 0xe8 +#define SSD20XD_TTL_OFFSET_TTL27 0xec + +#define SSD20XD_TTL_OFFSETS SSD20XD_TTL_OFFSET_TTL0, \ + SSD20XD_TTL_OFFSET_TTL1, \ + SSD20XD_TTL_OFFSET_TTL2, \ + SSD20XD_TTL_OFFSET_TTL3, \ + SSD20XD_TTL_OFFSET_TTL4, \ + SSD20XD_TTL_OFFSET_TTL5, \ + SSD20XD_TTL_OFFSET_TTL6, \ + SSD20XD_TTL_OFFSET_TTL7, \ + SSD20XD_TTL_OFFSET_TTL8, \ + SSD20XD_TTL_OFFSET_TTL9, \ + SSD20XD_TTL_OFFSET_TTL10, \ + SSD20XD_TTL_OFFSET_TTL11, \ + SSD20XD_TTL_OFFSET_TTL12, \ + SSD20XD_TTL_OFFSET_TTL13, \ + SSD20XD_TTL_OFFSET_TTL14, \ + SSD20XD_TTL_OFFSET_TTL15, \ + SSD20XD_TTL_OFFSET_TTL16, \ + SSD20XD_TTL_OFFSET_TTL17, \ + SSD20XD_TTL_OFFSET_TTL18, \ + SSD20XD_TTL_OFFSET_TTL19, \ + SSD20XD_TTL_OFFSET_TTL20, \ + SSD20XD_TTL_OFFSET_TTL21, \ + SSD20XD_TTL_OFFSET_TTL22, \ + SSD20XD_TTL_OFFSET_TTL23, \ + SSD20XD_TTL_OFFSET_TTL24, \ + SSD20XD_TTL_OFFSET_TTL25, \ + SSD20XD_TTL_OFFSET_TTL26, \ + SSD20XD_TTL_OFFSET_TTL27 + +/* On the ssd20xd the two normal uarts have dedicated pins */ +#define SSD20XD_PINNAME_UART0_RX "uart0_rx" +#define SSD20XD_PINNAME_UART0_TX "uart0_tx" + +#define SSD20XD_UART0_NAMES \ + SSD20XD_PINNAME_UART0_RX, \ + SSD20XD_PINNAME_UART0_TX + +#define SSD20XD_PINNAME_UART1_RX "uart1_rx" +#define SSD20XD_PINNAME_UART1_TX "uart1_tx" + +#define SSD20XD_UART1_NAMES \ + SSD20XD_PINNAME_UART1_RX, \ + SSD20XD_PINNAME_UART1_TX + +#define SSD20XD_OFF_UART0_RX 0x60 +#define SSD20XD_OFF_UART0_TX 0x64 + +#define SSD20XD_UART0_OFFSETS \ + SSD20XD_OFF_UART0_RX, \ + SSD20XD_OFF_UART0_TX + +#define SSD20XD_OFF_UART1_RX 0x68 +#define SSD20XD_OFF_UART1_TX 0x6c + +#define SSD20XD_UART1_OFFSETS \ + SSD20XD_OFF_UART1_RX, \ + SSD20XD_OFF_UART1_TX + +/* + * ssd20x has the same pin names but different ordering + * of the registers that control the gpio. + */ +#define SSD20XD_OFF_SD_D0 0x140 +#define SSD20XD_OFF_SD_D1 0x144 +#define SSD20XD_OFF_SD_D2 0x148 +#define SSD20XD_OFF_SD_D3 0x14c +#define SSD20XD_OFF_SD_CMD 0x150 +#define SSD20XD_OFF_SD_CLK 0x154 + +#define SSD20XD_SD_OFFSETS SSD20XD_OFF_SD_CLK, \ + SSD20XD_OFF_SD_CMD, \ + SSD20XD_OFF_SD_D0, \ + SSD20XD_OFF_SD_D1, \ + SSD20XD_OFF_SD_D2, \ + SSD20XD_OFF_SD_D3 + +static const char * const ssd20xd_names[] = { + FUART_NAMES, + SD_NAMES, + SSD20XD_UART0_NAMES, + SSD20XD_UART1_NAMES, + SSD20XD_TTL_PINNAMES, + SSD20XD_GPIO_NAMES, +}; + +static const unsigned int ssd20xd_offsets[] = { + FUART_OFFSETS, + SSD20XD_SD_OFFSETS, + SSD20XD_UART0_OFFSETS, + SSD20XD_UART1_OFFSETS, + SSD20XD_TTL_OFFSETS, + SSD20XD_GPIO_OFFSETS, +}; + +MSC313_GPIO_CHIPDATA(ssd20xd); #endif struct msc313_gpio { @@ -412,6 +669,10 @@ static const struct of_device_id msc313_gpio_of_match[] = { .compatible = "mstar,msc313-gpio", .data = &msc313_data, }, + { + .compatible = "sstar,ssd20xd-gpio", + .data = &ssd20xd_data, + }, #endif { } }; From patchwork Mon Dec 13 09:40:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 12695861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34AC0C4332F for ; Mon, 13 Dec 2021 09:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SR/XkoavLvGnnB0tpLfva2WgfzzA9GM6ZIbDpAMWbPU=; b=esFqusrBlFRWla tOW1M736zDc4YdcHY6AGPJB9P+MTzQXd1XokDO9KlM8pzX7GJ0OakOAnDAkXwMB0lHhnAX/a+l7dl GWXw2kcwdb/AmYYc67Q1XJWKxxIJnahSWar0/u5l+QUcFk5ycqmZEw81fE0/KLr8QccEDJhgPCXLE NDLsrMsw9EUVTN/scf7khApO8vJKdvDqMzHMi82X6yt8fDUjg/j0ZimVpnfHsgi5mcZzBN88BpknN cqjK187uOJKbi3jUoVtJ0pLu4HEeLYT+3M60SySHAf46xi+pgQsB/rahJx0uOpGgTcFz1yXdoLX9/ rRJC/WbtqR+SaAAVVCDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhzh-008lgI-PN; Mon, 13 Dec 2021 09:51:42 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwhpO-008hWN-Eb for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 09:41:03 +0000 Received: by mail-pg1-x530.google.com with SMTP id d11so5417321pgl.1 for ; Mon, 13 Dec 2021 01:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SyI4CrxhxjGs4U1AItbH04mOIfBjvOwSAkZHtBeA6Zg=; b=MX0I7o11RVxfLQX6hcbyPebvWZP/qh+9KfyXgxOQsIcWqztDfvoyEDJc8rKXoXoAc5 V2oXQlEnOKkOSK19/PwMBHVwgaevaut0Thnx3XoMCm4OMr2xGIyg4F9qk5+sANxs5pYF s641u8j196wmdy8T+4gn7S2ycrB7NQIF6KwU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SyI4CrxhxjGs4U1AItbH04mOIfBjvOwSAkZHtBeA6Zg=; b=Mcew0qciBH1CK67IUKRTanxjzC7ryoeitc14tzkfPHfTsPLmVj6y71ILX2Yl5YMBDI Q9JzkXeouzH4lRAEzOun3SES/gVWSa/263AcGsI7z1nvdb1AhRJAbj0GaLSGXan6Fst6 6gZoorQeOEHpcTfPuXDttolhZS8dwydU7hfU/6Rj1Bs/kDAdSjwuMMbaCZTBbsSgOdeI cqcWT+tCtcZsikPFQI88pUBMOg17l5GmB9+4fv+2cYEtRanuFKK/2bWR2DhLHHPpVLnP xp3VRBw5KXoKcvrIHkhLYlsmc4Vo7PZLz0fAIZtgNMlTGcKA0unb3bUis3SlSYkRKXOR J0lA== X-Gm-Message-State: AOAM530CHh3J9dECAiTCYLiZ6uMIdjyjBY/h1qA66ZCgX6+8RhsUgLWX 1VpPejDl5UFsT9NFG1dBezlShA== X-Google-Smtp-Source: ABdhPJwi4MogYiq2WtTnKfk5V1Z8klqo9x/WnYX4zftDB46L0eAqZXBBuZS9aouvemOMLPDEY/iBiQ== X-Received: by 2002:a05:6a00:9a3:b0:49f:bf9b:3192 with SMTP id u35-20020a056a0009a300b0049fbf9b3192mr32444060pfg.44.1639388460570; Mon, 13 Dec 2021 01:41:00 -0800 (PST) Received: from shiro.work (p864106-ipngn200510sizuokaden.shizuoka.ocn.ne.jp. [180.9.58.106]) by smtp.googlemail.com with ESMTPSA id d195sm10237609pga.41.2021.12.13.01.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 01:41:00 -0800 (PST) From: Daniel Palmer To: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Palmer , Romain Perier Subject: [PATCH v3 5/5] ARM: dts: mstar: Set gpio compatible for ssd20xd Date: Mon, 13 Dec 2021 18:40:36 +0900 Message-Id: <20211213094036.1787950-6-daniel@0x0f.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213094036.1787950-1-daniel@0x0f.com> References: <20211213094036.1787950-1-daniel@0x0f.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_014102_555545_845A10FB X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now there is gpio support for ssd20xd set the right compatible in the gpio node. Signed-off-by: Daniel Palmer Reviewed-by: Romain Perier Reviewed-by: Linus Walleij --- arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi b/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi index 7a5e28b33f96..6f067da61ba3 100644 --- a/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi +++ b/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi @@ -6,6 +6,11 @@ #include "mstar-infinity2m.dtsi" +&gpio { + compatible = "sstar,ssd20xd-gpio"; + status = "okay"; +}; + &smpctrl { compatible = "sstar,ssd201-smpctrl", "mstar,smpctrl"; status = "okay";