Skip to content

Commit

Permalink
Platform/RK3588: Disable I2C buses not used in any DT's (or DT overri…
Browse files Browse the repository at this point in the history
…des -- keep cameras / LCDs into account)
  • Loading branch information
coolstar committed Jan 5, 2024
1 parent 507c314 commit 0b87fc6
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,12 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(1, GPIO_PIN_PA3, 9); //i2c4_scl_m3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
Expand All @@ -217,8 +215,6 @@ I2cIomux (
GpioPinSetFunction(1, GPIO_PIN_PA2, 9); //i2c4_sda_m3
break;
case 5:
GpioPinSetFunction(3, GPIO_PIN_PC7, 9); //i2c5_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PD0, 9); //i2c5_sda_m0
break;
case 6:
GpioPinSetFunction(4, GPIO_PIN_PB1, 9); //i2c6_scl_m3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
Expand All @@ -180,20 +178,14 @@ I2cIomux (
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(1, GPIO_PIN_PA3, 9); //i2c4_scl_m3
GpioPinSetFunction(1, GPIO_PIN_PA2, 9); //i2c4_sda_m3
break;
case 5:
GpioPinSetFunction(1, GPIO_PIN_PB6, 9); //i2c5_scl_m3
GpioPinSetFunction(1, GPIO_PIN_PB7, 9); //i2c5_sda_m3
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
Expand All @@ -192,20 +190,14 @@ I2cIomux (
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(1, GPIO_PIN_PA3, 9); //i2c4_scl_m3
GpioPinSetFunction(1, GPIO_PIN_PA2, 9); //i2c4_sda_m3
break;
case 5:
GpioPinSetFunction(1, GPIO_PIN_PB6, 9); //i2c5_scl_m3
GpioPinSetFunction(1, GPIO_PIN_PB7, 9); //i2c5_sda_m3
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
Expand All @@ -190,20 +188,14 @@ I2cIomux (
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(1, GPIO_PIN_PA3, 9); //i2c4_scl_m3
GpioPinSetFunction(1, GPIO_PIN_PA2, 9); //i2c4_sda_m3
break;
case 5:
GpioPinSetFunction(1, GPIO_PIN_PB6, 9); //i2c5_scl_m3
GpioPinSetFunction(1, GPIO_PIN_PB7, 9); //i2c5_sda_m3
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
Expand All @@ -195,16 +193,12 @@ I2cIomux (
GpioPinSetFunction(1, GPIO_PIN_PA2, 9); //i2c4_sda_m3
break;
case 5:
GpioPinSetFunction(3, GPIO_PIN_PC7, 9); //i2c5_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PD0, 9); //i2c5_sda_m0
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,14 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 2); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(3, GPIO_PIN_PA6, 9); //i2c4_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PA5, 9); //i2c4_sda_m0
break;
case 5:
GpioPinSetFunction(1, GPIO_PIN_PB6, 9); //i2c5_scl_m3
Expand All @@ -224,8 +218,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 2); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
Expand All @@ -227,8 +225,6 @@ I2cIomux (
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(3, GPIO_PIN_PA6, 9); //i2c4_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PA5, 9); //i2c4_sda_m0
break;
case 5:
GpioPinSetFunction(1, GPIO_PIN_PB6, 9); //i2c5_scl_m3
Expand All @@ -239,8 +235,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,8 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD5, 9); //i2c1_sda_m2
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(3, GPIO_PIN_PA6, 9); //i2c4_scl_m0
Expand All @@ -193,8 +189,6 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PD1, 9); //i2c7_sda_m0
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,24 +181,18 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PA6, 2); //i2c0_sda_m0
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(3, GPIO_PIN_PA6, 9); //i2c4_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PA5, 9); //i2c4_sda_m0
break;
case 5:
GpioPinSetFunction(3, GPIO_PIN_PC7, 9); //i2c5_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PD0, 9); //i2c5_sda_m0
break;
case 6:
GpioPinSetFunction(4, GPIO_PIN_PB1, 9); //i2c6_scl_m3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,14 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD5, 9); //i2c1_sda_m2
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(3, GPIO_PIN_PA6, 9); //i2c4_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PA5, 9); //i2c4_sda_m0
break;
case 5:
GpioPinSetFunction(3, GPIO_PIN_PC7, 9); //i2c5_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PD0, 9); //i2c5_sda_m0
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,18 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD2, 3); //i2c0_sda_m2
break;
case 1:
GpioPinSetFunction(0, GPIO_PIN_PB5, 9); //i2c1_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PB6, 9); //i2c1_sda_m0
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(3, GPIO_PIN_PA6, 9); //i2c4_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PA5, 9); //i2c4_sda_m0
break;
case 5:
GpioPinSetFunction(3, GPIO_PIN_PC7, 9); //i2c5_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PD0, 9); //i2c5_sda_m0
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC7, 9); //i2c6_sda_m0
break;
case 7:
GpioPinSetFunction(1, GPIO_PIN_PD0, 9); //i2c7_scl_m0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,14 @@ I2cIomux (
GpioPinSetFunction(0, GPIO_PIN_PD5, 9); //i2c1_sda_m2
break;
case 2:
GpioPinSetFunction(0, GPIO_PIN_PB7, 9); //i2c2_scl_m0
GpioPinSetFunction(0, GPIO_PIN_PC0, 9); //i2c2_sda_m0
break;
case 3:
GpioPinSetFunction(1, GPIO_PIN_PC1, 9); //i2c3_scl_m0
GpioPinSetFunction(1, GPIO_PIN_PC0, 9); //i2c3_sda_m0
break;
case 4:
GpioPinSetFunction(2, GPIO_PIN_PB5, 9); //i2c4_scl_m1
GpioPinSetFunction(2, GPIO_PIN_PB4, 9); //i2c4_sda_m1
break;
case 5:
GpioPinSetFunction(3, GPIO_PIN_PC7, 9); //i2c5_scl_m0
GpioPinSetFunction(3, GPIO_PIN_PD0, 9); //i2c5_sda_m0
break;
case 6:
GpioPinSetFunction(0, GPIO_PIN_PD0, 9); //i2c6_scl_m0
Expand Down

0 comments on commit 0b87fc6

Please sign in to comment.