From nobody Wed Dec 17 08:51:01 2025 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 A85C216E887 for ; Thu, 25 Jul 2024 07:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721891164; cv=none; b=i7rBET0OasXd2wZbXVRZlT820oustd9zulAJ6PAyeKV8RFVqkIaygnKc6EHVwtkD3ImE2CROT3ZZlYBKLbW+inDyR7OKfOxxb6YAgCGO5Fpu5Itwq9NcRTDq3vb53W8ea+M/A81cRvq1pNh/zmm1dZbEkY286SeUDqe0P3TeYIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721891164; c=relaxed/simple; bh=CHlJmucPNbTooY/cIPar6d813VxryIVawWhVxhMioHE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hLmvcQvW13i45mf/j+ltqYD5DXHviCOQ28tJMaFq+dXNriGGGeB715FumpYPgIe3RCSnsN2N1vRwZKGbS3NHbhhINYcxnJgFruBZVTJjcny8qxZ7xq7OSeXDQ5XzQYjXHy6RkPeD7dGdOU+HSrOmzfleOetVS+f6HseQdMjuCt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=KipCyvzh; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KipCyvzh" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a7ab5fc975dso17022766b.1 for ; Thu, 25 Jul 2024 00:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721891161; x=1722495961; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gOTZHYO/lqNhZCm7gTaweDmBGXw1jkQtgojTqIvh5FM=; b=KipCyvzhHjeF5gTK9FHpVIPlzpU3joWg8oJ1/S0gJfKVpC9Yen0eDQoXSHm6oyNvm+ Sde7mW0ob81Sg34MRcJURj8je8RW0cBsTBin4f7K53zlm/QfQDrR4t3VVXR1koNXXYV1 8+oi0RZ4P5+E/yt2hyt3+MGsNS7gjNa26Wz3tqsJIl000rnjWVUKf6609HcUN7JfzT6y dBlJ5osw08hBHFEFvmtp3S4kmmvYqMWCcfyfBUA7+ETXEea8wv5nr8hqzfzZKGL7W8Bl BdgMjOl0O+gug4fIxKnbeHB6wmcXjVdTvnnTchjRlE3M9vVGdCjVOzftlygoXvYAZzZj kzNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721891161; x=1722495961; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gOTZHYO/lqNhZCm7gTaweDmBGXw1jkQtgojTqIvh5FM=; b=gN1HyT1R1UO2qjew3ebYmStjcvqJRSUfhZzEz889O6vHUZfZbEqMXZ2N03CVbI/vfe PfQO2/0HOZdj4e1Uluq7EsTOR/0jFOEPxQgr22CLw42GW3cFJworzlF9RWg7xvf6heJ/ gLGLxUqn+XuPM928zkmE1f8Z/sg2Wb2eQY6Si7AFAsHS77L9c6H4e45+zG4ZMUljq7eS kCQG4STyIYGsmGgoAeYihgG+VqyxYsBEmAT5+LKx+9OUAEvNtiqJq4UZXpxaZsWSmgC/ FPpZ3a/hR/soZYQTn3nmSQgGuAVH/0ubt1cNFFWY7axlnBJMWUEzN90X3t34NktJaF+z HLow== X-Forwarded-Encrypted: i=1; AJvYcCWRQIGud7PokaouSdqQmmOR7qeE7+koBFUPQGe+t7G60GXyQ8m+7bnbyhr+icYVHcgEeo+4ge1jTXeX7L6CLbvBHFiDOkhuimAFrZSm X-Gm-Message-State: AOJu0Yzqdvtk/sV71+NWZoZ4XIlGKt0sY2ib7jTlinO0NZcT35wOg+Dy O2W4zvAmlWIe6AHJG7LqnTg0VxLRhwlopzi9T/sj3m2LB/RpDTfAD1plDcYsr+c= X-Google-Smtp-Source: AGHT+IFuRqsE0mF4On1rhIHc90IENgUcCINfM+JKK9IIHDmswQAsCtVg1p/AaW75wX2cHabxNqAOuw== X-Received: by 2002:a17:907:d17:b0:a7a:ba59:3164 with SMTP id a640c23a62f3a-a7acb821251mr79754466b.53.1721891161055; Thu, 25 Jul 2024 00:06:01 -0700 (PDT) Received: from puffmais.c.googlers.com (118.240.90.34.bc.googleusercontent.com. [34.90.240.118]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab2311asm40253566b.18.2024.07.25.00.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 00:06:00 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Thu, 25 Jul 2024 08:05:58 +0100 Subject: [PATCH v5 1/2] dt-bindings: serial: samsung: avoid duplicating permitted clock-names Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240725-gs101-uart-binding-v5-1-e237be8253a9@linaro.org> References: <20240725-gs101-uart-binding-v5-0-e237be8253a9@linaro.org> In-Reply-To: <20240725-gs101-uart-binding-v5-0-e237be8253a9@linaro.org> To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Peter Griffin , Tudor Ambarus , Will McVicker , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.13.0 This binding currently duplicates the permitted clock-names in various places, and when adding more compatibles, clock-names will have to be duplicated even more. The reason is: 1) subschemas (-if: ...), still have to match the top-level: pattern: '^clk_uart_baud[0-3]$' 2) there is one compatible that doesn't follow sequential numbering for the clock names (samsung,s3c6400-uart) 3) when limiting the number of clock-names, we also want to enforce sequential names Because of 1) and 2), the patterns can not simply be changed to constant strings, and later overridden in a different subschema (for samsung,s3c6400-uart only). Since we can't populate the top-level clock-names based on the compatible, and because when limiting the number of items we generally want sequential numbers and not a pattern, move the permitted strings into a subschema of its own and populate it based on the compatible: * 'uart clk_uart_baud2 clk_uart_baud3' for the one outlier * 'uart clk_uart_baud0..3' for everything else This way we can avoid having to duplicate the permitted names everywhere. While at it, add blank lines as per the universal style, which is to have blank lines between properties, except where they are booleans. Also add another example using a compatible that uses the default clock-names scheme, as opposed to the existing example that uses samsung,s3c6400-uart's non-default clock-names. This allows testing both versions of the clock-names property when running dt_binding_check. Reviewed-by: Rob Herring (Arm) Signed-off-by: Andr=C3=A9 Draszik --- v5: * drop now-meaningless top level clock-names description (Rob) * collect tags --- .../devicetree/bindings/serial/samsung_uart.yaml | 64 +++++++++++++++++-= ---- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/D= ocumentation/devicetree/bindings/serial/samsung_uart.yaml index 0f0131026911..0075712e7be8 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -56,14 +56,8 @@ properties: maxItems: 5 =20 clock-names: - description: N =3D 0 is allowed for SoCs without internal baud clock m= ux. minItems: 2 - items: - - const: uart - - pattern: '^clk_uart_baud[0-3]$' - - pattern: '^clk_uart_baud[0-3]$' - - pattern: '^clk_uart_baud[0-3]$' - - pattern: '^clk_uart_baud[0-3]$' + maxItems: 5 =20 dmas: items: @@ -103,18 +97,45 @@ allOf: compatible: contains: enum: - - samsung,s5pv210-uart + - samsung,s3c6400-uart then: properties: clocks: - minItems: 2 + minItems: 3 maxItems: 3 + + clock-names: + items: + - const: uart + - const: clk_uart_baud2 + - const: clk_uart_baud3 + + else: + properties: clock-names: minItems: 2 items: - const: uart - - pattern: '^clk_uart_baud[0-1]$' - - pattern: '^clk_uart_baud[0-1]$' + - const: clk_uart_baud0 + - const: clk_uart_baud1 + - const: clk_uart_baud2 + - const: clk_uart_baud3 + + - if: + properties: + compatible: + contains: + enum: + - samsung,s5pv210-uart + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + + clock-names: + minItems: 3 + maxItems: 3 =20 - if: properties: @@ -129,10 +150,9 @@ allOf: properties: clocks: maxItems: 2 + clock-names: - items: - - const: uart - - const: clk_uart_baud0 + maxItems: 2 =20 - if: properties: @@ -163,3 +183,19 @@ examples: <&clocks SCLK_UART>; samsung,uart-fifosize =3D <16>; }; + - | + #include + #include + #include + + serial_0: serial@10a00000 { + compatible =3D "google,gs101-uart"; + reg =3D <0x10a00000 0xc0>; + clocks =3D <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_PCLK_0>, + <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_IPCLK_0>; + clock-names =3D "uart", "clk_uart_baud0"; + interrupts =3D ; + pinctrl-0 =3D <&uart0_bus>; + pinctrl-names =3D "default"; + samsung,uart-fifosize =3D <256>; + }; --=20 2.45.2.1089.g2a221341d9-goog From nobody Wed Dec 17 08:51:01 2025 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 4E34316EB7A for ; Thu, 25 Jul 2024 07:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721891165; cv=none; b=qpSIozzRKuubYFIQr3pbCf721/+jKvvttxVZuJaNG1tPK+npcVruUlc81x+oKVLqj6i1qlqEUEe1cH42xNeoirEsqNdwnfjZ0RT7mqqXBk+KIQIlXRllQEtoN+VSoy4QF9jtf3f1Ndv31eVf4q80AVXzKpBpv9dwjdE2C+NEY4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721891165; c=relaxed/simple; bh=pwyW/t0VOGGP3wo86mCW/jK4skkWTtXSxnSGh1yUi08=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GosxF/ktER+CfJWj6IDDMeOD+ila6ZdI4w0q1dcnjPdSc/I3B4xc0VWyJBAiEsiiX6MoLyKJkqZAsSP9l2rjUy+RHvY1ZhVCf45FRXo47S6Dsdd8uOiKy4A5pPM5xZTWmoXsvxKg0uwq85jLfAhabhPT8Ou8u7PsLXWtnSnVpFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=o86NrIe6; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="o86NrIe6" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso745522a12.1 for ; Thu, 25 Jul 2024 00:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721891161; x=1722495961; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=FKIyRKDttBq62+3aIK/Qv77GSa3JtrN5O6QG3j0bRsc=; b=o86NrIe6VWWYNO1OAIfEWFEFb/MbD5jAwW0OsAUZfHFK+4tbyqSegjq2W4fZieq5pL A2VkpFCakDi3dAUqQcyMagVNoW+h9/hUYcIVPmGRnvQZ/tifiVfSfNSqjC9XXSpxIcl7 7oBZw0Pnh1lBWBd6fX8GqVYhzMOcEAuQsvbwFsJq2pOSf/9N+zL2RCxeQR7f1/P0LO4B RT9PBeW0UzDO2wwxRRF+1n4Fxtykdnei+ZYD3gLf03icRCmfkOztVHLf0y+b6neY54RH UdeM81GK7/4NFPhsqICLFNe6++ap/5IuyzxwTFvQefG6uBAarHrsWBmMOJJclGVmm6kP wrfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721891161; x=1722495961; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FKIyRKDttBq62+3aIK/Qv77GSa3JtrN5O6QG3j0bRsc=; b=FRt8S667UWjVR6+jUbrhORmOkuSOckX24Fd8x1c6ruif+gYi4h/6aJ1SW4jjdu+nTh rAyeZHwI9NX0k6mLKOO+ZsrQ8fibu9jWqTkYPnNXPIu20TlqkMlcoEVtU/2+xgKimoyL chYZZ3Ewi/opQp/jFFWoyAX1GTdWz1afxTNTplvBV1SHF9Q3O22hSEblTv40PnBHLMUh M6E15VcvDPfQtSxxdEIlPbhgdIM61nDX9vRH9qzygc9DR+Hcu6GJHMdcvqkRJG4xmEsm TsLjF1J45KRTvOuq9HlFiIF+kM7W4vKP5Baysomrivng/eRa8FxHoSeEjDQ0PZCSxJ52 BCMg== X-Forwarded-Encrypted: i=1; AJvYcCX8NEaMccvJcEBFojybgdrFnd5JAr1Y71+NxTaRKHlVvVnZxkzo8jMVHLOTqyHVrHkQXsHGwjDrN5llvDAACP4lflFVAxHXGRYLECpo X-Gm-Message-State: AOJu0YytF46X3N3tjqcN/52UFMdLcEmz/sLKslX9XXbgRhO4tcjMRBK+ pONhHAF3+VGMfunnXLInW513SpaiZNhfLH281pSGJuwJDGx1UNQhe5ZA9rSZ2HE= X-Google-Smtp-Source: AGHT+IE1TFDsRViZ1DT9xXmyddGT2lImWR2Wczy7X/4uREdXSDrl1OYJLzwMHmDnSuHNiGfgnotNLw== X-Received: by 2002:a17:907:7f86:b0:a7a:9d74:21c3 with SMTP id a640c23a62f3a-a7ac4f40df2mr136665366b.35.1721891161617; Thu, 25 Jul 2024 00:06:01 -0700 (PDT) Received: from puffmais.c.googlers.com (118.240.90.34.bc.googleusercontent.com. [34.90.240.118]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab2311asm40253566b.18.2024.07.25.00.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 00:06:01 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Thu, 25 Jul 2024 08:05:59 +0100 Subject: [PATCH v5 2/2] dt-bindings: serial: samsung: fix maxItems for gs101 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240725-gs101-uart-binding-v5-2-e237be8253a9@linaro.org> References: <20240725-gs101-uart-binding-v5-0-e237be8253a9@linaro.org> In-Reply-To: <20240725-gs101-uart-binding-v5-0-e237be8253a9@linaro.org> To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Peter Griffin , Tudor Ambarus , Will McVicker , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.13.0 While gs101 needs exactly two clocks for the UART, the schema doesn't currently limit the maximum number to this and instead the default of five from this schema is applied. Update the schema accordingly. Reviewed-by: Rob Herring (Arm) Signed-off-by: Andr=C3=A9 Draszik --- v5: * collect tags v4: * drop description from clocks:, it was Linux-specific and a we'll implement something that makes it obsolete anyway * no need to duplicate clock-names anymore --- Documentation/devicetree/bindings/serial/samsung_uart.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/D= ocumentation/devicetree/bindings/serial/samsung_uart.yaml index 0075712e7be8..788c80e47831 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -166,6 +166,12 @@ allOf: properties: reg-io-width: false =20 + clocks: + maxItems: 2 + + clock-names: + maxItems: 2 + unevaluatedProperties: false =20 examples: --=20 2.45.2.1089.g2a221341d9-goog