lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <940c6040-4c71-a1b6-b568-3d93096411aa@amd.com>
Date:   Mon, 10 Jul 2023 12:05:23 +0200
From:   Michal Simek <michal.simek@....com>
To:     linux-kernel@...r.kernel.org, monstr@...str.eu,
        michal.simek@...inx.com, git@...inx.com
Cc:     Manikanta Guntupalli <manikanta.guntupalli@....com>,
        Amit Kumar Mahapatra <amit.kumar-mahapatra@...inx.com>,
        Andrew Davis <afd@...com>,
        Ashok Reddy Soma <ashok.reddy.soma@...inx.com>,
        Conor Dooley <conor+dt@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Parth Gajjar <parth.gajjar@....com>,
        Piyush Mehta <piyush.mehta@...inx.com>,
        Rob Herring <robh+dt@...nel.org>,
        Srinivas Neeli <srinivas.neeli@...inx.com>,
        Vishal Sagar <vishal.sagar@....com>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64: zynqmp: Fix open drain warning on ZynqMP



On 6/8/23 14:35, Michal Simek wrote:
> From: Manikanta Guntupalli <manikanta.guntupalli@....com>
> 
> Mark both GPIO lines as GPIO_OPEN_DRAIN which is required by i2c-gpio DT
> binding. Similar change was done by commit 8df80c1801c9 ("ARM: dts: exynos:
> Convert to new i2c-gpio bindings").
> 
> Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@....com>
> Signed-off-by: Michal Simek <michal.simek@....com>
> ---
> 
>   arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dtso   | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dtso   | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts      | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts | 8 ++++----
>   arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts      | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts      | 8 ++++----
>   arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts      | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts      | 4 ++--
>   arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts      | 8 ++++----
>   arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts      | 8 ++++----
>   12 files changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dtso b/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dtso
> index 603839c82599..e06c6824dea4 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dtso
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dtso
> @@ -27,8 +27,8 @@ &i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	/* u14 - 0x40 - ina260 */
>   	/* u27 - 0xe0 - STDP4320 DP/HDMI splitter */
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dtso b/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dtso
> index a91d09e7da4b..030e2c93f0e6 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dtso
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dtso
> @@ -22,8 +22,8 @@ &i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	/* u14 - 0x40 - ina260 */
>   	/* u43 - 0x2d - usb5744 */
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> index dfd1a18f5a10..c1f21b0e1760 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> @@ -245,8 +245,8 @@ &i2c1 {
>   	status = "okay";
>   	bootph-all;
>   	clock-frequency = <400000>;
> -	scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	eeprom: eeprom@50 { /* u46 - also at address 0x58 */
>   		bootph-all;
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts
> index d9d1de5f313c..e821d55d8d5a 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts
> @@ -119,8 +119,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 36 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 37 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	eeprom: eeprom@55 {
>   		compatible = "atmel,24c64"; /* 24AA64 */
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts
> index 6503f4985f8d..b59e11316b4b 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts
> @@ -110,8 +110,8 @@ &i2c0 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c0_default>;
>   	pinctrl-1 = <&pinctrl_i2c0_gpio>;
> -	scl-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	tca6416_u26: gpio@20 {
>   		compatible = "ti,tca6416";
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts
> index b1e933b8a2cd..0d2ea9c09a0a 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts
> @@ -91,8 +91,8 @@ &i2c0 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c0_default>;
>   	pinctrl-1 = <&pinctrl_i2c0_gpio>;
> -	scl-gpios = <&gpio 74 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 75 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 74 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 75 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   };
>   
>   &i2c1 {
> @@ -100,8 +100,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 76 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 77 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 76 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 77 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   };
>   
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> index 44d1f351bb75..d0091d3cb764 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> @@ -180,8 +180,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   	clock-frequency = <100000>;
>   	i2c-mux@75 { /* u11 */
>   		compatible = "nxp,pca9548";
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
> index 8767f147cbe3..84952c14f021 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
> @@ -233,8 +233,8 @@ &i2c0 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c0_default>;
>   	pinctrl-1 = <&pinctrl_i2c0_gpio>;
> -	scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	tca6416_u97: gpio@20 {
>   		compatible = "ti,tca6416";
> @@ -497,8 +497,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	/* PL i2c via PCA9306 - u45 */
>   	i2c-mux@74 { /* u34 */
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts
> index e185709c0d84..5084ddcee00f 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts
> @@ -140,8 +140,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	/* Another connection to this bus via PL i2c via PCA9306 - u45 */
>   	i2c-mux@74 { /* u34 */
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts
> index 7fceebd1815c..b273bd1d920a 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dts
> @@ -145,8 +145,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	tca6416_u97: gpio@20 {
>   		compatible = "ti,tca6416";
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts
> index 27b2416cb6d8..50c384aa253e 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts
> @@ -245,8 +245,8 @@ &i2c0 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c0_default>;
>   	pinctrl-1 = <&pinctrl_i2c0_gpio>;
> -	scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	tca6416_u97: gpio@20 {
>   		compatible = "ti,tca6416";
> @@ -508,8 +508,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	/* PL i2c via PCA9306 - u45 */
>   	i2c-mux@74 { /* u34 */
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts
> index 6224365826d8..617cb0405a7d 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts
> @@ -205,8 +205,8 @@ &i2c0 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c0_default>;
>   	pinctrl-1 = <&pinctrl_i2c0_gpio>;
> -	scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	tca6416_u22: gpio@20 {
>   		compatible = "ti,tca6416";
> @@ -385,8 +385,8 @@ &i2c1 {
>   	pinctrl-names = "default", "gpio";
>   	pinctrl-0 = <&pinctrl_i2c1_default>;
>   	pinctrl-1 = <&pinctrl_i2c1_gpio>;
> -	scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
> -	sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
> +	scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +	sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   
>   	i2c-mux@74 { /* u26 */
>   		compatible = "nxp,pca9548";

Applied.
M

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ