From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 A373C310635 for ; Thu, 18 Sep 2025 15:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758209797; cv=none; b=HGIom/HD1a/g6PwsPkI9XkJoN1X3cw62snHIls0/MK+tcQL1/hu1cKqPJDLZLrL5JtZCUVmPrIHyx+qCiUyNjlR1HhmxqGrRRCpdHqWSbOEjEdgQDZ5vekG1GYPIOkB5FyVFynbdn0+nmYGx0lmzDCWBp5WSjinz5KsNs6BGgKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758209797; c=relaxed/simple; bh=2XfIujXXVMp1DEX98lbfbXgbE4jTn2mD3iCAdMOp640=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rizqi13QgpndrZCTAUVdhwbDjpVDy8cfKsvgXvkT8uTkKcNt+zaZ5iqdcw0+lWvGz/C+lx+rChR1XT8gpmXy29VZgTss+rmqYoZdTzmMD6w6t/Ig8+PvX78XS4vHQ1sp6Xilts6FKrcJvn2pjpmslQNr59Sd7MzsN6AljhIuwOA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=X4iB3RZo; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="X4iB3RZo" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-b079c13240eso194827266b.1 for ; Thu, 18 Sep 2025 08:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1758209794; x=1758814594; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N81dGvO+xJTmXCqWIcLQYDKWPfQd/IXwIEAbvvgpOAM=; b=X4iB3RZojqE1NiAtu1BuFS2d5FoB3pCFpzpcfPy1HGaNW5L0ahvIYlApcLalF5KSYk EkR+NtWyJdClZAautgtbZLaLSeN39v5tE35VuOvTwdI1+pZgejQXJd7RPkPMrNaMMtq2 mseLSSGFrLHDFkFT/LHizLa+iyimhfqYC5cAU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758209794; x=1758814594; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N81dGvO+xJTmXCqWIcLQYDKWPfQd/IXwIEAbvvgpOAM=; b=PhZ+Jo6BFz+J5JqXh7W36Anmejd7Y5Jgst+k+RrkvSaynttpbyb3nLTvF8bS1TuqL7 RXwKj8eKSI1tR567VUmFpMhbZe3aeqV0PsJ/AzjpFqd6N6mZS59KFHfa6fRU7DCtKos+ NyAuOFfD71KwaGtpR0LPBCx6/UmE2EUXMrABIxL/fLFBb9F+Jf4BrxJaIX93kaMDEsSI zh0ETgGaIokshcLvqG6BjugNB/nLZBm7mxIfObiJQo+e95aVBBtKf5NmriF51ZnDSo2X GZzspkf5JNfOpgpmPj0JwGLBzW4S9MrePD5m7IoOV49U/dPmQVhfWjUVzk84f+bKNQ7D cnUQ== X-Gm-Message-State: AOJu0Yz1DmRIrYHf7Bz9H8N0Hiq234GJhZ87n0xDJD5Egtf6AlCHEuGJ //4p8ttjRs2BDznrSP4SzyqoRBb1wo8n98vNeZuLQe0kZM9jzcNTzzoWHZ7VhQ6L1s2SnAB4QT3 hlyFs X-Gm-Gg: ASbGncvEA+2qqoEeRULPve0jEWu2PyYYHbDzafFlUmo94YnKcyPIYM4b1Ejp94inJKx x7hrrhaL45EcnvELiO5IiDkJ4rawV1D1cd6V2hC9fBLVHCzmCTErPqdxVZOqymTOp6j5m2XM7zL IzMJyISiVjSdpreFp/wij0GLhFvdDyFWhtosGPQTnc+Nd3rNP5BDzv9aF00Fvq1+JrVcnoJs9+k tmdbJE880BAYF9U7KLLXX/A9Gjik31PtEUTsl6K3OJoB2ZHdIHx99AdoaaoKn9N6mouaBMjfe0l i9f4uqxswcethappvRUjl1FYAQY7mBcuaWMAwcHv1FxVQSLJU7svmMpH2XyKWIYR4PZhv9UpkgM aPLh/1GbOKSUmpRP1xBenliH/XWckTvg6YexP69fOrwhVPS+su302I2hhGQZFrVkKCIfaqeolJY K2goefxDd1ElU5MzrT3CCry+W5am7AA0N99/c4Nit8s+eay6tS/OqkFpzQzinxgsh+sUeiEhuOZ R36qaQ/IZA= X-Google-Smtp-Source: AGHT+IH+5a/k6GLlMG0qj7LkI5YgWM1M2eW1F45wR5XgRgM/Au5/NEfTBQXm8UgWVuynbsiaKqnX0w== X-Received: by 2002:a17:906:6a09:b0:b04:8701:7304 with SMTP id a640c23a62f3a-b1baf60e268mr788877466b.10.1758209793686; Thu, 18 Sep 2025 08:36:33 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-56-38-125.retail.telecomitalia.it. [82.56.38.125]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b1fd272026csm212430766b.102.2025.09.18.08.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Sep 2025 08:36:33 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v4 1/5] dt-bindings: touchscreen: convert bu21013 bindings to json schema Date: Thu, 18 Sep 2025 17:36:06 +0200 Message-ID: <20250918153630.2535208-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert Rohm BU21013 I2C touchscreen controller device tree binding to json-schema. Additional changes: - Replace -supply with avdd-supply to match example and existing DTS. - Add reset-gpios in the example because it is required. Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski --- Changes in v4: - Drop description from reset-gpios - Re-work description of avdd-supply - Rename the file to rohm,bu21013.yaml - Add Reviewed-by tag of Krzysztof Kozlowski Changes in v2: - Added in v2 .../bindings/input/touchscreen/bu21013.txt | 43 --------- .../input/touchscreen/rohm,bu21013.yaml | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/bu21013.txt create mode 100644 Documentation/devicetree/bindings/input/touchscreen/rohm,bu21013.yaml diff --git a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt deleted file mode 100644 index da4c9d8b99b1..000000000000 --- a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt +++ /dev/null @@ -1,43 +0,0 @@ -* Rohm BU21013 Touch Screen - -Required properties: - - compatible : "rohm,bu21013_tp" - - reg : I2C device address - - reset-gpios : GPIO pin enabling (selecting) chip (CS) - - interrupt-parent : the phandle for the gpio controller - - interrupts : (gpio) interrupt to which the chip is connected - -Optional properties: - - touch-gpios : GPIO pin registering a touch event - - -supply : Phandle to a regulator supply - - touchscreen-size-x : General touchscreen binding, see [1]. - - touchscreen-size-y : General touchscreen binding, see [1]. - - touchscreen-inverted-x : General touchscreen binding, see [1]. - - touchscreen-inverted-y : General touchscreen binding, see [1]. - - touchscreen-swapped-x-y : General touchscreen binding, see [1]. - -[1] All general touchscreen properties are described in - Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt. - -Deprecated properties: - - rohm,touch-max-x : Maximum outward permitted limit in the X axis - - rohm,touch-max-y : Maximum outward permitted limit in the Y axis - - rohm,flip-x : Flip touch coordinates on the X axis - - rohm,flip-y : Flip touch coordinates on the Y axis - -Example: - - i2c@80110000 { - bu21013_tp@5c { - compatible = "rohm,bu21013_tp"; - reg = <0x5c>; - interrupt-parent = <&gpio2>; - interrupts <&20 IRQ_TYPE_LEVEL_LOW>; - touch-gpio = <&gpio2 20 GPIO_ACTIVE_LOW>; - avdd-supply = <&ab8500_ldo_aux1_reg>; - - touchscreen-size-x = <384>; - touchscreen-size-y = <704>; - touchscreen-inverted-y; - }; - }; diff --git a/Documentation/devicetree/bindings/input/touchscreen/rohm,bu21013.yaml b/Documentation/devicetree/bindings/input/touchscreen/rohm,bu21013.yaml new file mode 100644 index 000000000000..adea2c4edf1f --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/rohm,bu21013.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/rohm,bu21013.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rohm BU21013 touchscreen + +description: + Rohm BU21013 I2C driven touchscreen controller. + +maintainers: + - Dario Binacchi + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - rohm,bu21013_tp + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + touch-gpios: + maxItems: 1 + description: GPIO registering a touch event. + + avdd-supply: + description: Analogic power supply + + rohm,touch-max-x: + deprecated: true + description: Maximum value on the X axis. + $ref: /schemas/types.yaml#/definitions/uint32 + + rohm,touch-max-y: + deprecated: true + description: Maximum value on the Y axis. + $ref: /schemas/types.yaml#/definitions/uint32 + + rohm,flip-x: + deprecated: true + description: Flip touch coordinates on the X axis + type: boolean + + rohm,flip-y: + deprecated: true + description: Flip touch coordinates on the Y axis + type: boolean + + touchscreen-inverted-x: true + touchscreen-inverted-y: true + touchscreen-size-x: true + touchscreen-size-y: true + touchscreen-swapped-x-y: true + +additionalProperties: false + +required: + - compatible + - reg + - reset-gpios + - interrupts + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@5c { + compatible = "rohm,bu21013_tp"; + reg = <0x5c>; + + interrupt-parent = <&gpio2>; + interrupts = <0x20 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; + touch-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>; + avdd-supply = <&ab8500_ldo_aux1_reg>; + + touchscreen-size-x = <384>; + touchscreen-size-y = <704>; + touchscreen-inverted-y; + }; + }; -- 2.43.0 base-commit: 8b789f2b7602a818e7c7488c74414fae21392b63 branch: drop-touchscreen.txt